wangliang_wd

Merge branch 'main' of http://192.168.1.42/developOne/harmonyPool into main

* 'main' of http://192.168.1.42/developOne/harmonyPool:
  feat: 标签高度和右图高度
  意图框架参数跳转【isPublicData这个字段从必选改为可选了,而且类型从原来的boolean改成了integer,如果需要填写,写0或者1,不需要的话直接删除。】
  -fix 进入文章专题页面_评论框及评论组件元素未展现
  fix:bug[18232] 个人中心设计变更,评论、关注等功能按钮展示一行
@@ -203,6 +203,7 @@ export class ProcessUtils { @@ -203,6 +203,7 @@ export class ProcessUtils {
203 relType: content?.relType, 203 relType: content?.relType,
204 relId: content?.relId, 204 relId: content?.relId,
205 channelId: content?.channelId, 205 channelId: content?.channelId,
  206 + pageId: content?.pageId
206 } as ExtraDTO 207 } as ExtraDTO
207 } as Params, 208 } as Params,
208 }; 209 };
@@ -10,6 +10,7 @@ export interface ExtraDTO extends ItemDTO { @@ -10,6 +10,7 @@ export interface ExtraDTO extends ItemDTO {
10 topicId: string; 10 topicId: string;
11 channelId: string; 11 channelId: string;
12 compId: string; 12 compId: string;
  13 + pageId: string;
13 sourcePage: string; 14 sourcePage: string;
14 relId: string; 15 relId: string;
15 relType: string; 16 relType: string;
@@ -25,5 +25,6 @@ export interface Params { @@ -25,5 +25,6 @@ export interface Params {
25 creatorId?: string; //号主id 25 creatorId?: string; //号主id
26 videoUrl?: string; 26 videoUrl?: string;
27 videoCoverUrl?: string; 27 videoCoverUrl?: string;
  28 + pageId?: string;
28 backVisibility?: boolean; //展示顶部返回栏 29 backVisibility?: boolean; //展示顶部返回栏
29 } 30 }
@@ -12,6 +12,7 @@ import { EmptyComponent } from '../components/view/EmptyComponent'; @@ -12,6 +12,7 @@ import { EmptyComponent } from '../components/view/EmptyComponent';
12 import { NetworkUtil, WindowModel } from 'wdKit'; 12 import { NetworkUtil, WindowModel } from 'wdKit';
13 import { viewBlogItemInsightIntentShare } from '../utils/InsightIntentShare' 13 import { viewBlogItemInsightIntentShare } from '../utils/InsightIntentShare'
14 import { common } from '@kit.AbilityKit'; 14 import { common } from '@kit.AbilityKit';
  15 +import { PageRepository } from '../repository/PageRepository';
15 16
16 const TAG: string = 'SpacialTopicPageComponent' 17 const TAG: string = 'SpacialTopicPageComponent'
17 18
@@ -59,7 +60,6 @@ export struct SpacialTopicPageComponent { @@ -59,7 +60,6 @@ export struct SpacialTopicPageComponent {
59 60
60 private async getDetail() { 61 private async getDetail() {
61 this.isNetConnected = NetworkUtil.isNetConnected() 62 this.isNetConnected = NetworkUtil.isNetConnected()
62 -  
63 let contentId: string = '' 63 let contentId: string = ''
64 let relId: string = '' 64 let relId: string = ''
65 let relType: string = '' 65 let relType: string = ''
@@ -74,23 +74,31 @@ export struct SpacialTopicPageComponent { @@ -74,23 +74,31 @@ export struct SpacialTopicPageComponent {
74 if (this.action.params.extra.relType) { 74 if (this.action.params.extra.relType) {
75 relType = this.action.params.extra.relType 75 relType = this.action.params.extra.relType
76 } 76 }
77 -  
78 } 77 }
79 - let detailBeans = await DetailViewModel.getDetailPageData(relId, contentId, relType)  
80 - if (detailBeans && detailBeans.length > 0) {  
81 - this.contentDetailData = detailBeans[0];  
82 - this.viewBlogInsightIntentShare()  
83 - // if (this.contentDetailData[0]?.openComment) {  
84 - this.publishCommentModel.targetId = String(this.contentDetailData?.newsId || '')  
85 - this.publishCommentModel.targetRelId = String(this.contentDetailData?.reLInfo?.relId || '')  
86 - this.publishCommentModel.targetTitle = this.contentDetailData?.newsTitle  
87 - this.publishCommentModel.targetRelType = String(this.contentDetailData?.reLInfo?.relType || '')  
88 - this.publishCommentModel.targetRelObjectId = String(this.contentDetailData?.reLInfo?.relObjectId || '')  
89 - this.publishCommentModel.keyArticle = String(this.contentDetailData?.keyArticle || '')  
90 - this.publishCommentModel.targetType = String(this.contentDetailData?.newsType || '')  
91 - this.publishCommentModel.visitorComment = String(this.contentDetailData?.visitorComment || '')  
92 - // }  
93 - this.trySendData2H5() 78 + let pageId = this.action.params.extra?.pageId
  79 + console.log('pageIdpageId',pageId)
  80 + if(pageId){
  81 + let pageInfoMsg = await PageRepository.fetchMorningEveningPageInfo(pageId)
  82 + let detailBeans = await DetailViewModel.getDetailPageData(relId, contentId, relType)
  83 + if (detailBeans?.length > 0) {
  84 + this.contentDetailData = JSON.parse(JSON.stringify(detailBeans[0]));
  85 + this.viewBlogInsightIntentShare()
  86 + // if (this.contentDetailData[0]?.openComment) {
  87 + this.publishCommentModel.targetId = String(this.contentDetailData?.newsId || '')
  88 + this.publishCommentModel.targetRelId = String(this.contentDetailData?.reLInfo?.relId || '')
  89 + this.publishCommentModel.targetTitle = this.contentDetailData?.newsTitle
  90 + this.publishCommentModel.targetRelType = String(this.contentDetailData?.reLInfo?.relType || '')
  91 + this.publishCommentModel.targetRelObjectId = String(this.contentDetailData?.reLInfo?.relObjectId || '')
  92 + this.publishCommentModel.keyArticle = String(this.contentDetailData?.keyArticle || '')
  93 + this.publishCommentModel.targetType = String(this.contentDetailData?.newsType || '')
  94 + this.publishCommentModel.visitorComment = String(this.contentDetailData?.visitorComment || '')
  95 + // }
  96 + this.trySendData2H5()
  97 + }
  98 + if(pageInfoMsg && pageInfoMsg.data){
  99 + this.contentDetailData.openComment = Number(pageInfoMsg.data.topicInfo.commentFlag)
  100 + this.contentDetailData.commentDisplay = Number(pageInfoMsg.data.topicInfo.commentShowFlag)
  101 + }
94 } 102 }
95 } 103 }
96 } 104 }
@@ -77,15 +77,8 @@ export struct Card10Component { @@ -77,15 +77,8 @@ export struct Card10Component {
77 InfomationCardClick.track(this.compDTO, this.contentDTO, this.pageId, this.pageName) 77 InfomationCardClick.track(this.compDTO, this.contentDTO, this.pageId, this.pageName)
78 ProcessUtils.processPage(this.contentDTO) 78 ProcessUtils.processPage(this.contentDTO)
79 }) 79 })
80 - if(this.contentDTO.objectType == '5'){  
81 - Notes({ objectType: this.contentDTO.objectType }).align(Alignment.Center).margin({ left: 5, bottom: 5 })  
82 - } else {  
83 - if (this.contentDTO.seoTags) {  
84 - Notes({ newTags: this.contentDTO.seoTags }).align(Alignment.Center)  
85 - }  
86 - if (this.contentDTO.newTags) {  
87 - Notes({ newTags: this.contentDTO.newTags }).align(Alignment.Center)  
88 - } 80 + if (this.contentDTO.objectType == '5') {
  81 + Notes({ objectType: 5 }).margin({ left: 5, bottom: 5 })
89 } 82 }
90 }.alignContent(Alignment.BottomStart) 83 }.alignContent(Alignment.BottomStart)
91 84
@@ -135,15 +128,8 @@ export struct Card10Component { @@ -135,15 +128,8 @@ export struct Card10Component {
135 Row() { 128 Row() {
136 Column() { 129 Column() {
137 Stack() { 130 Stack() {
138 - if(this.contentDTO.objectType == '5'){  
139 - Notes({ objectType: this.contentDTO.objectType }).align(Alignment.Center)  
140 - } else {  
141 - if (this.contentDTO.seoTags) {  
142 - Notes({ newTags: this.contentDTO.seoTags }).align(Alignment.Center)  
143 - }  
144 - if (this.contentDTO.newTags) {  
145 - Notes({ newTags: this.contentDTO.newTags }).align(Alignment.Center)  
146 - } 131 + if (item.objectType == '5') {
  132 + Notes({ objectType: 5 })
147 } 133 }
148 Text(item.newsTitle) 134 Text(item.newsTitle)
149 .fontSize($r('app.float.font_size_17')) 135 .fontSize($r('app.float.font_size_17'))
@@ -151,12 +137,10 @@ export struct Card10Component { @@ -151,12 +137,10 @@ export struct Card10Component {
151 .fontColor($r('app.color.color_222222')) 137 .fontColor($r('app.color.color_222222'))
152 .maxLines(2) 138 .maxLines(2)
153 .textOverflow({ overflow: TextOverflow.Ellipsis }) 139 .textOverflow({ overflow: TextOverflow.Ellipsis })
154 - .textIndent((this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) > 2 &&  
155 - (this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) < 5 ? 58 :  
156 - ((this.contentDTO.newTags?.length > 0 || this.contentDTO.seoTags?.length > 0) || this.contentDTO.objectType == '5') ? 35 :  
157 - 0 ) 140 + .textIndent(item.objectType == '5' ? 38 : 0)
158 }.alignContent(Alignment.TopStart) 141 }.alignContent(Alignment.TopStart)
159 142
  143 + Blank()
160 //bottom 评论等信息 144 //bottom 评论等信息
161 CardSourceInfo( 145 CardSourceInfo(
162 { 146 {
@@ -166,6 +150,7 @@ export struct Card10Component { @@ -166,6 +150,7 @@ export struct Card10Component {
166 ) 150 )
167 } 151 }
168 .layoutWeight(1) 152 .layoutWeight(1)
  153 + .height(78)
169 .alignItems(HorizontalAlign.Start) 154 .alignItems(HorizontalAlign.Start)
170 155
171 // 右侧图片 156 // 右侧图片
@@ -183,6 +168,7 @@ export struct Card10Component { @@ -183,6 +168,7 @@ export struct Card10Component {
183 }) 168 })
184 } 169 }
185 .alignContent(Alignment.BottomEnd) 170 .alignContent(Alignment.BottomEnd)
  171 + .height(78)
186 } 172 }
187 } 173 }
188 .padding({ top: 10, bottom: 10 }) 174 .padding({ top: 10, bottom: 10 })
@@ -39,13 +39,13 @@ export struct Card11Component { @@ -39,13 +39,13 @@ export struct Card11Component {
39 Column() { 39 Column() {
40 Stack() { 40 Stack() {
41 if(this.contentDTO.objectType == '5'){ 41 if(this.contentDTO.objectType == '5'){
42 - Notes({ objectType: this.contentDTO.objectType }).align(Alignment.Center) 42 + Notes({ objectType: this.contentDTO.objectType }).height(20).align(Alignment.Center)
43 } else { 43 } else {
44 if (this.contentDTO.seoTags) { 44 if (this.contentDTO.seoTags) {
45 - Notes({ newTags: this.contentDTO.seoTags }).align(Alignment.Center) 45 + Notes({ newTags: this.contentDTO.seoTags }).height(20).align(Alignment.Center)
46 } 46 }
47 if (this.contentDTO.newTags) { 47 if (this.contentDTO.newTags) {
48 - Notes({ newTags: this.contentDTO.newTags }).align(Alignment.Center) 48 + Notes({ newTags: this.contentDTO.newTags }).height(20).align(Alignment.Center)
49 } 49 }
50 } 50 }
51 Text() { 51 Text() {
@@ -61,13 +61,13 @@ export struct Card2Component { @@ -61,13 +61,13 @@ export struct Card2Component {
61 // } 61 // }
62 // } 62 // }
63 if(this.contentDTO.objectType == '5'){ 63 if(this.contentDTO.objectType == '5'){
64 - Notes({ objectType: this.contentDTO.objectType }).align(Alignment.Center) 64 + Notes({ objectType: this.contentDTO.objectType }).height(20).align(Alignment.Center)
65 } else { 65 } else {
66 if (this.contentDTO.seoTags) { 66 if (this.contentDTO.seoTags) {
67 - Notes({ newTags: this.contentDTO.seoTags }).align(Alignment.Center) 67 + Notes({ newTags: this.contentDTO.seoTags }).height(20).align(Alignment.Center)
68 } 68 }
69 if (this.contentDTO.newTags) { 69 if (this.contentDTO.newTags) {
70 - Notes({ newTags: this.contentDTO.newTags }).align(Alignment.Center) 70 + Notes({ newTags: this.contentDTO.newTags }).height(20).align(Alignment.Center)
71 } 71 }
72 } 72 }
73 //新闻标题 73 //新闻标题
@@ -42,13 +42,13 @@ export struct Card3Component { @@ -42,13 +42,13 @@ export struct Card3Component {
42 // Notes({ objectType: this.contentDTO.objectType }).height(27).align(Alignment.Center) 42 // Notes({ objectType: this.contentDTO.objectType }).height(27).align(Alignment.Center)
43 // } 43 // }
44 if(this.contentDTO.objectType == '5'){ 44 if(this.contentDTO.objectType == '5'){
45 - Notes({ objectType: this.contentDTO.objectType }).align(Alignment.Center) 45 + Notes({ objectType: this.contentDTO.objectType }).height(20).align(Alignment.Center)
46 } else { 46 } else {
47 if (this.contentDTO.seoTags) { 47 if (this.contentDTO.seoTags) {
48 - Notes({ newTags: this.contentDTO.seoTags }).align(Alignment.Center) 48 + Notes({ newTags: this.contentDTO.seoTags }).height(20).align(Alignment.Center)
49 } 49 }
50 if (this.contentDTO.newTags) { 50 if (this.contentDTO.newTags) {
51 - Notes({ newTags: this.contentDTO.newTags }).align(Alignment.Center) 51 + Notes({ newTags: this.contentDTO.newTags }).height(20).align(Alignment.Center)
52 } 52 }
53 } 53 }
54 Text() { 54 Text() {
@@ -58,13 +58,13 @@ export struct Card5Component { @@ -58,13 +58,13 @@ export struct Card5Component {
58 Row() { 58 Row() {
59 Stack() { 59 Stack() {
60 if(this.contentDTO.objectType == '5'){ 60 if(this.contentDTO.objectType == '5'){
61 - Notes({ objectType: this.contentDTO.objectType }).align(Alignment.Center) 61 + Notes({ objectType: this.contentDTO.objectType }).height(20).align(Alignment.Center)
62 } else { 62 } else {
63 if (this.contentDTO.seoTags) { 63 if (this.contentDTO.seoTags) {
64 - Notes({ newTags: this.contentDTO.seoTags }).align(Alignment.Center) 64 + Notes({ newTags: this.contentDTO.seoTags }).height(20).align(Alignment.Center)
65 } 65 }
66 if (this.contentDTO.newTags) { 66 if (this.contentDTO.newTags) {
67 - Notes({ newTags: this.contentDTO.newTags }).align(Alignment.Center) 67 + Notes({ newTags: this.contentDTO.newTags }).height(20).align(Alignment.Center)
68 } 68 }
69 } 69 }
70 70
@@ -53,17 +53,16 @@ export struct Card6Component { @@ -53,17 +53,16 @@ export struct Card6Component {
53 // } 53 // }
54 Stack() { 54 Stack() {
55 if(this.contentDTO.objectType == '5'){ 55 if(this.contentDTO.objectType == '5'){
56 - Notes({ objectType: this.contentDTO.objectType }).align(Alignment.Center) 56 + Notes({ objectType: this.contentDTO.objectType }).height(28).align(Alignment.Center)
57 } else { 57 } else {
58 if (this.contentDTO.seoTags) { 58 if (this.contentDTO.seoTags) {
59 - Notes({ newTags: this.contentDTO.seoTags }).align(Alignment.Center) 59 + Notes({ newTags: this.contentDTO.seoTags }).height(28).align(Alignment.Center)
60 } 60 }
61 if (this.contentDTO.newTags) { 61 if (this.contentDTO.newTags) {
62 - Notes({ newTags: this.contentDTO.newTags }).align(Alignment.Center) 62 + Notes({ newTags: this.contentDTO.newTags }).height(28).align(Alignment.Center)
63 } 63 }
64 } 64 }
65 65
66 -  
67 Text() { 66 Text() {
68 if (this.titleMarked) { 67 if (this.titleMarked) {
69 ForEach(this.textArr, (textItem: textItem) => { 68 ForEach(this.textArr, (textItem: textItem) => {
@@ -89,14 +89,14 @@ export struct Card9Component { @@ -89,14 +89,14 @@ export struct Card9Component {
89 topRight: $r('app.float.image_border_radius') 89 topRight: $r('app.float.image_border_radius')
90 }) 90 })
91 if(this.contentDTO.objectType == '5'){ 91 if(this.contentDTO.objectType == '5'){
92 - Notes({ objectType: this.contentDTO.objectType }).align(Alignment.Center) 92 + Notes({ objectType: this.contentDTO.objectType }).height(20).align(Alignment.Center)
93 .margin({ left: 5, bottom: 5 }) 93 .margin({ left: 5, bottom: 5 })
94 } else { 94 } else {
95 if (this.contentDTO.seoTags) { 95 if (this.contentDTO.seoTags) {
96 - Notes({ newTags: this.contentDTO.seoTags }).align(Alignment.Center) 96 + Notes({ newTags: this.contentDTO.seoTags }).height(20).align(Alignment.Center)
97 } 97 }
98 if (this.contentDTO.newTags) { 98 if (this.contentDTO.newTags) {
99 - Notes({ newTags: this.contentDTO.newTags }).align(Alignment.Center) 99 + Notes({ newTags: this.contentDTO.newTags }).height(20).align(Alignment.Center)
100 } 100 }
101 } 101 }
102 102
@@ -16,7 +16,7 @@ export default struct MinePagePersonFunctionUI { @@ -16,7 +16,7 @@ export default struct MinePagePersonFunctionUI {
16 Grid(){ 16 Grid(){
17 ForEach(this.personalData,(item:MinePagePersonalFunctionsItem,index:number)=>{ 17 ForEach(this.personalData,(item:MinePagePersonalFunctionsItem,index:number)=>{
18 GridItem(){ 18 GridItem(){
19 - PagePersonFunction({ item: item, noDivider : (index % 4 < 3 && index != this.personalData.length-1) ? false : true}) 19 + PagePersonFunction({ item: item, noDivider : (index % 5 < 4 && index != this.personalData.length-1) ? false : true})
20 }.onClick(()=>{ 20 }.onClick(()=>{
21 console.log(index+"") 21 console.log(index+"")
22 switch (item.msg){ 22 switch (item.msg){
@@ -77,14 +77,14 @@ export default struct MinePagePersonFunctionUI { @@ -77,14 +77,14 @@ export default struct MinePagePersonFunctionUI {
77 break; 77 break;
78 } 78 }
79 } 79 }
80 - }).width('169lpx') 80 + }).width('142lpx')
81 .height('117lpx') 81 .height('117lpx')
82 }) 82 })
83 } 83 }
84 - .rowsTemplate('1fr 1fr')  
85 - .columnsTemplate('1fr 1fr 1fr 1fr')  
86 - .height('234lpx')  
87 - .margin({top:'31lpx',left:'23lpx',right:'23lpx' }) 84 + .rowsTemplate('1fr')
  85 + .columnsTemplate('1fr 1fr 1fr 1fr 1fr')
  86 + .height('117lpx')
  87 + .margin({top:'31lpx'})
88 } 88 }
89 89
90 messageClick(){ 90 messageClick(){
@@ -62,8 +62,7 @@ export function viewBlogInsightIntentShare(context: common.UIAbilityContext, ent @@ -62,8 +62,7 @@ export function viewBlogInsightIntentShare(context: common.UIAbilityContext, ent
62 commentCount: _item?.interactData?.commentNum || 0, 62 commentCount: _item?.interactData?.commentNum || 0,
63 favorites: _item?.interactData?.collectNum || 0, 63 favorites: _item?.interactData?.collectNum || 0,
64 viewCount: _item?.interactData?.readNum || 0, 64 viewCount: _item?.interactData?.readNum || 0,
65 - rankingHint: 99,  
66 - isPublicData: true 65 + rankingHint: 99
67 } 66 }
68 } 67 }
69 insightIntentArray.push(viewBlogInsightIntentItem) 68 insightIntentArray.push(viewBlogInsightIntentItem)
@@ -113,8 +112,7 @@ export function viewBlogItemInsightIntentShare(context: common.UIAbilityContext, @@ -113,8 +112,7 @@ export function viewBlogItemInsightIntentShare(context: common.UIAbilityContext,
113 forwardCount: interactData?.shareNum || 0, 112 forwardCount: interactData?.shareNum || 0,
114 commentCount: interactData?.commentNum || 0, 113 commentCount: interactData?.commentNum || 0,
115 favorites: interactData?.collectNum || 0, 114 favorites: interactData?.collectNum || 0,
116 - rankingHint: 99,  
117 - isPublicData: true 115 + rankingHint: 99
118 } 116 }
119 } 117 }
120 118
@@ -147,8 +145,7 @@ export function viewColumInsightIntentShare(context: common.UIAbilityContext, en @@ -147,8 +145,7 @@ export function viewColumInsightIntentShare(context: common.UIAbilityContext, en
147 activityType: ['RecentViews'], 145 activityType: ['RecentViews'],
148 columnTitle: pageInfoBean?.topicInfo?.title, 146 columnTitle: pageInfoBean?.topicInfo?.title,
149 columnSubTitle: pageInfoBean?.shareSummary, 147 columnSubTitle: pageInfoBean?.shareSummary,
150 - rankingHint: 99,  
151 - isPublicData: true 148 + rankingHint: 99
152 } 149 }
153 } 150 }
154 console.log('yzl viewColumInsightIntentShare', JSON.stringify(viewColumInsightIntentItem)) 151 console.log('yzl viewColumInsightIntentShare', JSON.stringify(viewColumInsightIntentItem))