张善主

Merge remote-tracking branch 'origin/main'

# Conflicts:
#	sight_harmony/features/wdComponent/src/main/ets/components/DynamicDetailComponent.ets
Showing 42 changed files with 559 additions and 374 deletions
@@ -95,6 +95,7 @@ export class ContentDTO implements BaseDTO { @@ -95,6 +95,7 @@ export class ContentDTO implements BaseDTO {
95 extra: string = '' 95 extra: string = ''
96 sameContentList:ContentDTO[] = [] 96 sameContentList:ContentDTO[] = []
97 sameContentListJson:string = "" 97 sameContentListJson:string = ""
  98 + sameContentListSize:number = 0
98 /* 99 /*
99 本地辅助字段 100 本地辅助字段
100 */ 101 */
@@ -32,6 +32,12 @@ export struct CardParser { @@ -32,6 +32,12 @@ export struct CardParser {
32 pageShowTime:number = 0; 32 pageShowTime:number = 0;
33 pageHideTime:number = 0; 33 pageHideTime:number = 0;
34 34
  35 + aboutToAppear(): void {
  36 +
  37 + console.log('CardParser-contentDTO', JSON.stringify(this.contentDTO))
  38 + console.log('CardParser-compDTO', JSON.stringify(this.compDTO))
  39 + }
  40 +
35 onPageShow() { 41 onPageShow() {
36 this.pageShowTime = DateTimeUtils.getTimeStamp() 42 this.pageShowTime = DateTimeUtils.getTimeStamp()
37 } 43 }
@@ -20,6 +20,8 @@ export struct CarderInteraction { @@ -20,6 +20,8 @@ export struct CarderInteraction {
20 @Provide contentDetailData: ContentDetailDTO = {} as ContentDetailDTO 20 @Provide contentDetailData: ContentDetailDTO = {} as ContentDetailDTO
21 @State newsStatusOfUser: batchLikeAndCollectResult = {} as batchLikeAndCollectResult // 点赞、收藏状态 21 @State newsStatusOfUser: batchLikeAndCollectResult = {} as batchLikeAndCollectResult // 点赞、收藏状态
22 @State likeBean: Record<string, string> = {} 22 @State likeBean: Record<string, string> = {}
  23 + @State likesStyle: number | string = 1 // 赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空
  24 + @State openLikes: boolean = false // 是否可以点赞 1:可以 0:不可以
23 25
24 async aboutToAppear() { 26 async aboutToAppear() {
25 await this.getContentDetailData() 27 await this.getContentDetailData()
@@ -32,6 +34,9 @@ export struct CarderInteraction { @@ -32,6 +34,9 @@ export struct CarderInteraction {
32 this.likeBean['channelId'] = this.contentDetailData.reLInfo?.channelId + '' 34 this.likeBean['channelId'] = this.contentDetailData.reLInfo?.channelId + ''
33 this.contentDTO.shareFlag = this.contentDTO.shareFlag?this.contentDTO.shareFlag:'1' 35 this.contentDTO.shareFlag = this.contentDTO.shareFlag?this.contentDTO.shareFlag:'1'
34 console.log('是否显示分享',this.contentDTO.shareFlag) 36 console.log('是否显示分享',this.contentDTO.shareFlag)
  37 + // 内容用 点赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空
  38 + this.likesStyle = this.contentDetailData.likesStyle
  39 + this.openLikes = this.contentDetailData.openLikes == 1 ? true : false
35 } 40 }
36 41
37 build() { 42 build() {
@@ -92,7 +97,7 @@ export struct CarderInteraction { @@ -92,7 +97,7 @@ export struct CarderInteraction {
92 }) 97 })
93 } 98 }
94 } 99 }
95 - .width(42) 100 + .visibility(this.likesStyle == 4 || !this.openLikes ? Visibility.None : Visibility.Visible)
96 } 101 }
97 102
98 /** 103 /**
@@ -52,6 +52,16 @@ export struct CompParser { @@ -52,6 +52,16 @@ export struct CompParser {
52 }) 52 })
53 this.compDTO.operDataList = this.noneAudioItems; 53 this.compDTO.operDataList = this.noneAudioItems;
54 } 54 }
  55 + // 金刚卡屏蔽音频类型稿件
  56 + if (this.compDTO.compStyle === CompStyle.Zh_Grid_Layout_03) {
  57 + this.audioItems = this.compDTO.operDataList.filter(item => {
  58 + return item.objectType === '13' || item.linkUrl.includes('audiotopic')
  59 + })
  60 + this.noneAudioItems = this.compDTO.operDataList.filter(item => {
  61 + return item.objectType !== '13' && !item.linkUrl.includes('audiotopic')
  62 + })
  63 + this.compDTO.operDataList = this.noneAudioItems;
  64 + }
55 } 65 }
56 66
57 build() { 67 build() {
@@ -78,9 +78,15 @@ export struct DynamicDetailComponent { @@ -78,9 +78,15 @@ export struct DynamicDetailComponent {
78 @State publishCommentModel: publishCommentModel = new publishCommentModel() 78 @State publishCommentModel: publishCommentModel = new publishCommentModel()
79 @State reachEndIncreament: number = 0 79 @State reachEndIncreament: number = 0
80 @State operationButtonList: string[] = [] 80 @State operationButtonList: string[] = []
  81 + @State likesStyle: number | string = 1 // 赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空
  82 + @State openLikes: boolean = false // 是否可以点赞 1:可以 0:不可以
  83 +
81 pageParam: ParamType = {} 84 pageParam: ParamType = {}
82 async aboutToAppear() { 85 async aboutToAppear() {
83 await this.getContentDetailData() 86 await this.getContentDetailData()
  87 + // 内容用 点赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空
  88 + this.likesStyle = this.contentDetailData.likesStyle
  89 + this.openLikes = this.contentDetailData.openLikes == 1 ? true : false
84 } 90 }
85 91
86 onPageHide() { 92 onPageHide() {
@@ -536,6 +542,7 @@ export struct DynamicDetailComponent { @@ -536,6 +542,7 @@ export struct DynamicDetailComponent {
536 this.toggleLikeStatus() 542 this.toggleLikeStatus()
537 //内容点赞/取消点赞埋点 543 //内容点赞/取消点赞埋点
538 }) 544 })
  545 + .visibility(this.likesStyle == 4 || !this.openLikes ? Visibility.None : Visibility.Visible)
539 546
540 // 评论 547 // 评论
541 if (this.contentDetailData?.openComment) { 548 if (this.contentDetailData?.openComment) {
@@ -68,6 +68,7 @@ export struct MorningEveningPaperComponent { @@ -68,6 +68,7 @@ export struct MorningEveningPaperComponent {
68 @State topSafeHeight: number = 0; 68 @State topSafeHeight: number = 0;
69 @State bottomSafeHeight: number = 0; 69 @State bottomSafeHeight: number = 0;
70 @State isHasTopView: boolean = false; 70 @State isHasTopView: boolean = false;
  71 + @State scrollOffset: number = 0
71 72
72 private audioDataList: AudioDataList[] = [] 73 private audioDataList: AudioDataList[] = []
73 private playerController: WDPlayerController = new WDPlayerController(); 74 private playerController: WDPlayerController = new WDPlayerController();
@@ -267,24 +268,22 @@ export struct MorningEveningPaperComponent { @@ -267,24 +268,22 @@ export struct MorningEveningPaperComponent {
267 compListItem: this.compListItem, 268 compListItem: this.compListItem,
268 }) 269 })
269 .margin({ 270 .margin({
270 - top: this.pageInfoBean?.topicInfo?.frontLinkObject ? 10 : 44 271 + top: this.isHasTopView ? 10 : 44+this.topSafeHeight
271 }) 272 })
272 } 273 }
273 } 274 }
274 - .height(`calc(100% - ${this.bottomSafeHeight + this.topSafeHeight + 'vp'})`).scrollBar(BarState.Off)  
275 - .onAreaChange((oldValue: Area, newValue: Area) => {  
276 - let persent = Math.abs(Number(newValue.globalPosition.y)) / 150  
277 - if (persent > 1) {  
278 - persent = 1  
279 - } 275 + // .height(`calc(100% - ${this.bottomSafeHeight + this.topSafeHeight + 'vp'})`)
  276 + .scrollBar(BarState.Off)
  277 + .onWillScroll(scrollOffset =>{
  278 + this.scrollOffset = this.scrollOffset + scrollOffset as number
280 }) 279 })
281 280
282 - PaperTitleComponent().margin({top:this.isHasTopView?this.topSafeHeight:0}).backgroundColor(this.mixedBgColor).opacity(this.isHasTopView?0:1) 281 + this.topPaperTitle()
283 } 282 }
284 .width('100%') 283 .width('100%')
285 .height('100%') 284 .height('100%')
286 .padding({ 285 .padding({
287 - top: this.isHasTopView?0:this.topSafeHeight, 286 + top: 0,
288 // bottom: this.bottomSafeHeight 287 // bottom: this.bottomSafeHeight
289 }) 288 })
290 // .backgroundColor(Color.Black) 289 // .backgroundColor(Color.Black)
@@ -293,6 +292,13 @@ export struct MorningEveningPaperComponent { @@ -293,6 +292,13 @@ export struct MorningEveningPaperComponent {
293 } 292 }
294 293
295 @Builder 294 @Builder
  295 + topPaperTitle(){
  296 + Column(){
  297 + PaperTitleComponent().margin({top:this.topSafeHeight})
  298 + }.height(44+this.topSafeHeight).backgroundColor(this.scrollOffset > 100?this.mixedBgColor:'')
  299 + }
  300 +
  301 + @Builder
296 AudioBarView(dialog: CustomDialogController) { 302 AudioBarView(dialog: CustomDialogController) {
297 Row() { 303 Row() {
298 Stack({ alignContent: Alignment.Start }) { 304 Stack({ alignContent: Alignment.Start }) {
@@ -78,8 +78,9 @@ export struct CardMediaInfo { @@ -78,8 +78,9 @@ export struct CardMediaInfo {
78 Text(DateTimeUtils.getFormattedDuration(this.contentDTO.videoInfo.videoDuration * 1000)) 78 Text(DateTimeUtils.getFormattedDuration(this.contentDTO.videoInfo.videoDuration * 1000))
79 .mediaText() 79 .mediaText()
80 .fontFamily('BebasNeue') 80 .fontFamily('BebasNeue')
  81 +
81 } 82 }
82 - } 83 + } .margin({ left: 68,top: 135})
83 } else if (this.contentDTO.objectType === '2') { 84 } else if (this.contentDTO.objectType === '2') {
84 // liveInfo.liveState 直播新闻-直播状态 wait待开播running直播中end已结束cancel已取消paused暂停 85 // liveInfo.liveState 直播新闻-直播状态 wait待开播running直播中end已结束cancel已取消paused暂停
85 // 显示直播信息 86 // 显示直播信息
@@ -77,8 +77,15 @@ export struct Card10Component { @@ -77,8 +77,15 @@ 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: 5 }).margin({ left: 5, bottom: 5 }) 80 + if(this.contentDTO.objectType == '5'){
  81 + Notes({ objectType: this.contentDTO.objectType }).height(30).align(Alignment.Center).margin({ left: 5, bottom: 5 })
  82 + } else {
  83 + if (this.contentDTO.seoTags) {
  84 + Notes({ newTags: this.contentDTO.seoTags }).height(30).align(Alignment.Center)
  85 + }
  86 + if (this.contentDTO.newTags) {
  87 + Notes({ newTags: this.contentDTO.newTags }).height(30).align(Alignment.Center)
  88 + }
82 } 89 }
83 }.alignContent(Alignment.BottomStart) 90 }.alignContent(Alignment.BottomStart)
84 91
@@ -128,8 +135,15 @@ export struct Card10Component { @@ -128,8 +135,15 @@ export struct Card10Component {
128 Row() { 135 Row() {
129 Column() { 136 Column() {
130 Stack() { 137 Stack() {
131 - if (item.objectType == '5') {  
132 - Notes({ objectType: 5 }) 138 + if(this.contentDTO.objectType == '5'){
  139 + Notes({ objectType: this.contentDTO.objectType }).height(30).align(Alignment.Center)
  140 + } else {
  141 + if (this.contentDTO.seoTags) {
  142 + Notes({ newTags: this.contentDTO.seoTags }).height(30).align(Alignment.Center)
  143 + }
  144 + if (this.contentDTO.newTags) {
  145 + Notes({ newTags: this.contentDTO.newTags }).height(30).align(Alignment.Center)
  146 + }
133 } 147 }
134 Text(item.newsTitle) 148 Text(item.newsTitle)
135 .fontSize($r('app.float.font_size_17')) 149 .fontSize($r('app.float.font_size_17'))
@@ -137,7 +151,10 @@ export struct Card10Component { @@ -137,7 +151,10 @@ export struct Card10Component {
137 .fontColor($r('app.color.color_222222')) 151 .fontColor($r('app.color.color_222222'))
138 .maxLines(2) 152 .maxLines(2)
139 .textOverflow({ overflow: TextOverflow.Ellipsis }) 153 .textOverflow({ overflow: TextOverflow.Ellipsis })
140 - .textIndent(item.objectType == '5' ? 38 : 0) 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 )
141 }.alignContent(Alignment.TopStart) 158 }.alignContent(Alignment.TopStart)
142 159
143 //bottom 评论等信息 160 //bottom 评论等信息
@@ -38,10 +38,15 @@ export struct Card11Component { @@ -38,10 +38,15 @@ export struct Card11Component {
38 build() { 38 build() {
39 Column() { 39 Column() {
40 Stack() { 40 Stack() {
  41 + if(this.contentDTO.objectType == '5'){
  42 + Notes({ objectType: this.contentDTO.objectType }).height(30).align(Alignment.Center)
  43 + } else {
  44 + if (this.contentDTO.seoTags) {
  45 + Notes({ newTags: this.contentDTO.seoTags }).height(30).align(Alignment.Center)
  46 + }
41 if (this.contentDTO.newTags) { 47 if (this.contentDTO.newTags) {
42 Notes({ newTags: this.contentDTO.newTags }).height(30).align(Alignment.Center) 48 Notes({ newTags: this.contentDTO.newTags }).height(30).align(Alignment.Center)
43 - } else if (this.contentDTO.objectType == '5') {  
44 - Notes({ objectType: this.contentDTO.objectType }).height(30).align(Alignment.Center) 49 + }
45 } 50 }
46 Text() { 51 Text() {
47 if (this.titleMarked) { 52 if (this.titleMarked) {
@@ -63,9 +68,10 @@ export struct Card11Component { @@ -63,9 +68,10 @@ export struct Card11Component {
63 .maxLines(3) 68 .maxLines(3)
64 .textOverflow({ overflow: TextOverflow.Ellipsis }) 69 .textOverflow({ overflow: TextOverflow.Ellipsis })
65 .width(CommonConstants.FULL_WIDTH) 70 .width(CommonConstants.FULL_WIDTH)
66 - .textIndent(this.contentDTO.newTags?.length < 5 && this.contentDTO.newTags?.length > 2 ? 58 :  
67 - (this.contentDTO.newTags?.length != 0 && this.contentDTO.newTags?.length) ||  
68 - this.contentDTO.objectType == '5' ? 35 : 0) 71 + .textIndent((this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) > 2 &&
  72 + (this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) < 5 ? 58 :
  73 + ((this.contentDTO.newTags?.length > 0 || this.contentDTO.seoTags?.length > 0) || this.contentDTO.objectType == '5') ? 35 :
  74 + 0 )
69 75
70 }.alignContent(Alignment.TopStart) 76 }.alignContent(Alignment.TopStart)
71 77
@@ -200,13 +200,13 @@ struct createImg { @@ -200,13 +200,13 @@ struct createImg {
200 } 200 }
201 } else { 201 } else {
202 GridCol({ 202 GridCol({
203 - span: { xs: 8 } 203 + span: item.landscape === 1 ? 12 : 8
204 }) { 204 }) {
205 Image(this.loadImg ? item.fullUrl : '') 205 Image(this.loadImg ? item.fullUrl : '')
206 .backgroundColor(0xf5f5f5) 206 .backgroundColor(0xf5f5f5)
207 .width('100%') 207 .width('100%')
208 - .borderRadius(this.caclImageRadius(index))  
209 .autoResize(true) 208 .autoResize(true)
  209 + .borderRadius(this.caclImageRadius(index))
210 .opacity(!this.picWidth && !this.picHeight ? 0 : 1) 210 .opacity(!this.picWidth && !this.picHeight ? 0 : 1)
211 .onComplete(callback => { 211 .onComplete(callback => {
212 this.picWidth = callback?.width || 0; 212 this.picWidth = callback?.width || 0;
@@ -36,10 +36,20 @@ export struct Card3Component { @@ -36,10 +36,20 @@ export struct Card3Component {
36 build() { 36 build() {
37 Column() { 37 Column() {
38 Stack() { 38 Stack() {
  39 + // if (this.contentDTO.newTags) {
  40 + // Notes({ newTags: this.contentDTO.newTags }).height(27).align(Alignment.Center)
  41 + // } else if (this.contentDTO.objectType == '5') {
  42 + // Notes({ objectType: this.contentDTO.objectType }).height(27).align(Alignment.Center)
  43 + // }
  44 + if(this.contentDTO.objectType == '5'){
  45 + Notes({ objectType: this.contentDTO.objectType }).height(30).align(Alignment.Center)
  46 + } else {
  47 + if (this.contentDTO.seoTags) {
  48 + Notes({ newTags: this.contentDTO.seoTags }).height(30).align(Alignment.Center)
  49 + }
39 if (this.contentDTO.newTags) { 50 if (this.contentDTO.newTags) {
40 - Notes({ newTags: this.contentDTO.newTags }).height(27).align(Alignment.Center)  
41 - } else if (this.contentDTO.objectType == '5') {  
42 - Notes({ objectType: this.contentDTO.objectType }).height(27).align(Alignment.Center) 51 + Notes({ newTags: this.contentDTO.newTags }).height(30).align(Alignment.Center)
  52 + }
43 } 53 }
44 Text() { 54 Text() {
45 if (this.titleMarked) { 55 if (this.titleMarked) {
@@ -59,9 +69,10 @@ export struct Card3Component { @@ -59,9 +69,10 @@ export struct Card3Component {
59 .fontSize($r("app.float.font_size_18")) 69 .fontSize($r("app.float.font_size_18"))
60 .fontColor(this.clicked ? 0x848484 : $r("app.color.color_222222")) 70 .fontColor(this.clicked ? 0x848484 : $r("app.color.color_222222"))
61 .width(CommonConstants.FULL_WIDTH) 71 .width(CommonConstants.FULL_WIDTH)
62 - .textIndent(this.contentDTO.newTags?.length < 5 && this.contentDTO.newTags?.length > 2 ? 58 :  
63 - (this.contentDTO.newTags?.length != 0 && this.contentDTO.newTags?.length) ||  
64 - this.contentDTO.objectType == '5' ? 35 : 0) 72 + .textIndent((this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) > 2 &&
  73 + (this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) < 5 ? 58 :
  74 + ((this.contentDTO.newTags?.length > 0 || this.contentDTO.seoTags?.length > 0) || this.contentDTO.objectType == '5') ? 35 :
  75 + 0 )
65 }.alignContent(Alignment.TopStart) 76 }.alignContent(Alignment.TopStart)
66 77
67 // 评论等信息 78 // 评论等信息
@@ -46,10 +46,15 @@ export struct Card4Component { @@ -46,10 +46,15 @@ export struct Card4Component {
46 //body 46 //body
47 Column() { 47 Column() {
48 Stack() { 48 Stack() {
  49 + if(this.contentDTO.objectType == '5'){
  50 + Notes({ objectType: this.contentDTO.objectType }).height(19).align(Alignment.Center)
  51 + } else {
  52 + if (this.contentDTO.seoTags) {
  53 + Notes({ newTags: this.contentDTO.seoTags }).height(19).align(Alignment.Center)
  54 + }
49 if (this.contentDTO.newTags) { 55 if (this.contentDTO.newTags) {
50 Notes({ newTags: this.contentDTO.newTags }).height(19).align(Alignment.Center) 56 Notes({ newTags: this.contentDTO.newTags }).height(19).align(Alignment.Center)
51 - } else if (this.contentDTO.objectType == '5') {  
52 - Notes({ objectType: this.contentDTO.objectType }).height(19).align(Alignment.Center) 57 + }
53 } 58 }
54 Text() { 59 Text() {
55 if (this.titleMarked) { 60 if (this.titleMarked) {
@@ -69,9 +74,10 @@ export struct Card4Component { @@ -69,9 +74,10 @@ export struct Card4Component {
69 .fontColor(this.clicked ? 0x848484 : $r('app.color.color_222222')) 74 .fontColor(this.clicked ? 0x848484 : $r('app.color.color_222222'))
70 .maxLines(3) 75 .maxLines(3)
71 .textOverflow({ overflow: TextOverflow.Ellipsis }) 76 .textOverflow({ overflow: TextOverflow.Ellipsis })
72 - .textIndent(this.contentDTO.newTags?.length < 5 && this.contentDTO.newTags?.length > 2 ? 58 :  
73 - (this.contentDTO.newTags?.length != 0 && this.contentDTO.newTags?.length) ||  
74 - this.contentDTO.objectType == '5' ? 30 : 0) 77 + .textIndent((this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) > 2 &&
  78 + (this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) < 5 ? 58 :
  79 + ((this.contentDTO.newTags?.length > 0 || this.contentDTO.seoTags?.length > 0) || this.contentDTO.objectType == '5') ? 35 :
  80 + 0 )
75 }.alignContent(Alignment.TopStart) 81 }.alignContent(Alignment.TopStart)
76 //新闻标题 82 //新闻标题
77 83
@@ -57,10 +57,15 @@ export struct Card5Component { @@ -57,10 +57,15 @@ export struct Card5Component {
57 }) 57 })
58 Row() { 58 Row() {
59 Stack() { 59 Stack() {
  60 + if(this.contentDTO.objectType == '5'){
  61 + Notes({ objectType: this.contentDTO.objectType }).align(Alignment.Center)
  62 + } else {
  63 + if (this.contentDTO.seoTags) {
  64 + Notes({ newTags: this.contentDTO.seoTags }).align(Alignment.Center)
  65 + }
60 if (this.contentDTO.newTags) { 66 if (this.contentDTO.newTags) {
61 - Notes({ newTags: this.contentDTO.newTags })  
62 - } else if (this.contentDTO.objectType == '5') {  
63 - Notes({ objectType: this.contentDTO.objectType }) 67 + Notes({ newTags: this.contentDTO.newTags }).align(Alignment.Center)
  68 + }
64 } 69 }
65 70
66 Text() { 71 Text() {
@@ -83,9 +88,10 @@ export struct Card5Component { @@ -83,9 +88,10 @@ export struct Card5Component {
83 .maxLines(2) 88 .maxLines(2)
84 .align(Alignment.TopStart) 89 .align(Alignment.TopStart)
85 .textOverflow({ overflow: TextOverflow.Ellipsis }) // 超出的部分显示省略号。 90 .textOverflow({ overflow: TextOverflow.Ellipsis }) // 超出的部分显示省略号。
86 - .textIndent(this.contentDTO.newTags?.length < 5 && this.contentDTO.newTags?.length > 2 ? 58 :  
87 - (this.contentDTO.newTags?.length != 0 && this.contentDTO.newTags?.length) ||  
88 - this.contentDTO.objectType == '5' ? 35 : 0) 91 + .textIndent((this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) > 2 &&
  92 + (this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) < 5 ? 58 :
  93 + ((this.contentDTO.newTags?.length > 0 || this.contentDTO.seoTags?.length > 0) || this.contentDTO.objectType == '5') ? 35 :
  94 + 0 )
89 }.alignContent(Alignment.TopStart) 95 }.alignContent(Alignment.TopStart)
90 } 96 }
91 .justifyContent(FlexAlign.Start) 97 .justifyContent(FlexAlign.Start)
@@ -103,8 +103,8 @@ export struct Card6Component { @@ -103,8 +103,8 @@ export struct Card6Component {
103 .width('64%') 103 .width('64%')
104 .height(this.contentDTO.appStyle === CompStyle.Card_13 ? '' : 156) 104 .height(this.contentDTO.appStyle === CompStyle.Card_13 ? '' : 156)
105 105
106 - Stack() {  
107 - Image(this.loadImg ? this.contentDTO.coverUrl : '') 106 + Stack({alignContent: Alignment.BottomEnd}) {
  107 + Image(this.loadImg ? this.contentDTO.coverUrl || this.contentDTO.fullColumnImgUrls?.[0]?.url || this.contentDTO.fullColumnImgUrls?.[0]?.fullUrl : '')
108 .backgroundColor(this.loadImg ? $r('app.color.color_B0B0B0') : 0xf5f5f5) 108 .backgroundColor(this.loadImg ? $r('app.color.color_B0B0B0') : 0xf5f5f5)
109 .borderRadius(5) 109 .borderRadius(5)
110 .aspectRatio(this.contentDTO.appStyle === CompStyle.Card_13 ? 3 / 2 : 3 / 4) 110 .aspectRatio(this.contentDTO.appStyle === CompStyle.Card_13 ? 3 / 2 : 3 / 4)
@@ -88,10 +88,16 @@ export struct Card9Component { @@ -88,10 +88,16 @@ export struct Card9Component {
88 topLeft: $r('app.float.image_border_radius'), 88 topLeft: $r('app.float.image_border_radius'),
89 topRight: $r('app.float.image_border_radius') 89 topRight: $r('app.float.image_border_radius')
90 }) 90 })
91 -  
92 - if (this.contentDTO.objectType == '5') {  
93 - Notes({ objectType: 5 }) 91 + if(this.contentDTO.objectType == '5'){
  92 + Notes({ objectType: this.contentDTO.objectType }).align(Alignment.Center)
94 .margin({ left: 5, bottom: 5 }) 93 .margin({ left: 5, bottom: 5 })
  94 + } else {
  95 + if (this.contentDTO.seoTags) {
  96 + Notes({ newTags: this.contentDTO.seoTags }).align(Alignment.Center)
  97 + }
  98 + if (this.contentDTO.newTags) {
  99 + Notes({ newTags: this.contentDTO.newTags }).align(Alignment.Center)
  100 + }
95 } 101 }
96 102
97 }.alignContent(Alignment.BottomStart) 103 }.alignContent(Alignment.BottomStart)
1 /** 1 /**
2 * More_Comp 2 * More_Comp
3 */ 3 */
4 -import { ContentDTO } from 'wdBean/Index'; 4 +import { ContentDTO , contentListParams, FullColumnImgUrlDTO,
  5 +} from 'wdBean/Index';
  6 +import MinePageDatasModel from '../../model/MinePageDatasModel';
  7 +import SearcherAboutDataModel from '../../model/SearcherAboutDataModel';
  8 +import { SearchDescription } from '../../viewmodel/SearchResultContentItem';
5 9
6 const TAG: string = 'More_Comp'; 10 const TAG: string = 'More_Comp';
7 11
@@ -10,17 +14,89 @@ const TAG: string = 'More_Comp'; @@ -10,17 +14,89 @@ const TAG: string = 'More_Comp';
10 export struct MoreComponent { 14 export struct MoreComponent {
11 @State contentDTO: ContentDTO = new ContentDTO(); 15 @State contentDTO: ContentDTO = new ContentDTO();
12 16
  17 + aboutToAppear(): void {
  18 + this.dealSearchSameList()
  19 + }
  20 +
13 build() { 21 build() {
14 Row() { 22 Row() {
15 Text('点击展开更多相似') 23 Text('点击展开更多相似')
16 .fontSize(16) 24 .fontSize(16)
  25 + Text(`(${this.contentDTO.sameContentListSize})`)
  26 + .fontSize(16)
17 Image($r('app.media.comment_unfold')) 27 Image($r('app.media.comment_unfold'))
18 .width(16) 28 .width(16)
19 .height(16) 29 .height(16)
  30 +
20 } 31 }
21 .justifyContent(FlexAlign.Center) 32 .justifyContent(FlexAlign.Center)
22 .width('100%') 33 .width('100%')
23 .height(48) 34 .height(48)
24 .backgroundColor(0xffffff) 35 .backgroundColor(0xffffff)
25 } 36 }
  37 +
  38 + dealSearchSameList() {
  39 + let resultData : SearchDescription[] = JSON.parse(this.contentDTO.sameContentListJson) as SearchDescription[]
  40 +
  41 + let data: contentListParams = {
  42 + contentList: []
  43 + }
  44 + resultData.forEach((item) => {
  45 + data.contentList.push({
  46 + contentId: item.id + '',
  47 + contentType: Number.parseInt(item.type)
  48 + })
  49 + })
  50 +
  51 + SearcherAboutDataModel.getInteractListData(data, getContext(this)).then((newValue) => {
  52 + newValue.forEach((item) => {
  53 + resultData.forEach((data) => {
  54 + if (item.contentId == data.id) {
  55 + data.collectNum = item.collectNum + ""
  56 + data.commentNum = item.commentNum + ""
  57 + data.likeNum = item.likeNum + ""
  58 + data.readNum = item.readNum + ""
  59 + data.shareNum = item.shareNum + ""
  60 + }
  61 + })
  62 + })
  63 + // 批量号主信息
  64 + let creatorIdList: string[] = []
  65 + resultData.forEach((value:SearchDescription) => {
  66 + creatorIdList.push(value.creatorId)
  67 + })
  68 + SearcherAboutDataModel.getCreatorDetailListData({creatorIdList:creatorIdList}).then((rem) => {
  69 + resultData.forEach((value: SearchDescription) => {
  70 + const landscape = value.landscape
  71 + let photos: FullColumnImgUrlDTO[] = []
  72 + value.appStyleImages.split("&&").forEach((value) => {
  73 + let resizeParams = MinePageDatasModel.extractResizeParams(value)
  74 + if(resizeParams && resizeParams.length === 2){
  75 + photos.push(
  76 + {
  77 + fullUrl: value,
  78 + weight:resizeParams[0],
  79 + height:resizeParams[1],
  80 + landscape: Number(landscape),
  81 + } as FullColumnImgUrlDTO
  82 + )
  83 + }
  84 + })
  85 + let contentDTO = MinePageDatasModel.dataTransform(rem,value, photos);
  86 + if(value.type != "13"){
  87 + this.contentDTO.sameContentList.push(contentDTO)
  88 + console.log("ycg","123")
  89 + }
  90 + })
  91 + }).catch((err: Error) => {
  92 + console.log(TAG, JSON.stringify(err))
  93 + })
  94 + }).catch((err: Error) => {
  95 + console.log(TAG, "请求失败")
  96 + })
  97 +
  98 + }
  99 +
26 } 100 }
  101 +
  102 +
@@ -15,6 +15,7 @@ export struct CommentCustomDialog { @@ -15,6 +15,7 @@ export struct CommentCustomDialog {
15 @State private emojiSwitch: boolean = false 15 @State private emojiSwitch: boolean = false
16 textInputController: TextAreaController = new TextAreaController() 16 textInputController: TextAreaController = new TextAreaController()
17 @State positionInfo: CaretOffset = { index: 0, x: 0, y: 0 } 17 @State positionInfo: CaretOffset = { index: 0, x: 0, y: 0 }
  18 + @State publishButtonOpacity: number = 0.5
18 19
19 aboutToAppear(): void { 20 aboutToAppear(): void {
20 } 21 }
@@ -55,8 +56,15 @@ export struct CommentCustomDialog { @@ -55,8 +56,15 @@ export struct CommentCustomDialog {
55 .height('100%') 56 .height('100%')
56 .width('100%') 57 .width('100%')
57 .backgroundColor($r('app.color.color_transparent')) 58 .backgroundColor($r('app.color.color_transparent'))
  59 + .caretColor("#ED2800")
58 .onChange(value => { 60 .onChange(value => {
59 this.publishCommentModel.commentContent = value; 61 this.publishCommentModel.commentContent = value;
  62 +
  63 + if (value.length > 0) {
  64 + this.publishButtonOpacity = 1.0
  65 + } else {
  66 + this.publishButtonOpacity = 0.5
  67 + }
60 }) 68 })
61 .onFocus(() => { 69 .onFocus(() => {
62 if (this.emojiSwitch) { 70 if (this.emojiSwitch) {
@@ -98,13 +106,14 @@ export struct CommentCustomDialog { @@ -98,13 +106,14 @@ export struct CommentCustomDialog {
98 106
99 Row() { 107 Row() {
100 Text('发布') 108 Text('发布')
101 - .backgroundColor('#F89381') 109 + .backgroundColor("#ED2800")
102 .width(80) 110 .width(80)
103 .height(30) 111 .height(30)
104 .fontSize(15) 112 .fontSize(15)
105 .fontColor(Color.White) 113 .fontColor(Color.White)
106 .textAlign(TextAlign.Center) 114 .textAlign(TextAlign.Center)
107 .borderRadius(4) 115 .borderRadius(4)
  116 + .opacity(this.publishButtonOpacity)
108 .onClick(() => { 117 .onClick(() => {
109 if (this.publishCommentModel.commentContent.length > 0) { 118 if (this.publishCommentModel.commentContent.length > 0) {
110 //请求评论接口 119 //请求评论接口
@@ -37,21 +37,21 @@ export struct QualityCommentsComponent { @@ -37,21 +37,21 @@ export struct QualityCommentsComponent {
37 aboutToDisappear(): void { 37 aboutToDisappear(): void {
38 // windowClass.setWindowSystemBarProperties({ statusBarColor: '#000' }) 38 // windowClass.setWindowSystemBarProperties({ statusBarColor: '#000' })
39 this.dialogController = null // 将dialogController置空 39 this.dialogController = null // 将dialogController置空
40 - WindowModel.shared.setWindowLayoutFullScreen(false) 40 + // WindowModel.shared.setWindowLayoutFullScreen(false)
41 } 41 }
42 42
43 onPageShow(): void { 43 onPageShow(): void {
44 - WindowModel.shared.setWindowLayoutFullScreen(true) 44 + // WindowModel.shared.setWindowLayoutFullScreen(true)
45 } 45 }
46 46
47 onPageHide(): void { 47 onPageHide(): void {
48 - WindowModel.shared.setWindowLayoutFullScreen(false) 48 + // WindowModel.shared.setWindowLayoutFullScreen(false)
49 } 49 }
50 50
51 aboutToAppear(): void { 51 aboutToAppear(): void {
52 this.getData(); 52 this.getData();
53 this.showAlert() 53 this.showAlert()
54 - WindowModel.shared.setWindowLayoutFullScreen(true) 54 + // WindowModel.shared.setWindowLayoutFullScreen(true)
55 } 55 }
56 56
57 showAlert() { 57 showAlert() {
@@ -106,6 +106,7 @@ export struct QualityCommentsComponent { @@ -106,6 +106,7 @@ export struct QualityCommentsComponent {
106 Image($r('app.media.comment_img_banner')).width('100%') 106 Image($r('app.media.comment_img_banner')).width('100%')
107 .height(283) 107 .height(283)
108 // .aspectRatio(375 / 283); 108 // .aspectRatio(375 / 283);
  109 + .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP])
109 } 110 }
110 .onAreaChange((oldValue: Area, newValue: Area) => { 111 .onAreaChange((oldValue: Area, newValue: Area) => {
111 if (Number(oldValue.globalPosition.y) == 0 && Number(newValue.globalPosition.y) > 30) { 112 if (Number(oldValue.globalPosition.y) == 0 && Number(newValue.globalPosition.y) > 30) {
@@ -156,13 +157,15 @@ export struct QualityCommentsComponent { @@ -156,13 +157,15 @@ export struct QualityCommentsComponent {
156 /*导航栏*/ 157 /*导航栏*/
157 @Builder 158 @Builder
158 TabbarNormal() { 159 TabbarNormal() {
159 - Column() { 160 + Stack({ alignContent: Alignment.Top }) {
160 Row() { 161 Row() {
161 } 162 }
162 .width('100%') 163 .width('100%')
163 .height(px2vp(this.topSafeHeight)) 164 .height(px2vp(this.topSafeHeight))
164 .backgroundColor($r('app.color.white')) 165 .backgroundColor($r('app.color.white'))
165 .opacity(this.tileOpacity) 166 .opacity(this.tileOpacity)
  167 + .visibility(this.tileOpacity > 0 ? 0 : 1)
  168 + .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP])
166 169
167 Stack({ alignContent: Alignment.Start }) { 170 Stack({ alignContent: Alignment.Start }) {
168 Row() { 171 Row() {
@@ -218,6 +221,7 @@ export struct QualityCommentsComponent { @@ -218,6 +221,7 @@ export struct QualityCommentsComponent {
218 .scrollBar(BarState.Off) 221 .scrollBar(BarState.Off)
219 .edgeEffect(EdgeEffect.None) 222 .edgeEffect(EdgeEffect.None)
220 223
  224 + .clip(false)
221 // this.TabbarTransparent() 225 // this.TabbarTransparent()
222 this.TabbarNormal() 226 this.TabbarNormal()
223 } 227 }
@@ -253,10 +257,11 @@ export struct QualityCommentsComponent { @@ -253,10 +257,11 @@ export struct QualityCommentsComponent {
253 this.currentPage++ 257 this.currentPage++
254 this.getData() 258 this.getData()
255 }) 259 })
256 - .margin({ top: 196 }) 260 + .margin({ top: 196 - px2vp(this.topSafeHeight) })
257 .height("100%") 261 .height("100%")
258 .width("100%") 262 .width("100%")
259 .edgeEffect(EdgeEffect.None) // 必须设置列表为滑动到边缘无效果 263 .edgeEffect(EdgeEffect.None) // 必须设置列表为滑动到边缘无效果
  264 + .scrollBar(BarState.Off)
260 .nestedScroll({ 265 .nestedScroll({
261 scrollForward: NestedScrollMode.PARENT_FIRST, 266 scrollForward: NestedScrollMode.PARENT_FIRST,
262 scrollBackward: NestedScrollMode.SELF_FIRST 267 scrollBackward: NestedScrollMode.SELF_FIRST
@@ -405,7 +410,7 @@ struct QualityCommentItem { @@ -405,7 +410,7 @@ struct QualityCommentItem {
405 410
406 if (this.item.api_authIcon && this.item.api_authIcon.length > 0) { 411 if (this.item.api_authIcon && this.item.api_authIcon.length > 0) {
407 Image(this.item.api_authIcon) // 加v 412 Image(this.item.api_authIcon) // 加v
408 - .width(12).height(12) 413 + .width(14).height(14)
409 .objectFit(ImageFit.Cover) 414 .objectFit(ImageFit.Cover)
410 } 415 }
411 }.width(50).height(50) 416 }.width(50).height(50)
@@ -73,13 +73,19 @@ export struct ZhGridLayout03 { @@ -73,13 +73,19 @@ export struct ZhGridLayout03 {
73 bottom:11 73 bottom:11
74 }) 74 })
75 .textOverflow({ overflow: TextOverflow.Ellipsis }) 75 .textOverflow({ overflow: TextOverflow.Ellipsis })
  76 +
76 } 77 }
77 .width('100%') 78 .width('100%')
78 .onClick((event: ClickEvent) => { 79 .onClick((event: ClickEvent) => {
  80 + console.log('333rt',JSON.stringify(item))
79 InfomationCardClick.track(this.compDTO, item, this.pageId, this.pageName) 81 InfomationCardClick.track(this.compDTO, item, this.pageId, this.pageName)
80 if (item.objectType === '11') { 82 if (item.objectType === '11') {
  83 + ProcessUtils.jumpExternalWebPage
81 ProcessUtils.jumpChannelTab(item.objectId, item.pageId, item.newsTitle) 84 ProcessUtils.jumpChannelTab(item.objectId, item.pageId, item.newsTitle)
82 - } else { 85 + } else if(item.objectType === '6'){
  86 + ProcessUtils.jumpExternalWebPage(item.linkUrl)
  87 + //ProcessUtils.gotoWeb(item);
  88 + }else{
83 ProcessUtils.processPage(item) 89 ProcessUtils.processPage(item)
84 } 90 }
85 }) 91 })
1 import { ContentDTO } from 'wdBean/Index' 1 import { ContentDTO } from 'wdBean/Index'
2 import { StringUtils, UserDataLocal } from 'wdKit/Index' 2 import { StringUtils, UserDataLocal } from 'wdKit/Index'
3 -import { ProcessUtils } from 'wdRouter/Index'  
4 import MinePageDatasModel from '../../../model/MinePageDatasModel' 3 import MinePageDatasModel from '../../../model/MinePageDatasModel'
5 import { CommentLikeOperationRequestItem } from '../../../viewmodel/CommentLikeOperationRequestItem' 4 import { CommentLikeOperationRequestItem } from '../../../viewmodel/CommentLikeOperationRequestItem'
6 import { CommentListItem } from '../../../viewmodel/CommentListItem' 5 import { CommentListItem } from '../../../viewmodel/CommentListItem'
7 import measure from '@ohos.measure' 6 import measure from '@ohos.measure'
8 -import { TrackingContent, TrackConstants, TrackParamConvert } from 'wdTracking/Index'  
9 7
10 @Component 8 @Component
11 export struct ChildCommentComponent { 9 export struct ChildCommentComponent {
@@ -16,8 +14,6 @@ export struct ChildCommentComponent { @@ -16,8 +14,6 @@ export struct ChildCommentComponent {
16 @State isExpandParent: boolean = false; 14 @State isExpandParent: boolean = false;
17 @State isOverLines: boolean = false 15 @State isOverLines: boolean = false
18 @State isOverLinesParent: boolean = false 16 @State isOverLinesParent: boolean = false
19 - testText:string = "1,因为读书的人\n是低着头向上看的人\n身处一隅,却能放眼世界\n2,因为读书的人\n总是比不读书的人\n活得有趣一点\n3,因为读书的人\n即使平凡,绝不平庸"  
20 - @Link fromPage:number  
21 17
22 build() { 18 build() {
23 Column() { 19 Column() {
@@ -196,15 +192,6 @@ export struct ChildCommentComponent { @@ -196,15 +192,6 @@ export struct ChildCommentComponent {
196 192
197 }.height('69lpx') 193 }.height('69lpx')
198 .justifyContent(FlexAlign.Center) 194 .justifyContent(FlexAlign.Center)
199 - .onClick(() => {  
200 - let content = getParams(this.data)  
201 - if(this.fromPage === 0 ){  
202 - TrackingContent.common(TrackConstants.EventType.Click,TrackConstants.PageName.Main_Personal,TrackConstants.PageName.Main_Personal,TrackParamConvert.program(content))  
203 - }else{  
204 - TrackingContent.common(TrackConstants.EventType.Click,TrackConstants.PageName.Customer_Personal,TrackConstants.PageName.Customer_Personal,TrackParamConvert.program(content))  
205 - }  
206 - ProcessUtils.processPage(content)  
207 - })  
208 } 195 }
209 .margin({ top: '19lpx', bottom: '31lpx', left: '31lpx', right: '31lpx' }) 196 .margin({ top: '19lpx', bottom: '31lpx', left: '31lpx', right: '31lpx' })
210 .padding({ left: '23lpx' }) 197 .padding({ left: '23lpx' })
@@ -10,6 +10,7 @@ import { OtherUserCommentLikeStatusRequestItem } from '../../../viewmodel/OtherU @@ -10,6 +10,7 @@ import { OtherUserCommentLikeStatusRequestItem } from '../../../viewmodel/OtherU
10 import { CustomPullToRefresh } from '../../reusable/CustomPullToRefresh'; 10 import { CustomPullToRefresh } from '../../reusable/CustomPullToRefresh';
11 import { ContentDTO } from 'wdBean/Index'; 11 import { ContentDTO } from 'wdBean/Index';
12 import { TrackingContent, TrackConstants, TrackParamConvert } from 'wdTracking/Index'; 12 import { TrackingContent, TrackConstants, TrackParamConvert } from 'wdTracking/Index';
  13 +import { ProcessUtils } from 'wdRouter/Index';
13 14
14 const TAG = "HomePageBottomCommentComponent" 15 const TAG = "HomePageBottomCommentComponent"
15 16
@@ -85,10 +86,15 @@ export struct HomePageBottomCommentComponent { @@ -85,10 +86,15 @@ export struct HomePageBottomCommentComponent {
85 ChildCommentComponent({ 86 ChildCommentComponent({
86 data: item, 87 data: item,
87 levelHead: UserDataLocal.getUserLevelHeaderUrl(), 88 levelHead: UserDataLocal.getUserLevelHeaderUrl(),
88 - isLastItem: index === this.data_comment.totalCount() - 1,  
89 - fromPage:0 89 + isLastItem: index === this.data_comment.totalCount() - 1
90 }) 90 })
91 - }.onVisibleAreaChange([0.0, 1.0], (isVisible: boolean, currentRatio: number) => { 91 + }
  92 + .onClick(()=>{
  93 + let content = getParams(item)
  94 + TrackingContent.common(TrackConstants.EventType.Click,TrackConstants.PageName.Main_Personal,TrackConstants.PageName.Main_Personal,TrackParamConvert.program(content))
  95 + ProcessUtils.processPage(content)
  96 + })
  97 + .onVisibleAreaChange([0.0, 1.0], (isVisible: boolean, currentRatio: number) => {
92 if (isVisible) { 98 if (isVisible) {
93 let contentDTO = getParams(item) 99 let contentDTO = getParams(item)
94 TrackingContent.common(TrackConstants.EventType.Show, TrackConstants.PageName.Main_Personal,TrackConstants.PageName.Main_Personal, TrackParamConvert.program(contentDTO)) 100 TrackingContent.common(TrackConstants.EventType.Show, TrackConstants.PageName.Main_Personal,TrackConstants.PageName.Main_Personal, TrackParamConvert.program(contentDTO))
@@ -10,6 +10,7 @@ import { EmptyComponent } from '../../view/EmptyComponent'; @@ -10,6 +10,7 @@ import { EmptyComponent } from '../../view/EmptyComponent';
10 import { CustomPullToRefresh } from '../../reusable/CustomPullToRefresh'; 10 import { CustomPullToRefresh } from '../../reusable/CustomPullToRefresh';
11 import { ContentDTO } from 'wdBean/Index'; 11 import { ContentDTO } from 'wdBean/Index';
12 import { TrackingContent, TrackConstants, TrackParamConvert } from 'wdTracking/Index'; 12 import { TrackingContent, TrackConstants, TrackParamConvert } from 'wdTracking/Index';
  13 +import { ProcessUtils } from 'wdRouter/Index';
13 14
14 const TAG = "HomePageBottomComponent" 15 const TAG = "HomePageBottomComponent"
15 /** 16 /**
@@ -87,9 +88,13 @@ export struct OtherHomePageBottomCommentComponent { @@ -87,9 +88,13 @@ export struct OtherHomePageBottomCommentComponent {
87 data: item, 88 data: item,
88 levelHead: this.levelHead, 89 levelHead: this.levelHead,
89 isLastItem: index === this.data_comment.totalCount() - 1, 90 isLastItem: index === this.data_comment.totalCount() - 1,
90 - fromPage:1  
91 }) 91 })
92 - }.onVisibleAreaChange([0.0, 1.0], (isVisible: boolean, currentRatio: number) => { 92 + }
  93 + .onClick(()=>{
  94 + let content = getParams(item)
  95 + TrackingContent.common(TrackConstants.EventType.Click,TrackConstants.PageName.Customer_Personal,TrackConstants.PageName.Customer_Personal,TrackParamConvert.program(content))
  96 + ProcessUtils.processPage(content)
  97 + }).onVisibleAreaChange([0.0, 1.0], (isVisible: boolean, currentRatio: number) => {
93 if (isVisible) { 98 if (isVisible) {
94 let contentDTO = getParams(item) 99 let contentDTO = getParams(item)
95 TrackingContent.common(TrackConstants.EventType.Show, TrackConstants.PageName.Customer_Personal,TrackConstants.PageName.Customer_Personal, TrackParamConvert.program(contentDTO)) 100 TrackingContent.common(TrackConstants.EventType.Show, TrackConstants.PageName.Customer_Personal,TrackConstants.PageName.Customer_Personal, TrackParamConvert.program(contentDTO))
@@ -438,7 +438,7 @@ export struct PaperSingleColumn999CardView { @@ -438,7 +438,7 @@ export struct PaperSingleColumn999CardView {
438 Stack({ alignContent: Alignment.BottomEnd }) { 438 Stack({ alignContent: Alignment.BottomEnd }) {
439 Image(this.item?.coverUrl) 439 Image(this.item?.coverUrl)
440 .borderRadius(5) 440 .borderRadius(5)
441 - .aspectRatio(16 / 9) 441 + .aspectRatio(319 / 179) ///图片设计比例
442 .padding({ top: 10 }) 442 .padding({ top: 10 })
443 if (this.item?.videoInfo) { 443 if (this.item?.videoInfo) {
444 Row() { 444 Row() {
@@ -5,11 +5,11 @@ import { QualityCommentsComponent } from '../comment/view/QualityCommentsCompone @@ -5,11 +5,11 @@ import { QualityCommentsComponent } from '../comment/view/QualityCommentsCompone
5 @Component 5 @Component
6 struct QualityCommentsPage { 6 struct QualityCommentsPage {
7 onPageShow(): void { 7 onPageShow(): void {
8 - WindowModel.shared.setWindowLayoutFullScreen(true) 8 + // WindowModel.shared.setWindowLayoutFullScreen(true)
9 } 9 }
10 10
11 onPageHide(): void { 11 onPageHide(): void {
12 - WindowModel.shared.setWindowLayoutFullScreen(false) 12 + // WindowModel.shared.setWindowLayoutFullScreen(false)
13 } 13 }
14 14
15 build() { 15 build() {
@@ -9,6 +9,7 @@ import { AssignChannelParam } from 'wdRouter/src/main/ets/utils/HomeChannelUtils @@ -9,6 +9,7 @@ import { AssignChannelParam } from 'wdRouter/src/main/ets/utils/HomeChannelUtils
9 import { PeopleShipMainComponent } from '../peopleShip/PeopleShipMainComponent'; 9 import { PeopleShipMainComponent } from '../peopleShip/PeopleShipMainComponent';
10 import { channelSkeleton } from '../skeleton/channelSkeleton'; 10 import { channelSkeleton } from '../skeleton/channelSkeleton';
11 import { TrackConstants, TrackingButton } from 'wdTracking/Index'; 11 import { TrackConstants, TrackingButton } from 'wdTracking/Index';
  12 +import DailyPaperTopicModel from '../../model/DailyPaperTopicModel'
12 13
13 const TAG = 'TopNavigationComponent'; 14 const TAG = 'TopNavigationComponent';
14 15
@@ -170,13 +171,7 @@ export struct TopNavigationComponentNew { @@ -170,13 +171,7 @@ export struct TopNavigationComponentNew {
170 .height(30) 171 .height(30)
171 .width(124) 172 .width(124)
172 .onClick(() => { 173 .onClick(() => {
173 - if (NetworkUtil.isNetConnected()) {  
174 - ProcessUtils.gotoMorningEveningPaper()  
175 - TrackingButton.click('morning_evening_news_click', TrackConstants.SummaryType.MorningAndEveningNews,  
176 - TrackConstants.SummaryType.MorningAndEveningNews)  
177 - } else {  
178 - ToastUtils.showToast('网络出小差了,请检查网络后重试', 1000)  
179 - } 174 + this.clickMorningEveningPaper()
180 }) 175 })
181 }.width('100%') 176 }.width('100%')
182 .justifyContent(FlexAlign.SpaceBetween) 177 .justifyContent(FlexAlign.SpaceBetween)
@@ -621,4 +616,21 @@ export struct TopNavigationComponentNew { @@ -621,4 +616,21 @@ export struct TopNavigationComponentNew {
621 this.indicatorWidth = width 616 this.indicatorWidth = width
622 }) 617 })
623 } 618 }
  619 +
  620 + clickMorningEveningPaper(){
  621 + if (NetworkUtil.isNetConnected()) {
  622 + DailyPaperTopicModel.getDailyPaperTopic().then(dailyPaperTopicBean =>{
  623 + if (dailyPaperTopicBean && dailyPaperTopicBean.id > 0) {
  624 + SPHelper.default.saveSync('dailyPaperTopicPageId', dailyPaperTopicBean.id);
  625 + ProcessUtils.gotoMorningEveningPaper()
  626 + TrackingButton.click('morning_evening_news_click',TrackConstants.SummaryType.MorningAndEveningNews,TrackConstants.SummaryType.MorningAndEveningNews)
  627 + }else {
  628 + ToastUtils.showToast('暂无早晚报信息', 1000)
  629 + }
  630 + }).catch()
  631 + } else {
  632 + ToastUtils.showToast('网络出小差了,请检查网络后重试', 1000)
  633 + }
  634 + }
  635 +
624 } 636 }
@@ -7,7 +7,6 @@ @@ -7,7 +7,6 @@
7 import { SPHelper } from 'wdKit/Index' 7 import { SPHelper } from 'wdKit/Index'
8 import { WDRouterPage, WDRouterRule } from 'wdRouter' 8 import { WDRouterPage, WDRouterRule } from 'wdRouter'
9 import { TrackingButton, TrackConstants } from 'wdTracking/Index' 9 import { TrackingButton, TrackConstants } from 'wdTracking/Index'
10 -import DailyPaperTopicModel from '../../model/DailyPaperTopicModel'  
11 import SearcherAboutDataModel from '../../model/SearcherAboutDataModel' 10 import SearcherAboutDataModel from '../../model/SearcherAboutDataModel'
12 11
13 const TAG = "FirstTabTopSearchComponent" 12 const TAG = "FirstTabTopSearchComponent"
@@ -19,10 +18,6 @@ export struct FirstTabTopSearchComponent { @@ -19,10 +18,6 @@ export struct FirstTabTopSearchComponent {
19 18
20 async aboutToAppear() { 19 async aboutToAppear() {
21 this.getSearchHint() 20 this.getSearchHint()
22 - let dailyPaperTopicBean = await DailyPaperTopicModel.getDailyPaperTopic()  
23 - if (dailyPaperTopicBean) {  
24 - SPHelper.default.saveSync('dailyPaperTopicPageId', dailyPaperTopicBean.id);  
25 - }  
26 } 21 }
27 22
28 getSearchHint() { 23 getSearchHint() {
@@ -188,39 +188,37 @@ export struct SearchResultContentComponent { @@ -188,39 +188,37 @@ export struct SearchResultContentComponent {
188 resultData.list.forEach((value:SearchResultContentItem) => { 188 resultData.list.forEach((value:SearchResultContentItem) => {
189 creatorIdList.push(value.data.creatorId) 189 creatorIdList.push(value.data.creatorId)
190 }) 190 })
191 - let isRemain : boolean = false  
192 SearcherAboutDataModel.getCreatorDetailListData({creatorIdList:creatorIdList}).then((rem) => { 191 SearcherAboutDataModel.getCreatorDetailListData({creatorIdList:creatorIdList}).then((rem) => {
193 resultData.list.forEach((value: SearchResultContentItem) => { 192 resultData.list.forEach((value: SearchResultContentItem) => {
194 const landscape = value.data.landscape 193 const landscape = value.data.landscape
195 let photos: FullColumnImgUrlDTO[] = [] 194 let photos: FullColumnImgUrlDTO[] = []
196 // if (value.data.appStyle === 4) { 195 // if (value.data.appStyle === 4) {
197 value.data.appStyleImages.split("&&").forEach((value) => { 196 value.data.appStyleImages.split("&&").forEach((value) => {
198 - const resizeParams = this.extractResizeParams(value) 197 + let resizeParams = MinePageDatasModel.extractResizeParams(value)
  198 + if(resizeParams && resizeParams.length === 2){
199 photos.push( 199 photos.push(
200 { 200 {
201 fullUrl: value, 201 fullUrl: value,
202 - weight:resizeParams.width,  
203 - height:resizeParams.height, 202 + weight:resizeParams[0],
  203 + height:resizeParams[1],
204 landscape: Number(landscape), 204 landscape: Number(landscape),
205 } as FullColumnImgUrlDTO 205 } as FullColumnImgUrlDTO
206 ) 206 )
  207 + }
207 }) 208 })
208 // } 209 // }
209 let contentDTO = this.dataTransform(rem,value, photos); 210 let contentDTO = this.dataTransform(rem,value, photos);
210 if(value.data.type != "13"){ 211 if(value.data.type != "13"){
211 - this.tempList.push(contentDTO) 212 + this.data.push(contentDTO)
212 if(value.data.sameContentList != null && value.data.sameContentList.length > 0) { 213 if(value.data.sameContentList != null && value.data.sameContentList.length > 0) {
213 let contentDTO2 = new ContentDTO(); 214 let contentDTO2 = new ContentDTO();
214 contentDTO2.sameContentListJson = JSON.stringify(value.data.sameContentList) 215 contentDTO2.sameContentListJson = JSON.stringify(value.data.sameContentList)
215 - isRemain = true  
216 - this.tempList.push(contentDTO2) 216 + contentDTO2.sameContentListSize = value.data.sameContentList.length
  217 + this.data.push(contentDTO2)
217 } 218 }
218 } 219 }
219 }) 220 })
220 - if(!isRemain){  
221 - this.tempList.forEach((value) => {  
222 - this.data.push(value)  
223 - }) 221 +
224 this.tempList = [] 222 this.tempList = []
225 this.data.notifyDataReload() 223 this.data.notifyDataReload()
226 this.count = this.data.totalCount() 224 this.count = this.data.totalCount()
@@ -230,9 +228,6 @@ export struct SearchResultContentComponent { @@ -230,9 +228,6 @@ export struct SearchResultContentComponent {
230 this.hasMore = false 228 this.hasMore = false
231 } 229 }
232 this.isLoading = false 230 this.isLoading = false
233 - }else{  
234 - this.dealSameContent(resultData.totalCount)  
235 - }  
236 }).catch((err: Error) => { 231 }).catch((err: Error) => {
237 console.log(TAG, JSON.stringify(err)) 232 console.log(TAG, JSON.stringify(err))
238 }) 233 })
@@ -243,65 +238,6 @@ export struct SearchResultContentComponent { @@ -243,65 +238,6 @@ export struct SearchResultContentComponent {
243 }) 238 })
244 } 239 }
245 240
246 - async dealSameContent(count:number){  
247 - this.tempList.forEach(async (tempValue) => {  
248 - if(StringUtils.isNotEmpty(tempValue.sameContentListJson)){  
249 - let data: contentListParams = {  
250 - contentList: []  
251 - }  
252 - let resultData : SearchDescription[] = JSON.parse(tempValue.sameContentListJson) as SearchDescription[]  
253 - if(resultData!=null){  
254 - resultData.forEach((item) => {  
255 - data.contentList.push({  
256 - contentId: item.id + '',  
257 - contentType: Number.parseInt(item.type)  
258 - })  
259 - })  
260 -  
261 - let newValue = await SearcherAboutDataModel.getInteractListData(data, getContext(this))  
262 - newValue.forEach((item) => {  
263 - resultData.forEach((data) => {  
264 - if (item.contentId == data.id) {  
265 - data.collectNum = item.collectNum + ""  
266 - data.commentNum = item.commentNum + ""  
267 - data.likeNum = item.likeNum + ""  
268 - data.readNum = item.readNum + ""  
269 - data.shareNum = item.shareNum + ""  
270 - }  
271 - })  
272 - })  
273 - let creatorIdList: string[] = []  
274 - resultData.forEach((value:SearchDescription) => {  
275 - creatorIdList.push(value.creatorId)  
276 - })  
277 - let rem = await SearcherAboutDataModel.getCreatorDetailListData({creatorIdList:creatorIdList})  
278 - resultData.forEach((value) => {  
279 - let photos: FullColumnImgUrlDTO[] = []  
280 - value.appStyleImages.split("&&").forEach((value) => {  
281 - const resizeParams = this.extractResizeParams(value)  
282 - photos.push({ fullUrl: value,weight:resizeParams.width,height:resizeParams.height, } as FullColumnImgUrlDTO)  
283 - })  
284 - let contentDTO = this.dataTransform2(rem,value, photos);  
285 - tempValue.sameContentList.push(contentDTO)  
286 - })  
287 - }  
288 - }  
289 - })  
290 -  
291 - this.tempList.forEach((value) => {  
292 - this.data.push(value)  
293 - })  
294 - this.tempList = []  
295 - this.data.notifyDataReload()  
296 - this.count = this.data.totalCount()  
297 - if (this.count < count) {  
298 - this.curPageNum++  
299 - } else {  
300 - this.hasMore = false  
301 - }  
302 - this.isLoading = false  
303 - }  
304 -  
305 build() { 241 build() {
306 Column() { 242 Column() {
307 if (this.count == 0) { 243 if (this.count == 0) {
@@ -326,7 +262,7 @@ export struct SearchResultContentComponent { @@ -326,7 +262,7 @@ export struct SearchResultContentComponent {
326 Column() { 262 Column() {
327 if (this.searchType == "activity") { 263 if (this.searchType == "activity") {
328 ActivityItemComponent({ contentDTO: item }) 264 ActivityItemComponent({ contentDTO: item })
329 - }else if(item.sameContentList != null && item.sameContentList.length > 0){ 265 + }else if(item.sameContentListSize > 0){
330 MoreComponent({ contentDTO: item }) 266 MoreComponent({ contentDTO: item })
331 } else { 267 } else {
332 CardParser({compDTO:new CompDTO, contentDTO: item }) 268 CardParser({compDTO:new CompDTO, contentDTO: item })
@@ -553,92 +489,6 @@ export struct SearchResultContentComponent { @@ -553,92 +489,6 @@ export struct SearchResultContentComponent {
553 return contentDTO; 489 return contentDTO;
554 } 490 }
555 491
556 - private dataTransform2(rem:CreatorDetailResponseItem[],value: SearchDescription, photos: FullColumnImgUrlDTO[]): ContentDTO {  
557 - let rmhInfo = this.getRmhInfo2(rem,value)  
558 - console.log('获取photos',JSON.stringify(photos))  
559 - console.log('获取value2',JSON.stringify(value))  
560 - let contentDTO = new ContentDTO();  
561 - contentDTO.appStyle = value.appStyle + ""  
562 - contentDTO.cityCode = value.cityCode  
563 - contentDTO.coverSize = ""  
564 - contentDTO.coverType = value.type == "5" ? 1 : -1  
565 - contentDTO.coverUrl =  
566 - this.searchType == "activity" ? value.zhChannelPageImg : value.appStyleImages.split("&&")[0];  
567 - contentDTO.description = value.description  
568 - contentDTO.districtCode = value.districtCode  
569 - contentDTO.endTime = value.endTime  
570 - contentDTO.hImageUrl = ""  
571 - contentDTO.heatValue = ""  
572 - contentDTO.innerUrl = ""  
573 - contentDTO.landscape = Number.parseInt(value.landscape)  
574 - contentDTO.linkUrl = value.linkUrl  
575 - contentDTO.openLikes = Number.parseInt(value.openLikes)  
576 - contentDTO.openUrl = ""  
577 - contentDTO.pageId = value.pageId  
578 - contentDTO.programAuth = ""  
579 - contentDTO.programId = ""  
580 - contentDTO.programName = ""  
581 - contentDTO.programSource = -1  
582 - contentDTO.programType = Number.parseInt(value.status)  
583 - contentDTO.provinceCode = value.provinceCode  
584 - contentDTO.showTitleEd = value.showTitleEd  
585 - contentDTO.showTitleIng = value.showTitleIng  
586 - contentDTO.showTitleNo = value.showTitleNo  
587 - contentDTO.startTime = value.startTime  
588 - contentDTO.subType = ""  
589 - contentDTO.subtitle = ""  
590 - contentDTO.title = value.title  
591 - contentDTO.vImageUrl = ""  
592 - contentDTO.screenType = ""  
593 - contentDTO.source = StringUtils.isEmpty(value.creatorName) ? value.sourceName : value.creatorName  
594 - contentDTO.objectId = value.id  
595 - contentDTO.objectType = value.type  
596 - contentDTO.channelId = value.channelId  
597 - contentDTO.relId = value.relId  
598 - contentDTO.relType = value.relType  
599 - contentDTO.newsTitle = value.titleLiteral;  
600 - contentDTO.publishTime =  
601 - StringUtils.isNotEmpty(value.firstPublishTime) ? value.firstPublishTime : value.publishTime  
602 - contentDTO.visitorComment = -1  
603 - contentDTO.fullColumnImgUrls = photos  
604 - contentDTO.newsSummary = ""  
605 - contentDTO.hasMore = -1  
606 - contentDTO.slideShows = []  
607 - contentDTO.voiceInfo = {} as VoiceInfoDTO  
608 - contentDTO.tagWord = -1  
609 - contentDTO.isSelect = true  
610 - contentDTO.rmhInfo = {} as RmhInfoDTO  
611 - contentDTO.photoNum = -1  
612 - contentDTO.liveInfo = {} as LiveInfoDTO;  
613 - contentDTO.videoInfo = {  
614 - videoDuration: Number.parseInt(value.duration)  
615 - } as VideoInfoDTO;  
616 -  
617 - let interact = new InteractDataDTO()  
618 - interact.collectNum = value.collectNum  
619 - interact.commentNum = value.commentNum  
620 - interact.contentId = value.id  
621 - interact.contentType = Number.parseInt(value.type)  
622 - interact.likeNum = value.likeNum  
623 - interact.readNum = Number.parseInt(value.readNum)  
624 - interact.shareNum = Number.parseInt(value.shareNum)  
625 - contentDTO.interactData = interact  
626 - contentDTO.corner = ''  
627 - contentDTO.rmhPlatform = 0  
628 - contentDTO.newTags = ''  
629 - contentDTO.isSearch = true  
630 - contentDTO.publishTimestamp = ""  
631 - contentDTO.bottomNavId = '';  
632 - contentDTO.openType = '';  
633 - contentDTO.extra = '';  
634 - contentDTO.titleShow = value.type == "5" ? 1 : 0;  
635 - contentDTO.rmhInfo = rmhInfo  
636 - contentDTO.shareFlag = value.shareFlag  
637 - contentDTO.contentText = value.contentText  
638 - return contentDTO;  
639 - }  
640 -  
641 -  
642 // 搜索数据转化rmhInfo 492 // 搜索数据转化rmhInfo
643 private getRmhInfo(rem:CreatorDetailResponseItem[],value:SearchResultContentItem){ 493 private getRmhInfo(rem:CreatorDetailResponseItem[],value:SearchResultContentItem){
644 let obj = value.data 494 let obj = value.data
@@ -695,88 +545,4 @@ export struct SearchResultContentComponent { @@ -695,88 +545,4 @@ export struct SearchResultContentComponent {
695 return rmhInfo 545 return rmhInfo
696 } 546 }
697 547
698 - // 搜索数据转化rmhInfo  
699 - private getRmhInfo2(rem:CreatorDetailResponseItem[],value:SearchDescription){  
700 - let obj = value  
701 - let rmhInfo:RmhInfoDTO = {  
702 - rmhHeadUrl:obj.headerPhotoUrl,  
703 - rmhName:obj.creatorName,  
704 - rmhId:obj.creatorId,  
705 - authIcon:obj.authIcon,  
706 - authTitle: obj.authTitle,  
707 - authTitle2: '',  
708 - banControl: 0,  
709 - cnIsAttention: 0,  
710 - cnAttention: 0,  
711 - cnlsComment: 0,  
712 - cnlsLike: 0,  
713 - cnMainControl: 0,  
714 - cnShareControl: 0,  
715 - cnIsComment: 0,  
716 - cnIsLike:0,  
717 - posterShareControl: 0,  
718 - rmhDesc: obj.introduction,  
719 - userId: obj.userId,  
720 - userType: obj.userType,  
721 - honoraryIcon:''  
722 - }  
723 - if(rem.length>0){  
724 - rem.forEach(item=>{  
725 - if(item.creatorId === obj.creatorId){  
726 - rmhInfo = {  
727 - rmhHeadUrl:item.headPhotoUrl,  
728 - rmhName:item.userName,  
729 - rmhId:item.creatorId,  
730 - authIcon:item.authIcon,  
731 - authTitle: item.authTitle,  
732 - authTitle2: '',  
733 - banControl: 0,  
734 - cnIsAttention:item.isAttention,  
735 - cnAttention: 0,  
736 - cnlsComment: 0,  
737 - cnlsLike: 0,  
738 - cnMainControl: 0,  
739 - cnShareControl: 0,  
740 - cnIsComment: 0,  
741 - cnIsLike:0,  
742 - posterShareControl: 0,  
743 - rmhDesc: item.introduction,  
744 - userId: item.userId,  
745 - userType: item.userType,  
746 - honoraryIcon:''  
747 - }  
748 - }  
749 - })  
750 - }  
751 - return rmhInfo  
752 - }  
753 -  
754 -  
755 -  
756 - private extractResizeParams(url: string) {  
757 - const heightRegex = /h_(\d+)/; // 匹配高度参数,如h_450  
758 - const widthRegex = /w_(\d+)/; // 匹配宽度参数,如w_800  
759 - const heightMatch = url.match(heightRegex);  
760 - const widthMatch = url.match(widthRegex);  
761 - let height = heightMatch ? `h_${heightMatch[1]}` : undefined  
762 - let width = widthMatch ? `w_${widthMatch[1]}` : undefined  
763 - let h:number =0  
764 - let w:number =0  
765 - if(height){  
766 - h = Number(height.split('_')[1])  
767 - }  
768 - if(width){  
769 - w = Number(width.split('_')[1])  
770 - }  
771 - interface Obj{  
772 - width:number;  
773 - height:number  
774 - }  
775 - let obj:Obj = {  
776 - width:w,  
777 - height:h  
778 - }  
779 - return obj  
780 - }  
781 -  
782 } 548 }
@@ -25,6 +25,7 @@ export struct LikeComponent { @@ -25,6 +25,7 @@ export struct LikeComponent {
25 @Prop pageComponentType: number 25 @Prop pageComponentType: number
26 @State likesStyle: number | string = 1 // 赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空 26 @State likesStyle: number | string = 1 // 赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空
27 @State likeStatus: boolean = false 27 @State likeStatus: boolean = false
  28 + @State openLikes: boolean = false // 是否可以点赞 1:可以 0:不可以
28 viewModel: LikeViewModel = new LikeViewModel() 29 viewModel: LikeViewModel = new LikeViewModel()
29 @Prop @Watch('onDataUpdated') data: Record<string, string> 30 @Prop @Watch('onDataUpdated') data: Record<string, string>
30 enableBtn = true 31 enableBtn = true
@@ -42,16 +43,22 @@ export struct LikeComponent { @@ -42,16 +43,22 @@ export struct LikeComponent {
42 // this.data['userHeaderUrl'] = "" 43 // this.data['userHeaderUrl'] = ""
43 // this.data['channelId'] = "2059" //必须 44 // this.data['channelId'] = "2059" //必须
44 // this.data['status'] = "1" 45 // this.data['status'] = "1"
45 - 46 + // 内容用 是否开启点赞 1是 0否;
  47 + // this.contentDetailData.openLikes == 1
46 aboutToAppear() { 48 aboutToAppear() {
47 // 2:竖屏直播页 3:图集 4:横屏直播页 49 // 2:竖屏直播页 3:图集 4:横屏直播页
48 if(this.pageComponentType == 2 || this.pageComponentType == 4) { 50 if(this.pageComponentType == 2 || this.pageComponentType == 4) {
49 // 点赞样式 love爱心型 thumb点赞手势 mourning 蜡烛(默哀) pray 祈福 51 // 点赞样式 love爱心型 thumb点赞手势 mourning 蜡烛(默哀) pray 祈福
50 this.likesStyle = this.contentDetailData?.liveInfo?.likesStyle 52 this.likesStyle = this.contentDetailData?.liveInfo?.likesStyle
  53 + this.openLikes = this.contentDetailData?.liveInfo?.likeEnable == 1 ? true : false
51 } else { 54 } else {
52 // 内容用 点赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空 55 // 内容用 点赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空
53 this.likesStyle = this.contentDetailData.likesStyle 56 this.likesStyle = this.contentDetailData.likesStyle
  57 + this.openLikes = this.contentDetailData.openLikes == 1 ? true : false
54 } 58 }
  59 + console.log(TAG, 'this.contentDetailData', JSON.stringify(this.contentDetailData))
  60 + console.log(TAG, 'this.likesStyle', this.likesStyle)
  61 + console.log(TAG, 'this.openLikes', this.openLikes)
55 this.onDataUpdated() 62 this.onDataUpdated()
56 this.contentTrackingDict() 63 this.contentTrackingDict()
57 } 64 }
@@ -176,7 +183,7 @@ export struct LikeComponent { @@ -176,7 +183,7 @@ export struct LikeComponent {
176 } 183 }
177 .width(154) 184 .width(154)
178 .height(40) 185 .height(40)
179 - .visibility(this.likesStyle == 4 || this.likesStyle == 'empty' ? Visibility.None : Visibility.Visible) 186 + .visibility(this.likesStyle == 4 || this.likesStyle == 'empty' || !this.openLikes ? Visibility.None : Visibility.Visible)
180 } 187 }
181 188
182 @Builder 189 @Builder
@@ -194,7 +201,7 @@ export struct LikeComponent { @@ -194,7 +201,7 @@ export struct LikeComponent {
194 .onClick(() => { 201 .onClick(() => {
195 this.clickButtonEvent() 202 this.clickButtonEvent()
196 }) 203 })
197 - .visibility(this.likesStyle == 4 || this.likesStyle == 'empty' ? Visibility.None : Visibility.Visible) 204 + .visibility(this.likesStyle == 4 || this.likesStyle == 'empty' || !this.openLikes ? Visibility.None : Visibility.Visible)
198 } 205 }
199 206
200 @Builder 207 @Builder
@@ -211,7 +218,7 @@ export struct LikeComponent { @@ -211,7 +218,7 @@ export struct LikeComponent {
211 } 218 }
212 .width(24) 219 .width(24)
213 .height(24) 220 .height(24)
214 - .visibility(this.likesStyle == 4 || this.likesStyle == 'empty' ? Visibility.None : Visibility.Visible) 221 + .visibility(this.likesStyle == 4 || this.likesStyle == 'empty' || !this.openLikes ? Visibility.None : Visibility.Visible)
215 } 222 }
216 223
217 @Builder 224 @Builder
@@ -286,7 +293,7 @@ export struct LikeComponent { @@ -286,7 +293,7 @@ export struct LikeComponent {
286 }.width(24).height(24).onClick(() => { 293 }.width(24).height(24).onClick(() => {
287 this.clickButtonEvent() 294 this.clickButtonEvent()
288 }) 295 })
289 - .visibility(this.likesStyle == 4 || this.likesStyle == 'empty' ? Visibility.None : Visibility.Visible) 296 + .visibility(this.likesStyle == 4 || this.likesStyle == 'empty' || !this.openLikes ? Visibility.None : Visibility.Visible)
290 } 297 }
291 298
292 @Builder 299 @Builder
@@ -323,7 +330,7 @@ export struct LikeComponent { @@ -323,7 +330,7 @@ export struct LikeComponent {
323 } 330 }
324 .width(36) 331 .width(36)
325 .height(42) 332 .height(42)
326 - .visibility(this.likesStyle == 4 || this.likesStyle == 'empty' ? Visibility.None : Visibility.Visible) 333 + .visibility(this.likesStyle == 4 || this.likesStyle == 'empty' || !this.openLikes ? Visibility.None : Visibility.Visible)
327 334
328 } 335 }
329 336
@@ -75,12 +75,11 @@ export struct OperRowListView { @@ -75,12 +75,11 @@ export struct OperRowListView {
75 */ 75 */
76 @Prop pageComponentType?: number = -1 76 @Prop pageComponentType?: number = -1
77 @Prop showBackIcon?: boolean = true 77 @Prop showBackIcon?: boolean = true
78 - @State likesStyle: number = this.contentDetailData.likesStyle // 赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空  
79 @Prop operationButtonList?: string[] = ['comment', 'collect', 'share'] // 组件展示条件 78 @Prop operationButtonList?: string[] = ['comment', 'collect', 'share'] // 组件展示条件
80 @State needLike: boolean = true 79 @State needLike: boolean = true
81 @ObjectLink publishCommentModel: publishCommentModel 80 @ObjectLink publishCommentModel: publishCommentModel
82 @State styleType: number = -1 81 @State styleType: number = -1
83 - @State showCommentIcon: boolean = true 82 + @State showCommentIcon: boolean = true // 评论图标
84 @State bgColor: ResourceColor = Color.White 83 @State bgColor: ResourceColor = Color.White
85 @State interactData: InteractDataDTO = {} as InteractDataDTO 84 @State interactData: InteractDataDTO = {} as InteractDataDTO
86 @State newsStatusOfUser: batchLikeAndCollectResult | undefined = undefined // 点赞、收藏状态 85 @State newsStatusOfUser: batchLikeAndCollectResult | undefined = undefined // 点赞、收藏状态
@@ -94,6 +93,8 @@ export struct OperRowListView { @@ -94,6 +93,8 @@ export struct OperRowListView {
94 @State dialogController: CustomDialogController | null = null; 93 @State dialogController: CustomDialogController | null = null;
95 pageParam: ParamType = {} 94 pageParam: ParamType = {}
96 PageName: string = '' 95 PageName: string = ''
  96 + @State likesStyle: number | string = 1 // 赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空
  97 + @State openLikes: boolean = false // 是否可以点赞 1:可以 0:不可以
97 98
98 async aboutToAppear() { 99 async aboutToAppear() {
99 console.info(TAG, 'this.needLike', this.needLike) 100 console.info(TAG, 'this.needLike', this.needLike)
@@ -170,6 +171,7 @@ export struct OperRowListView { @@ -170,6 +171,7 @@ export struct OperRowListView {
170 } 171 }
171 console.info(TAG, 'contentDetailData----', JSON.stringify(this.contentDetailData)) 172 console.info(TAG, 'contentDetailData----', JSON.stringify(this.contentDetailData))
172 console.info(TAG, 'likeBean----', JSON.stringify(this.likeBean)) 173 console.info(TAG, 'likeBean----', JSON.stringify(this.likeBean))
  174 + console.info(TAG, 'this.operationButtonList', JSON.stringify(this.operationButtonList))
173 // 评论需要数据 175 // 评论需要数据
174 /* this.publishCommentModel.targetId = this.contentDetailData.newsId + '' 176 /* this.publishCommentModel.targetId = this.contentDetailData.newsId + ''
175 this.publishCommentModel.targetRelId = this.contentDetailData.reLInfo?.relId + '' 177 this.publishCommentModel.targetRelId = this.contentDetailData.reLInfo?.relId + ''
@@ -185,6 +187,16 @@ export struct OperRowListView { @@ -185,6 +187,16 @@ export struct OperRowListView {
185 console.log(TAG, 'this.audioUrl+++', this.audioUrl) 187 console.log(TAG, 'this.audioUrl+++', this.audioUrl)
186 console.log(TAG, 'this.audioTitle+++', this.audioTitle) 188 console.log(TAG, 'this.audioTitle+++', this.audioTitle)
187 } 189 }
  190 + // 2:竖屏直播页 3:图集 4:横屏直播页
  191 + if(this.pageComponentType == 2 || this.pageComponentType == 4) {
  192 + // 点赞样式 love爱心型 thumb点赞手势 mourning 蜡烛(默哀) pray 祈福
  193 + this.likesStyle = this.contentDetailData?.liveInfo?.likesStyle
  194 + this.openLikes = this.contentDetailData?.liveInfo?.likeEnable == 1 ? true : false
  195 + } else {
  196 + // 内容用 点赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空
  197 + this.likesStyle = this.contentDetailData.likesStyle
  198 + this.openLikes = this.contentDetailData.openLikes == 1 ? true : false
  199 + }
188 } 200 }
189 201
190 build() { 202 build() {
@@ -305,19 +317,16 @@ export struct OperRowListView { @@ -305,19 +317,16 @@ export struct OperRowListView {
305 */ 317 */
306 @Builder 318 @Builder
307 builderLike() { 319 builderLike() {
308 - // 点赞根据字段判断是否显示待添加  
309 Column() { 320 Column() {
310 - // if (this.likeBean?.contentId) {  
311 LikeComponent({ 321 LikeComponent({
312 data: this.likeBean, 322 data: this.likeBean,
313 styleType: this.styleType, 323 styleType: this.styleType,
314 componentType: this.componentType, 324 componentType: this.componentType,
315 pageComponentType: this.pageComponentType 325 pageComponentType: this.pageComponentType
316 }) 326 })
317 - // }  
318 } 327 }
319 .width(48) 328 .width(48)
320 - .visibility(this.likesStyle !== 4 ? Visibility.Visible : Visibility.None) 329 + .visibility(this.likesStyle == 4 || this.likesStyle == 'empty' || !this.openLikes ? Visibility.None : Visibility.Visible)
321 } 330 }
322 331
323 /** 332 /**
@@ -375,6 +384,7 @@ export struct OperRowListView { @@ -375,6 +384,7 @@ export struct OperRowListView {
375 .height(36) 384 .height(36)
376 .width(48) 385 .width(48)
377 .justifyContent(FlexAlign.Center) 386 .justifyContent(FlexAlign.Center)
  387 + .visibility(this.contentDetailData.openAudio == 1 ? Visibility.Visible : Visibility.None) // 【图文稿件】语音播报开关 0不播报 1播报
378 } 388 }
379 389
380 /** 390 /**
@@ -28,6 +28,10 @@ import { MessageUnReadItem } from '../viewmodel/MessageUnReadItem'; @@ -28,6 +28,10 @@ import { MessageUnReadItem } from '../viewmodel/MessageUnReadItem';
28 import { HistoryPushDataItem } from '../viewmodel/HistoryPushDataItem'; 28 import { HistoryPushDataItem } from '../viewmodel/HistoryPushDataItem';
29 import { HashMap } from '@kit.ArkTS'; 29 import { HashMap } from '@kit.ArkTS';
30 import { InteractMessageMItem } from './InteractMessageModel'; 30 import { InteractMessageMItem } from './InteractMessageModel';
  31 +import { FullColumnImgUrlDTO, ContentDTO, RmhInfoDTO, LiveInfoDTO, VideoInfoDTO, InteractDataDTO } from 'wdBean/Index';
  32 +import { VoiceInfoDTO } from 'wdBean/src/main/ets/bean/detail/VoiceInfoDTO';
  33 +import { CreatorDetailResponseItem } from '../viewmodel/CreatorDetailResponseItem';
  34 +import { SearchDescription } from '../viewmodel/SearchResultContentItem';
31 35
32 const TAG = "MinePageDatasModel" 36 const TAG = "MinePageDatasModel"
33 37
@@ -749,6 +753,169 @@ class MinePageDatasModel{ @@ -749,6 +753,169 @@ class MinePageDatasModel{
749 return WDHttp.get<ResponseDTO<String>>(url) 753 return WDHttp.get<ResponseDTO<String>>(url)
750 }; 754 };
751 755
  756 +
  757 + extractResizeParams(url: string) :number[]{
  758 + const heightRegex = /h_(\d+)/; // 匹配高度参数,如h_450
  759 + const widthRegex = /w_(\d+)/; // 匹配宽度参数,如w_800
  760 + const heightMatch = url.match(heightRegex);
  761 + const widthMatch = url.match(widthRegex);
  762 + let height = heightMatch ? `h_${heightMatch[1]}` : undefined
  763 + let width = widthMatch ? `w_${widthMatch[1]}` : undefined
  764 + let h:number =0
  765 + let w:number =0
  766 + if(height){
  767 + h = Number(height.split('_')[1])
  768 + }
  769 + if(width){
  770 + w = Number(width.split('_')[1])
  771 + }
  772 + let arr:number[] = []
  773 + arr.push(w)
  774 + arr.push(h)
  775 +
  776 + return arr
  777 + }
  778 +
  779 + dataTransform(rem:CreatorDetailResponseItem[],value: SearchDescription, photos: FullColumnImgUrlDTO[]): ContentDTO {
  780 + let rmhInfo = this.getRmhInfo(rem,value)
  781 + console.log('获取photos',JSON.stringify(photos))
  782 + console.log('获取value2',JSON.stringify(value))
  783 + let contentDTO = new ContentDTO();
  784 + contentDTO.appStyle = value.appStyle + ""
  785 + contentDTO.cityCode = value.cityCode
  786 + contentDTO.coverSize = ""
  787 + contentDTO.coverType = value.type == "5" ? 1 : -1
  788 + contentDTO.coverUrl = value.appStyleImages.split("&&")[0];
  789 + contentDTO.description = value.description
  790 + contentDTO.districtCode = value.districtCode
  791 + contentDTO.endTime = value.endTime
  792 + contentDTO.hImageUrl = ""
  793 + contentDTO.heatValue = ""
  794 + contentDTO.innerUrl = ""
  795 + contentDTO.landscape = Number.parseInt(value.landscape)
  796 + contentDTO.linkUrl = value.linkUrl
  797 + contentDTO.openLikes = Number.parseInt(value.openLikes)
  798 + contentDTO.openUrl = ""
  799 + contentDTO.pageId = value.pageId
  800 + contentDTO.programAuth = ""
  801 + contentDTO.programId = ""
  802 + contentDTO.programName = ""
  803 + contentDTO.programSource = -1
  804 + contentDTO.programType = Number.parseInt(value.status)
  805 + contentDTO.provinceCode = value.provinceCode
  806 + contentDTO.showTitleEd = value.showTitleEd
  807 + contentDTO.showTitleIng = value.showTitleIng
  808 + contentDTO.showTitleNo = value.showTitleNo
  809 + contentDTO.startTime = value.startTime
  810 + contentDTO.subType = ""
  811 + contentDTO.subtitle = ""
  812 + contentDTO.title = value.title
  813 + contentDTO.vImageUrl = ""
  814 + contentDTO.screenType = ""
  815 + contentDTO.source = StringUtils.isEmpty(value.creatorName) ? value.sourceName : value.creatorName
  816 + contentDTO.objectId = value.id
  817 + contentDTO.objectType = value.type
  818 + contentDTO.channelId = value.channelId
  819 + contentDTO.relId = value.relId
  820 + contentDTO.relType = value.relType
  821 + contentDTO.newsTitle = value.titleLiteral;
  822 + contentDTO.publishTime =
  823 + StringUtils.isNotEmpty(value.firstPublishTime) ? value.firstPublishTime : value.publishTime
  824 + contentDTO.visitorComment = -1
  825 + contentDTO.fullColumnImgUrls = photos
  826 + contentDTO.newsSummary = ""
  827 + contentDTO.hasMore = -1
  828 + contentDTO.slideShows = []
  829 + contentDTO.voiceInfo = {} as VoiceInfoDTO
  830 + contentDTO.tagWord = -1
  831 + contentDTO.isSelect = true
  832 + contentDTO.rmhInfo = {} as RmhInfoDTO
  833 + contentDTO.photoNum = -1
  834 + contentDTO.liveInfo = {} as LiveInfoDTO;
  835 + contentDTO.videoInfo = {
  836 + videoDuration: Number.parseInt(value.duration)
  837 + } as VideoInfoDTO;
  838 +
  839 + let interact = new InteractDataDTO()
  840 + interact.collectNum = value.collectNum
  841 + interact.commentNum = value.commentNum
  842 + interact.contentId = value.id
  843 + interact.contentType = Number.parseInt(value.type)
  844 + interact.likeNum = value.likeNum
  845 + interact.readNum = Number.parseInt(value.readNum)
  846 + interact.shareNum = Number.parseInt(value.shareNum)
  847 + contentDTO.interactData = interact
  848 + contentDTO.corner = ''
  849 + contentDTO.rmhPlatform = 0
  850 + contentDTO.newTags = ''
  851 + contentDTO.isSearch = true
  852 + contentDTO.publishTimestamp = ""
  853 + contentDTO.bottomNavId = '';
  854 + contentDTO.openType = '';
  855 + contentDTO.extra = '';
  856 + contentDTO.titleShow = value.type == "5" ? 1 : 0;
  857 + contentDTO.rmhInfo = rmhInfo
  858 + contentDTO.shareFlag = value.shareFlag
  859 + contentDTO.contentText = value.contentText
  860 + return contentDTO;
  861 + }
  862 +
  863 + // 搜索数据转化rmhInfo
  864 + getRmhInfo(rem:CreatorDetailResponseItem[],value:SearchDescription){
  865 + let obj = value
  866 + let rmhInfo:RmhInfoDTO = {
  867 + rmhHeadUrl:obj.headerPhotoUrl,
  868 + rmhName:obj.creatorName,
  869 + rmhId:obj.creatorId,
  870 + authIcon:obj.authIcon,
  871 + authTitle: obj.authTitle,
  872 + authTitle2: '',
  873 + banControl: 0,
  874 + cnIsAttention: 0,
  875 + cnAttention: 0,
  876 + cnlsComment: 0,
  877 + cnlsLike: 0,
  878 + cnMainControl: 0,
  879 + cnShareControl: 0,
  880 + cnIsComment: 0,
  881 + cnIsLike:0,
  882 + posterShareControl: 0,
  883 + rmhDesc: obj.introduction,
  884 + userId: obj.userId,
  885 + userType: obj.userType,
  886 + honoraryIcon:''
  887 + }
  888 + if(rem.length>0){
  889 + rem.forEach(item=>{
  890 + if(item.creatorId === obj.creatorId){
  891 + rmhInfo = {
  892 + rmhHeadUrl:item.headPhotoUrl,
  893 + rmhName:item.userName,
  894 + rmhId:item.creatorId,
  895 + authIcon:item.authIcon,
  896 + authTitle: item.authTitle,
  897 + authTitle2: '',
  898 + banControl: 0,
  899 + cnIsAttention:item.isAttention,
  900 + cnAttention: 0,
  901 + cnlsComment: 0,
  902 + cnlsLike: 0,
  903 + cnMainControl: 0,
  904 + cnShareControl: 0,
  905 + cnIsComment: 0,
  906 + cnIsLike:0,
  907 + posterShareControl: 0,
  908 + rmhDesc: item.introduction,
  909 + userId: item.userId,
  910 + userType: item.userType,
  911 + honoraryIcon:''
  912 + }
  913 + }
  914 + })
  915 + }
  916 + return rmhInfo
  917 + }
  918 +
752 } 919 }
753 920
754 const minePageDatasModel = MinePageDatasModel.getInstance() 921 const minePageDatasModel = MinePageDatasModel.getInstance()
@@ -49,6 +49,7 @@ export struct MultiPictureListPage { @@ -49,6 +49,7 @@ export struct MultiPictureListPage {
49 left: { anchor: "__container__", align: HorizontalAlign.Start } 49 left: { anchor: "__container__", align: HorizontalAlign.Start }
50 }) 50 })
51 .onClick(() => { 51 .onClick(() => {
  52 + this.onBack();
52 router.back(); 53 router.back();
53 }) 54 })
54 .id("backImg") 55 .id("backImg")
@@ -134,7 +135,7 @@ export struct MultiPictureListPage { @@ -134,7 +135,7 @@ export struct MultiPictureListPage {
134 } 135 }
135 .width('100%') 136 .width('100%')
136 .height('100%') 137 .height('100%')
137 - .padding({top:$r('app.float.margin_44')}) 138 + // .padding({top:$r('app.float.margin_44')})
138 .backgroundColor(Color.Black) 139 .backgroundColor(Color.Black)
139 .id('e_picture_container') 140 .id('e_picture_container')
140 // 设置顶部绘制延伸到状态栏 141 // 设置顶部绘制延伸到状态栏
@@ -148,7 +149,7 @@ export struct MultiPictureListPage { @@ -148,7 +149,7 @@ export struct MultiPictureListPage {
148 */ 149 */
149 openFullScreen() { 150 openFullScreen() {
150 WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#ffffff', }) 151 WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#ffffff', })
151 - WindowModel.shared.setWindowLayoutFullScreen(true) 152 + // WindowModel.shared.setWindowLayoutFullScreen(true)
152 // WindowModel.shared.setWindowSystemBarEnable([]) 153 // WindowModel.shared.setWindowSystemBarEnable([])
153 } 154 }
154 155
@@ -163,7 +164,16 @@ export struct MultiPictureListPage { @@ -163,7 +164,16 @@ export struct MultiPictureListPage {
163 */ 164 */
164 closeFullScreen() { 165 closeFullScreen() {
165 WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#000000', }) 166 WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#000000', })
166 - WindowModel.shared.setWindowLayoutFullScreen(false) 167 + // WindowModel.shared.setWindowLayoutFullScreen(false)
167 // WindowModel.shared.setWindowSystemBarEnable(['status', 'navigation']) 168 // WindowModel.shared.setWindowSystemBarEnable(['status', 'navigation'])
168 } 169 }
  170 +
  171 + onBackPress(): boolean | void {
  172 + this.onBack()
  173 + }
  174 +
  175 + private onBack() {
  176 + // 提前设置,否则返回的页面展示有问题(有时延)
  177 + this.closeFullScreen()
  178 + }
169 } 179 }
@@ -9,6 +9,14 @@ import { publishCommentModel } from 'wdComponent/src/main/ets/components/comment @@ -9,6 +9,14 @@ import { publishCommentModel } from 'wdComponent/src/main/ets/components/comment
9 9
10 const TAG = 'DetailPlayLiveCommon' 10 const TAG = 'DetailPlayLiveCommon'
11 11
  12 +/**
  13 + * @Description: 沉浸式和非沉浸式直播页面
  14 + * @Author:
  15 + * @Email:
  16 + * @CreateDate:
  17 + * @UpdateRemark: 更新说明
  18 + * @Version: 1.0
  19 + */
12 @Entry 20 @Entry
13 @Component 21 @Component
14 export struct DetailPlayLiveCommon { 22 export struct DetailPlayLiveCommon {
@@ -41,8 +49,10 @@ export struct DetailPlayLiveCommon { @@ -41,8 +49,10 @@ export struct DetailPlayLiveCommon {
41 Column() { 49 Column() {
42 // 直播预约或横屏直播统一进横屏直播 50 // 直播预约或横屏直播统一进横屏直播
43 if (this.liveState === 'wait' || this.liveStyle === 0) { 51 if (this.liveState === 'wait' || this.liveStyle === 0) {
  52 + // 非沉浸式
44 DetailPlayLivePage({ contentId: this.contentId, relId: this.relId, relType: this.relType }) 53 DetailPlayLivePage({ contentId: this.contentId, relId: this.relId, relType: this.relType })
45 } else if (this.liveStyle === 1) { 54 } else if (this.liveStyle === 1) {
  55 + // 沉浸式
46 DetailPlayVLivePage() 56 DetailPlayVLivePage()
47 } 57 }
48 } 58 }
@@ -61,6 +71,7 @@ export struct DetailPlayLiveCommon { @@ -61,6 +71,7 @@ export struct DetailPlayLiveCommon {
61 console.log(TAG, '查询视频详情用于评论展示 getContentDetail:', JSON.stringify(data)) 71 console.log(TAG, '查询视频详情用于评论展示 getContentDetail:', JSON.stringify(data))
62 if (data) { 72 if (data) {
63 this.contentDetailData = data[0]; 73 this.contentDetailData = data[0];
  74 +
64 // if (this.contentDetailData.openComment === 1) { 75 // if (this.contentDetailData.openComment === 1) {
65 console.log(TAG, '查询视频详情用于评论展示 openComment:', this.contentDetailData.openComment) 76 console.log(TAG, '查询视频详情用于评论展示 openComment:', this.contentDetailData.openComment)
66 this.publishCommentModel.targetId = String(this.contentDetailData?.newsId || '') 77 this.publishCommentModel.targetId = String(this.contentDetailData?.newsId || '')
@@ -15,6 +15,9 @@ import { ResponseDTO } from 'wdNetwork/Index'; @@ -15,6 +15,9 @@ import { ResponseDTO } from 'wdNetwork/Index';
15 15
16 let TAG: string = 'DetailPlayLivePage'; 16 let TAG: string = 'DetailPlayLivePage';
17 17
  18 +/**
  19 + * 非沉浸式房间直播组件
  20 + */
18 @Component 21 @Component
19 export struct DetailPlayLivePage { 22 export struct DetailPlayLivePage {
20 //横竖屏,默认竖屏 23 //横竖屏,默认竖屏
@@ -63,7 +66,7 @@ export struct DetailPlayLivePage { @@ -63,7 +66,7 @@ export struct DetailPlayLivePage {
63 build() { 66 build() {
64 Column() { 67 Column() {
65 TopPlayComponent({ playerController: this.playerController }) 68 TopPlayComponent({ playerController: this.playerController })
66 - .height(211) 69 + .height(this.displayDirection == DisplayDirection.VERTICAL ?211:'100%')
67 TabComponent({ tabs: this.tabs, changeToTab: this.changeToTab }) 70 TabComponent({ tabs: this.tabs, changeToTab: this.changeToTab })
68 .layoutWeight(1) 71 .layoutWeight(1)
69 .visibility(this.displayDirection == DisplayDirection.VERTICAL ? Visibility.Visible : Visibility.None) 72 .visibility(this.displayDirection == DisplayDirection.VERTICAL ? Visibility.Visible : Visibility.None)
@@ -12,6 +12,9 @@ import { PlayerEndView } from '../widgets/vertical/PlayerEndView'; @@ -12,6 +12,9 @@ import { PlayerEndView } from '../widgets/vertical/PlayerEndView';
12 const storage = LocalStorage.getShared(); 12 const storage = LocalStorage.getShared();
13 const TAG = 'DetailPlayVLivePage' 13 const TAG = 'DetailPlayVLivePage'
14 14
  15 +/**
  16 + * 沉浸式房间直播组件
  17 + */
15 @Entry(storage) 18 @Entry(storage)
16 @Component 19 @Component
17 export struct DetailPlayVLivePage { 20 export struct DetailPlayVLivePage {
@@ -2,6 +2,9 @@ import { TabChatComponent } from './TabChatComponent' @@ -2,6 +2,9 @@ import { TabChatComponent } from './TabChatComponent'
2 import { TabInfoComponent } from './TabInfoComponent' 2 import { TabInfoComponent } from './TabInfoComponent'
3 import { TabLiveComponent } from './TabLiveComponent' 3 import { TabLiveComponent } from './TabLiveComponent'
4 4
  5 +/**
  6 + * 非沉浸式直播 tab 组件
  7 + */
5 @Component 8 @Component
6 export struct TabComponent { 9 export struct TabComponent {
7 @Prop @Watch('changeToChart') changeToTab: number 10 @Prop @Watch('changeToChart') changeToTab: number
1 import { LiveDetailsBean } from 'wdBean/Index'; 1 import { LiveDetailsBean } from 'wdBean/Index';
2 -import { StringUtils } from 'wdKit/Index';  
3 -import { PlayerConstants, WDAliPlayerController, WDPlayerController, WDPlayerRenderLiveView } from 'wdPlayer/Index'; 2 +import { Logger, StringUtils } from 'wdKit/Index';
  3 +import { PlayerConstants, WDAliPlayerController, WDPlayerRenderLiveView } from 'wdPlayer/Index';
4 import { PlayUIComponent } from './PlayUIComponent'; 4 import { PlayUIComponent } from './PlayUIComponent';
5 -import { Logger } from 'wdKit/Index';  
6 import { PictureLoading } from '../../vertical/PictureLoading'; 5 import { PictureLoading } from '../../vertical/PictureLoading';
7 6
8 const TAG: string = 'TopPlayComponent' 7 const TAG: string = 'TopPlayComponent'
@@ -23,6 +22,7 @@ export struct TopPlayComponent { @@ -23,6 +22,7 @@ export struct TopPlayComponent {
23 @State isLoading: boolean = false 22 @State isLoading: boolean = false
24 // 获取播放资源能播放了 23 // 获取播放资源能播放了
25 @State isCanPlay: boolean = false 24 @State isCanPlay: boolean = false
  25 +
26 private playUrl: string = "" 26 private playUrl: string = ""
27 private xComponentIsLoaded: boolean = false 27 private xComponentIsLoaded: boolean = false
28 28
@@ -99,6 +99,7 @@ export struct TopPlayComponent { @@ -99,6 +99,7 @@ export struct TopPlayComponent {
99 99
100 build() { 100 build() {
101 Stack() { 101 Stack() {
  102 + // 视频资源播放
102 WDPlayerRenderLiveView({ 103 WDPlayerRenderLiveView({
103 playerController: this.playerController, 104 playerController: this.playerController,
104 onLoad: async () => { 105 onLoad: async () => {
@@ -112,17 +113,20 @@ export struct TopPlayComponent { @@ -112,17 +113,20 @@ export struct TopPlayComponent {
112 .width('100%') 113 .width('100%')
113 .visibility(this.isWait ? Visibility.None : Visibility.Visible) 114 .visibility(this.isWait ? Visibility.None : Visibility.Visible)
114 115
  116 + // 直播房间图
115 Image(this.imgUrl) 117 Image(this.imgUrl)
116 .objectFit(ImageFit.Cover) 118 .objectFit(ImageFit.Cover)
117 .visibility(this.isWait || this.isEnd ? Visibility.Visible : Visibility.None) 119 .visibility(this.isWait || this.isEnd ? Visibility.Visible : Visibility.None)
118 .contrast(this.isEnd ? 0.2 : 1) 120 .contrast(this.isEnd ? 0.2 : 1)
119 .width('100%') 121 .width('100%')
120 122
  123 + // loading
121 PictureLoading().visibility(this.isLoading ? Visibility.None : Visibility.Visible) 124 PictureLoading().visibility(this.isLoading ? Visibility.None : Visibility.Visible)
122 125
123 // 视频播放器上的控制面板和信息 126 // 视频播放器上的控制面板和信息
124 PlayUIComponent({ playerController: this.playerController, isShowBottom: this.isCanPlay }) 127 PlayUIComponent({ playerController: this.playerController, isShowBottom: this.isCanPlay })
125 128
  129 + // 直播结束
126 Text('直播已结束') 130 Text('直播已结束')
127 .fontSize('20fp') 131 .fontSize('20fp')
128 .fontWeight(500) 132 .fontWeight(500)
@@ -131,6 +135,7 @@ export struct TopPlayComponent { @@ -131,6 +135,7 @@ export struct TopPlayComponent {
131 Visibility.None) 135 Visibility.None)
132 136
133 137
  138 + // 直播资源加载失败
134 Column() { 139 Column() {
135 140
136 Text('直播加载中,请稍候重试') 141 Text('直播加载中,请稍候重试')
@@ -22,6 +22,7 @@ export struct PlayerInfoComponent { @@ -22,6 +22,7 @@ export struct PlayerInfoComponent {
22 } 22 }
23 .cachedCount(2) 23 .cachedCount(2)
24 .indicator(false) 24 .indicator(false)
  25 + .effectMode(EdgeEffect.None)
25 .loop(false) 26 .loop(false)
26 .width('100%') 27 .width('100%')
27 .height('100%') 28 .height('100%')
@@ -4,10 +4,7 @@ import { LoginViewModel } from './LoginViewModel' @@ -4,10 +4,7 @@ import { LoginViewModel } from './LoginViewModel'
4 import router from '@ohos.router' 4 import router from '@ohos.router'
5 import { WDRouterRule, WDRouterPage } from 'wdRouter'; 5 import { WDRouterRule, WDRouterPage } from 'wdRouter';
6 import { SettingPasswordParams } from './SettingPasswordPage' 6 import { SettingPasswordParams } from './SettingPasswordPage'
7 -import { Router } from '@ohos.arkui.UIContext'  
8 -import { CustomToast, EmitterEventId, EmitterUtils, NetworkUtil, SPHelper, StringUtils, ToastUtils } from 'wdKit/Index'  
9 -import { SpConstants } from 'wdConstant/Index'  
10 -import { emitter } from '@kit.BasicServicesKit' 7 +import { CustomToast, NetworkUtil,StringUtils } from 'wdKit/Index'
11 8
12 9
13 const TAG = 'ForgetPasswordPage' 10 const TAG = 'ForgetPasswordPage'
@@ -22,8 +19,9 @@ struct ForgetPasswordPage { @@ -22,8 +19,9 @@ struct ForgetPasswordPage {
22 @State isSubmit: boolean = false //是否可以提交 默认不可以 19 @State isSubmit: boolean = false //是否可以提交 默认不可以
23 loginViewModel: LoginViewModel = new LoginViewModel() 20 loginViewModel: LoginViewModel = new LoginViewModel()
24 @State @Watch('onCodeSend') isCodeSend: boolean = false //验证码点击发送事件 21 @State @Watch('onCodeSend') isCodeSend: boolean = false //验证码点击发送事件
25 - phone:string = (router.getParams() as Record<string, number>)['phone'] + ""; //登录 密码登录 填写手机号 点击忘记密码 带过来手机号 22 + @State params:Record<string, number> = router.getParams() as Record<string, number>;//登录 密码登录 填写手机号 点击忘记密码 带过来手机号
26 @State pageTitle:string = '找回密码'; 23 @State pageTitle:string = '找回密码';
  24 + @State isForgetPassword: number = 0 //是否是登录页忘记密码过来的,标题不一样
27 @State codeStateSuccess:boolean=false 25 @State codeStateSuccess:boolean=false
28 onCodeSend() { 26 onCodeSend() {
29 if (this.isCodeSend) { 27 if (this.isCodeSend) {
@@ -80,9 +78,15 @@ struct ForgetPasswordPage { @@ -80,9 +78,15 @@ struct ForgetPasswordPage {
80 } 78 }
81 79
82 aboutToAppear() { 80 aboutToAppear() {
83 - if(StringUtils.isNotEmpty(this.phone) && this.phone.indexOf("****") === -1){  
84 - this.phoneContent = this.phone 81 + let phone = ""
  82 + if(this.params){
  83 + phone = this.params['phone']+ ""
  84 + this.isForgetPassword = this.params['isForgetPassword']
85 } 85 }
  86 + if(StringUtils.isNotEmpty(phone) && phone.indexOf("****") === -1){
  87 + this.phoneContent = phone
  88 + }
  89 +
86 } 90 }
87 91
88 //发送验证码 92 //发送验证码
@@ -148,7 +152,8 @@ struct ForgetPasswordPage { @@ -148,7 +152,8 @@ struct ForgetPasswordPage {
148 pageID:'1', 152 pageID:'1',
149 phoneContent:this.phoneContent, 153 phoneContent:this.phoneContent,
150 codeContent:this.codeContent, 154 codeContent:this.codeContent,
151 - pageType:1 155 + pageType:1,
  156 + isForgetPassword:this.isForgetPassword
152 } 157 }
153 WDRouterRule.jumpWithPage(WDRouterPage.settingPasswordPage, params) 158 WDRouterRule.jumpWithPage(WDRouterPage.settingPasswordPage, params)
154 }).catch((message: string)=>{ 159 }).catch((message: string)=>{
@@ -162,7 +167,8 @@ struct ForgetPasswordPage { @@ -162,7 +167,8 @@ struct ForgetPasswordPage {
162 pageID:'1', 167 pageID:'1',
163 phoneContent:this.phoneContent, 168 phoneContent:this.phoneContent,
164 codeContent:this.codeContent, 169 codeContent:this.codeContent,
165 - pageType:0 170 + pageType:0,
  171 + isForgetPassword:this.isForgetPassword
166 } 172 }
167 WDRouterRule.jumpWithReplacePage(WDRouterPage.settingPasswordPage, params) 173 WDRouterRule.jumpWithReplacePage(WDRouterPage.settingPasswordPage, params)
168 174
@@ -177,10 +177,11 @@ struct LoginPage { @@ -177,10 +177,11 @@ struct LoginPage {
177 .onClick(() => { 177 .onClick(() => {
178 TrackingButton.click("loginPageForgotPassword",TrackConstants.PageName.Login_Page,TrackConstants.PageName.Login_Page) 178 TrackingButton.click("loginPageForgotPassword",TrackConstants.PageName.Login_Page,TrackConstants.PageName.Login_Page)
179 if(StringUtils.isNotEmpty(this.accountContent) && StringUtils.photoMatch(this.accountContent)){ 179 if(StringUtils.isNotEmpty(this.accountContent) && StringUtils.photoMatch(this.accountContent)){
180 - let pageType = { 'phone': Number(this.accountContent) } as Record<string, number>; 180 + let pageType = { 'phone': Number(this.accountContent),'isForgetPassword':1 } as Record<string, number>;
181 WDRouterRule.jumpWithPage(WDRouterPage.forgetPasswordPage, pageType) 181 WDRouterRule.jumpWithPage(WDRouterPage.forgetPasswordPage, pageType)
182 }else{ 182 }else{
183 - WDRouterRule.jumpWithPage(WDRouterPage.forgetPasswordPage) 183 + let pageType = {'isForgetPassword':1 } as Record<string, number>;
  184 + WDRouterRule.jumpWithPage(WDRouterPage.forgetPasswordPage,pageType)
184 } 185 }
185 }) 186 })
186 } 187 }
@@ -18,6 +18,7 @@ export interface SettingPasswordParams { @@ -18,6 +18,7 @@ export interface SettingPasswordParams {
18 codeContent?: string; 18 codeContent?: string;
19 tempToken?:string; 19 tempToken?:string;
20 pageType?:number; //0、登录->忘记密码 1、设置->重置密码 20 pageType?:number; //0、登录->忘记密码 1、设置->重置密码
  21 + isForgetPassword?:number
21 } 22 }
22 23
23 export default class AccoutPageDataModel { 24 export default class AccoutPageDataModel {
@@ -107,6 +108,17 @@ export struct SettingPasswordPage { @@ -107,6 +108,17 @@ export struct SettingPasswordPage {
107 let params:SettingPasswordParams = router.getParams() as SettingPasswordParams; 108 let params:SettingPasswordParams = router.getParams() as SettingPasswordParams;
108 this.pageId = parseInt(params.pageID); 109 this.pageId = parseInt(params.pageID);
109 this.getPageListData(this.pageId) 110 this.getPageListData(this.pageId)
  111 + if(params){
  112 + if(params.isForgetPassword === 1){
  113 + this.listData.forEach((item) => {
  114 + if (item.compType === 0) {
  115 + item.compTitle = "重置密码"
  116 + }
  117 + })
  118 + }
  119 + }
  120 +
  121 +
110 122
111 this.phoneContent = params.phoneContent!; 123 this.phoneContent = params.phoneContent!;
112 this.codeContent = params.codeContent!; 124 this.codeContent = params.codeContent!;
@@ -151,8 +163,6 @@ export struct SettingPasswordPage { @@ -151,8 +163,6 @@ export struct SettingPasswordPage {
151 this.getTitleCell(item, HorizontalAlign.Start) 163 this.getTitleCell(item, HorizontalAlign.Start)
152 } else if (item.compType == 1) { 164 } else if (item.compType == 1) {
153 this.getPasswordCell(item) 165 this.getPasswordCell(item)
154 - } else if (item.compType == 2) {  
155 - this.getCodeCell(item)  
156 } else if (item.compType == 3) { 166 } else if (item.compType == 3) {
157 if (index == this.listData.length - 1) { 167 if (index == this.listData.length - 1) {
158 this.getDescCell(item, HorizontalAlign.Center) 168 this.getDescCell(item, HorizontalAlign.Center)
@@ -161,18 +171,12 @@ export struct SettingPasswordPage { @@ -161,18 +171,12 @@ export struct SettingPasswordPage {
161 } 171 }
162 } else if (item.compType == 4) { 172 } else if (item.compType == 4) {
163 this.getButtonCell(item) 173 this.getButtonCell(item)
164 - } else if (item.compType == 5) {  
165 - this.getLogoCell(item)  
166 - } else if (item.compType == 7) {  
167 - this.getPhoneCell(item)  
168 - } else {  
169 - Text('' + item.compType)  
170 } 174 }
171 } 175 }
172 }) 176 })
173 } 177 }
174 }.width('100%') 178 }.width('100%')
175 - .padding('30lpx') 179 + .padding({ left:"31lpx",right:"31lpx",top:"131lpx" })
176 .height('100%') 180 .height('100%')
177 } 181 }
178 182
1 import componentUtils from '@ohos.arkui.componentUtils'; 1 import componentUtils from '@ohos.arkui.componentUtils';
2 -import { WDPlayerController } from '../controller/WDPlayerController'  
3 import { WindowModel } from 'wdKit'; 2 import { WindowModel } from 'wdKit';
4 import { Logger } from '../utils/Logger'; 3 import { Logger } from '../utils/Logger';
5 import { enableAliPlayer } from '../utils/GlobalSetting'; 4 import { enableAliPlayer } from '../utils/GlobalSetting';
@@ -91,7 +91,7 @@ struct MultiPictureDetailPage { @@ -91,7 +91,7 @@ struct MultiPictureDetailPage {
91 */ 91 */
92 openFullScreen() { 92 openFullScreen() {
93 WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#ffffff', }) 93 WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#ffffff', })
94 - WindowModel.shared.setWindowLayoutFullScreen(true) 94 + // WindowModel.shared.setWindowLayoutFullScreen(true)
95 // WindowModel.shared.setWindowSystemBarEnable([]) 95 // WindowModel.shared.setWindowSystemBarEnable([])
96 } 96 }
97 97
@@ -101,7 +101,7 @@ struct MultiPictureDetailPage { @@ -101,7 +101,7 @@ struct MultiPictureDetailPage {
101 */ 101 */
102 closeFullScreen() { 102 closeFullScreen() {
103 WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#000000', }) 103 WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#000000', })
104 - WindowModel.shared.setWindowLayoutFullScreen(false) 104 + // WindowModel.shared.setWindowLayoutFullScreen(false)
105 // WindowModel.shared.setWindowSystemBarEnable(['status', 'navigation']) 105 // WindowModel.shared.setWindowSystemBarEnable(['status', 'navigation'])
106 } 106 }
107 107