Merge branch 'main' of http://192.168.1.42/developOne/harmonyPool into main
* 'main' of http://192.168.1.42/developOne/harmonyPool: fix: 兴趣卡取消关闭会提示已为您调整推荐内容 标题更换,换一换如果全部试过后置灰 fix: 图集底部顶部有文字时,添加蒙层 fix: 图集底部顶部有文字时,添加蒙层 fix: 关注号主后,进去号主图集稿件页,关注状态会由未关注变为已关注 fix: 兴趣卡关闭添加提示,关闭后列表删除数据 fix: 兴趣卡关闭添加提示,关闭后列表删除数据 fix |> 横屏直播详情标题和直播状态之间间距过小问题 fix |> 修复竖屏直播详情直播状态标签与标题没有左对齐问题 ref |> 调整横屏直播详情播放控制层自动隐藏时间 动态详情页面UI优化
Showing
7 changed files
with
121 additions
and
76 deletions
| @@ -185,7 +185,7 @@ export struct CompParser { | @@ -185,7 +185,7 @@ export struct CompParser { | ||
| 185 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_05) { | 185 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_05) { |
| 186 | // ZhSingleColumn05({ compDTO: compDTO }) | 186 | // ZhSingleColumn05({ compDTO: compDTO }) |
| 187 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_09) { | 187 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_09) { |
| 188 | - ZhSingleColumn09({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) | 188 | + ZhSingleColumn09({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName, pageModel: this.pageModel, compIndex: this.compIndex }) |
| 189 | } else if (this.compDTO.compStyle === CompStyle.Card_Comp_Adv) { // 广告 | 189 | } else if (this.compDTO.compStyle === CompStyle.Card_Comp_Adv) { // 广告 |
| 190 | AdvCardParser({ pageModel: this.pageModel, compDTO: this.compDTO }) | 190 | AdvCardParser({ pageModel: this.pageModel, compDTO: this.compDTO }) |
| 191 | //Text(`compIndex = ${compIndex}`).width('100%').fontSize('12fp').fontColor(Color.Red).padding({ left: 0, right: 0 }) | 191 | //Text(`compIndex = ${compIndex}`).width('100%').fontSize('12fp').fontColor(Color.Red).padding({ left: 0, right: 0 }) |
| @@ -173,10 +173,15 @@ export struct DynamicDetailComponent { | @@ -173,10 +173,15 @@ export struct DynamicDetailComponent { | ||
| 173 | Image(this.contentDetailData.rmhInfo?.rmhHeadUrl) | 173 | Image(this.contentDetailData.rmhInfo?.rmhHeadUrl) |
| 174 | .alt(this.contentDetailData.rmhInfo?.userType == '1' ? $r('app.media.default_head') : | 174 | .alt(this.contentDetailData.rmhInfo?.userType == '1' ? $r('app.media.default_head') : |
| 175 | $r('app.media.icon_default_head_mater')) | 175 | $r('app.media.icon_default_head_mater')) |
| 176 | - .width($r('app.float.margin_32')) | ||
| 177 | - .height($r('app.float.margin_32')) | 176 | + .width($r('app.float.margin_36')) |
| 177 | + .height($r('app.float.margin_36')) | ||
| 178 | .objectFit(ImageFit.Cover) | 178 | .objectFit(ImageFit.Cover) |
| 179 | - .borderRadius($r('app.float.margin_16')) | 179 | + .borderRadius(50) |
| 180 | + .border({ | ||
| 181 | + width: 0.5, | ||
| 182 | + color: '#0D000000', // 5% 透明度的黑色 | ||
| 183 | + style: BorderStyle.Solid | ||
| 184 | + }) | ||
| 180 | Image(this.contentDetailData.rmhInfo?.honoraryIcon) | 185 | Image(this.contentDetailData.rmhInfo?.honoraryIcon) |
| 181 | .width($r('app.float.margin_48')) | 186 | .width($r('app.float.margin_48')) |
| 182 | .height($r('app.float.margin_48')) | 187 | .height($r('app.float.margin_48')) |
| @@ -185,12 +190,12 @@ export struct DynamicDetailComponent { | @@ -185,12 +190,12 @@ export struct DynamicDetailComponent { | ||
| 185 | if (!StringUtils.isEmpty(this.contentDetailData.rmhInfo?.authIcon)) { | 190 | if (!StringUtils.isEmpty(this.contentDetailData.rmhInfo?.authIcon)) { |
| 186 | Stack() { | 191 | Stack() { |
| 187 | Image(this.contentDetailData.rmhInfo?.authIcon) | 192 | Image(this.contentDetailData.rmhInfo?.authIcon) |
| 188 | - .width($r('app.float.vp_12')) | ||
| 189 | - .height($r('app.float.vp_12')) | 193 | + .width($r('app.float.vp_14')) |
| 194 | + .height($r('app.float.vp_14')) | ||
| 190 | .objectFit(ImageFit.Cover) | 195 | .objectFit(ImageFit.Cover) |
| 191 | } | 196 | } |
| 192 | - .width($r('app.float.margin_48')) | ||
| 193 | - .height($r('app.float.margin_48')) | 197 | + .width($r('app.float.margin_36')) |
| 198 | + .height($r('app.float.margin_36')) | ||
| 194 | .alignContent(Alignment.BottomEnd) | 199 | .alignContent(Alignment.BottomEnd) |
| 195 | } | 200 | } |
| 196 | } | 201 | } |
| @@ -209,24 +214,32 @@ export struct DynamicDetailComponent { | @@ -209,24 +214,32 @@ export struct DynamicDetailComponent { | ||
| 209 | Column() { | 214 | Column() { |
| 210 | //昵称 | 215 | //昵称 |
| 211 | Text(this.contentDetailData.rmhInfo?.rmhName) | 216 | Text(this.contentDetailData.rmhInfo?.rmhName) |
| 212 | - .fontSize($r('app.float.font_size_14')) | 217 | + .fontSize(15) |
| 213 | .fontColor($r('app.color.color_222222')) | 218 | .fontColor($r('app.color.color_222222')) |
| 214 | - .fontWeight(FontWeight.Medium) | ||
| 215 | - .margin({ left: $r('app.float.margin_5') }) | 219 | + .fontWeight(600) |
| 216 | .alignSelf(ItemAlign.Start) | 220 | .alignSelf(ItemAlign.Start) |
| 221 | + .height(21) | ||
| 222 | + .lineHeight(21) | ||
| 223 | + .margin({bottom: 1}) | ||
| 224 | + // .fontSize($r('app.float.font_size_14')) | ||
| 225 | + // .fontColor($r('app.color.color_222222')) | ||
| 226 | + // .fontWeight(FontWeight.Medium) | ||
| 227 | + // .margin({ left: $r('app.float.margin_5') }) | ||
| 228 | + // .alignSelf(ItemAlign.Start) | ||
| 217 | //简介 | 229 | //简介 |
| 218 | Text(this.contentDetailData.rmhInfo?.rmhDesc) | 230 | Text(this.contentDetailData.rmhInfo?.rmhDesc) |
| 219 | - .fontSize($r('app.float.font_size_14')) | 231 | + .fontSize($r('app.float.font_size_12')) |
| 220 | .fontColor($r('app.color.color_B0B0B0')) | 232 | .fontColor($r('app.color.color_B0B0B0')) |
| 221 | - .fontWeight(FontWeight.Medium) | ||
| 222 | .maxLines(1) | 233 | .maxLines(1) |
| 223 | .textOverflow({ overflow: TextOverflow.Ellipsis }) | 234 | .textOverflow({ overflow: TextOverflow.Ellipsis }) |
| 224 | - .margin({ left: $r('app.float.margin_5') }) | ||
| 225 | .alignSelf(ItemAlign.Start) | 235 | .alignSelf(ItemAlign.Start) |
| 236 | + .height(14) | ||
| 237 | + .lineHeight(14) | ||
| 226 | } | 238 | } |
| 227 | - .width('63%') | 239 | + .width('70%') |
| 228 | .margin({ right: $r('app.float.margin_6') }) | 240 | .margin({ right: $r('app.float.margin_6') }) |
| 229 | 241 | ||
| 242 | + Blank() | ||
| 230 | if (!StringUtils.isEmpty(this.followStatus)) { | 243 | if (!StringUtils.isEmpty(this.followStatus)) { |
| 231 | if (this.followStatus == '0') { | 244 | if (this.followStatus == '0') { |
| 232 | Row() { | 245 | Row() { |
| @@ -272,25 +285,22 @@ export struct DynamicDetailComponent { | @@ -272,25 +285,22 @@ export struct DynamicDetailComponent { | ||
| 272 | }) | 285 | }) |
| 273 | } | 286 | } |
| 274 | } | 287 | } |
| 275 | - } | ||
| 276 | - .width('100%') | ||
| 277 | - .margin({ left: $r('app.float.margin_16') }) | ||
| 278 | - | ||
| 279 | - //内容 | ||
| 280 | - Text(StringUtils.isEmpty(this.contentDetailData.newsContent) | ||
| 281 | - ? StringUtils.isEmpty(this.contentDetailData.newsSummary) | ||
| 282 | - ? this.contentDetailData.newsTitle | ||
| 283 | - : this.contentDetailData.newsSummary | ||
| 284 | - : this.contentDetailData.newsContent) | 288 | + }.padding({ |
| 289 | + left: $r('app.float.vp_16') | ||
| 290 | + , right: $r('app.float.vp_16') | ||
| 291 | + }) | ||
| 292 | + //标题 | ||
| 293 | + Text(this.titleText()) | ||
| 285 | .fontColor($r('app.color.color_222222')) | 294 | .fontColor($r('app.color.color_222222')) |
| 286 | .fontSize($r('app.float.font_size_18')) | 295 | .fontSize($r('app.float.font_size_18')) |
| 287 | .lineHeight($r('app.float.margin_25')) | 296 | .lineHeight($r('app.float.margin_25')) |
| 288 | - .margin({ | 297 | + .width('100%') |
| 298 | + .padding({ | ||
| 289 | top: $r('app.float.margin_6') | 299 | top: $r('app.float.margin_6') |
| 290 | - , left: $r('app.float.margin_16') | ||
| 291 | - , right: $r('app.float.margin_16') | 300 | + , left: $r('app.float.vp_16') |
| 301 | + , right: $r('app.float.margin_6') | ||
| 292 | }) | 302 | }) |
| 293 | - .alignSelf(ItemAlign.Start) | 303 | + //内容 |
| 294 | if (this.contentDetailData.newsType + "" == ContentConstants.TYPE_FOURTEEN) { | 304 | if (this.contentDetailData.newsType + "" == ContentConstants.TYPE_FOURTEEN) { |
| 295 | //附件内容:图片/视频 | 305 | //附件内容:图片/视频 |
| 296 | if (this.contentDetailData.photoList != null && this.contentDetailData.photoList.length > 0) { | 306 | if (this.contentDetailData.photoList != null && this.contentDetailData.photoList.length > 0) { |
| @@ -637,6 +647,16 @@ export struct DynamicDetailComponent { | @@ -637,6 +647,16 @@ export struct DynamicDetailComponent { | ||
| 637 | .height('100%') | 647 | .height('100%') |
| 638 | } | 648 | } |
| 639 | 649 | ||
| 650 | + private titleText() { | ||
| 651 | + if(!StringUtils.isEmpty(this.contentDetailData.newsContent)){ | ||
| 652 | + return this.contentDetailData.newsContent | ||
| 653 | + } | ||
| 654 | + if(StringUtils.isEmpty(this.contentDetailData.newsSummary)){ | ||
| 655 | + return this.contentDetailData.newsTitle | ||
| 656 | + } | ||
| 657 | + return this.contentDetailData.newsSummary | ||
| 658 | + } | ||
| 659 | + | ||
| 640 | /** | 660 | /** |
| 641 | * 请求(动态)详情页数据 | 661 | * 请求(动态)详情页数据 |
| 642 | * */ | 662 | * */ |
| 1 | -import { CompDTO, ContentDTO, Params } from 'wdBean'; | ||
| 2 | -import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'; | ||
| 3 | -import { HttpUrlUtils } from 'wdNetwork/Index'; | ||
| 4 | -import { postInteractAccentionOperateParams } from 'wdBean'; | ||
| 5 | -import { PageRepository } from '../../repository/PageRepository'; | ||
| 6 | -import { CommonConstants } from 'wdConstant/Index'; | 1 | +import { CompDTO, ContentDTO } from 'wdBean'; |
| 7 | import { onlyWifiLoadImg } from '../../utils/lazyloadImg'; | 2 | import { onlyWifiLoadImg } from '../../utils/lazyloadImg'; |
| 8 | -import { Tracking, TrackingContent, TrackConstants, ParamType } from 'wdTracking'; | ||
| 9 | -import { TrackingUtils } from 'wdTracking/src/main/ets/common/TrackingUtils' | 3 | +import { ParamType, Tracking } from 'wdTracking'; |
| 4 | +import { TrackingUtils } from 'wdTracking/src/main/ets/common/TrackingUtils'; | ||
| 5 | +import { ToastUtils } from 'wdKit'; | ||
| 6 | +import PageModel from '../../viewmodel/PageModel'; | ||
| 7 | + | ||
| 10 | /** | 8 | /** |
| 11 | * 兴趣卡 | 9 | * 兴趣卡 |
| 12 | * Zh_Single_Column-09 | 10 | * Zh_Single_Column-09 |
| @@ -16,17 +14,21 @@ const TAG = 'Zh_Single_Column-09' | @@ -16,17 +14,21 @@ const TAG = 'Zh_Single_Column-09' | ||
| 16 | @Entry | 14 | @Entry |
| 17 | @Component | 15 | @Component |
| 18 | export struct ZhSingleColumn09 { | 16 | export struct ZhSingleColumn09 { |
| 17 | + @State private pageModel: PageModel = new PageModel(); | ||
| 19 | @State pageId: string = ''; | 18 | @State pageId: string = ''; |
| 20 | @State pageName: string = ''; | 19 | @State pageName: string = ''; |
| 21 | @State compDTO: CompDTO = {} as CompDTO | 20 | @State compDTO: CompDTO = {} as CompDTO |
| 22 | @State activeIndexs: Array<number> = [] | 21 | @State activeIndexs: Array<number> = [] |
| 23 | @State operDataList: ContentDTO[] = this.compDTO?.operDataList || [] | 22 | @State operDataList: ContentDTO[] = this.compDTO?.operDataList || [] |
| 24 | - @State selfClosed: Boolean = false; | 23 | + @StorageLink('selfClosed') selfClosed: boolean = false |
| 25 | @State loadImg: boolean = false; | 24 | @State loadImg: boolean = false; |
| 25 | + @State compIndex: number = 0; | ||
| 26 | + @State currentOperDataListIndex: number = 0; //记录换一换点击次数 | ||
| 26 | 27 | ||
| 27 | async aboutToAppear(): Promise<void> { | 28 | async aboutToAppear(): Promise<void> { |
| 28 | this.loadImg = await onlyWifiLoadImg(); | 29 | this.loadImg = await onlyWifiLoadImg(); |
| 29 | this.operDataList = this.shuffleArray(this.compDTO?.operDataList) | 30 | this.operDataList = this.shuffleArray(this.compDTO?.operDataList) |
| 31 | + this.currentOperDataListIndex = this.compDTO?.operDataList.length | ||
| 30 | } | 32 | } |
| 31 | 33 | ||
| 32 | trackClick(type: 'close_interest_card_click' | 'interest_card_selecting_click') { | 34 | trackClick(type: 'close_interest_card_click' | 'interest_card_selecting_click') { |
| @@ -75,7 +77,7 @@ export struct ZhSingleColumn09 { | @@ -75,7 +77,7 @@ export struct ZhSingleColumn09 { | ||
| 75 | } | 77 | } |
| 76 | 78 | ||
| 77 | shuffleArray(array: ContentDTO[]) { | 79 | shuffleArray(array: ContentDTO[]) { |
| 78 | - for(let i = array.length - 1; i > 0; i--) { | 80 | + for (let i = array.length - 1; i > 0; i--) { |
| 79 | const j = Math.floor(Math.random() * (i + 1)); | 81 | const j = Math.floor(Math.random() * (i + 1)); |
| 80 | const tempArray = array[i]; | 82 | const tempArray = array[i]; |
| 81 | array[i] = array[j]; | 83 | array[i] = array[j]; |
| @@ -89,17 +91,17 @@ export struct ZhSingleColumn09 { | @@ -89,17 +91,17 @@ export struct ZhSingleColumn09 { | ||
| 89 | //顶部 | 91 | //顶部 |
| 90 | Row() { | 92 | Row() { |
| 91 | Column() { | 93 | Column() { |
| 92 | - Text('以下是否有您感兴趣?') | 94 | + Text('以下是否有您感兴趣的分类?') |
| 93 | .fontSize(18) | 95 | .fontSize(18) |
| 94 | .fontColor(0x000000) | 96 | .fontColor(0x000000) |
| 95 | .fontWeight(600) | 97 | .fontWeight(600) |
| 96 | .width('70%') | 98 | .width('70%') |
| 97 | - .padding({bottom: 4}) | 99 | + .padding({ bottom: 4 }) |
| 98 | 100 | ||
| 99 | Text('选中标签,为您推荐更多您感兴趣的内容') | 101 | Text('选中标签,为您推荐更多您感兴趣的内容') |
| 100 | .fontSize(12) | 102 | .fontSize(12) |
| 101 | .fontColor(0xB0B0B0) | 103 | .fontColor(0xB0B0B0) |
| 102 | - .padding({bottom: 10}) | 104 | + .padding({ bottom: 10 }) |
| 103 | .width('70%') | 105 | .width('70%') |
| 104 | } | 106 | } |
| 105 | 107 | ||
| @@ -108,14 +110,20 @@ export struct ZhSingleColumn09 { | @@ -108,14 +110,20 @@ export struct ZhSingleColumn09 { | ||
| 108 | .fontSize(14) | 110 | .fontSize(14) |
| 109 | .width(62) | 111 | .width(62) |
| 110 | .height(26) | 112 | .height(26) |
| 111 | - .backgroundColor(this.activeIndexs.length > 0 ? 0xfdf0ed : 0xf5f5f5) | ||
| 112 | - // .lineHeight(26) | 113 | + .backgroundColor(this.activeIndexs.length > 0 ? 0xfdf0ed : 0xf5f5f5)// .lineHeight(26) |
| 113 | .borderRadius(4) | 114 | .borderRadius(4) |
| 114 | - .margin({top: -10}) | ||
| 115 | - .padding({top: 0, bottom: 0, left: 0, right: 0}) | 115 | + .margin({ top: -10 }) |
| 116 | + .padding({ | ||
| 117 | + top: 0, | ||
| 118 | + bottom: 0, | ||
| 119 | + left: 0, | ||
| 120 | + right: 0 | ||
| 121 | + }) | ||
| 116 | .onClick(() => { | 122 | .onClick(() => { |
| 117 | this.trackClick('interest_card_selecting_click') | 123 | this.trackClick('interest_card_selecting_click') |
| 118 | if (this.activeIndexs.length > 0) { | 124 | if (this.activeIndexs.length > 0) { |
| 125 | + ToastUtils.shortToast('已为您调整推荐内容') | ||
| 126 | + this.pageModel.compList.deleteItem(this.compIndex) | ||
| 119 | this.selfClosed = true; | 127 | this.selfClosed = true; |
| 120 | } | 128 | } |
| 121 | }) | 129 | }) |
| @@ -126,18 +134,20 @@ export struct ZhSingleColumn09 { | @@ -126,18 +134,20 @@ export struct ZhSingleColumn09 { | ||
| 126 | Grid() { | 134 | Grid() { |
| 127 | ForEach(this.operDataList, (item: ContentDTO, index: number) => { | 135 | ForEach(this.operDataList, (item: ContentDTO, index: number) => { |
| 128 | GridItem() { | 136 | GridItem() { |
| 129 | - Stack({alignContent: Alignment.TopEnd}) { | 137 | + Stack({ alignContent: Alignment.TopEnd }) { |
| 130 | Image(this.loadImg ? item.coverUrl : '') | 138 | Image(this.loadImg ? item.coverUrl : '') |
| 131 | .backgroundColor(0xf5f5f5) | 139 | .backgroundColor(0xf5f5f5) |
| 132 | .width('100%') | 140 | .width('100%') |
| 133 | .height('100%') | 141 | .height('100%') |
| 134 | .borderRadius(3) | 142 | .borderRadius(3) |
| 135 | - Row(){} | 143 | + Row() { |
| 144 | + } | ||
| 136 | .width('100%') | 145 | .width('100%') |
| 137 | .height('100%') | 146 | .height('100%') |
| 138 | .backgroundColor('rgba(0, 0, 0, 1)') | 147 | .backgroundColor('rgba(0, 0, 0, 1)') |
| 139 | .opacity(0.4) | 148 | .opacity(0.4) |
| 140 | .borderRadius(3) | 149 | .borderRadius(3) |
| 150 | + | ||
| 141 | Text(item.newsTitle) | 151 | Text(item.newsTitle) |
| 142 | .width('100%') | 152 | .width('100%') |
| 143 | .height('100%') | 153 | .height('100%') |
| @@ -153,7 +163,7 @@ export struct ZhSingleColumn09 { | @@ -153,7 +163,7 @@ export struct ZhSingleColumn09 { | ||
| 153 | .width('100%') | 163 | .width('100%') |
| 154 | .height('100%') | 164 | .height('100%') |
| 155 | } | 165 | } |
| 156 | - .margin({right: index % 4 === 3 ? 0 : 6, bottom: 6}) | 166 | + .margin({ right: index % 4 === 3 ? 0 : 6, bottom: 6 }) |
| 157 | .onClick(() => { | 167 | .onClick(() => { |
| 158 | if (this.activeIndexs.includes(index)) { | 168 | if (this.activeIndexs.includes(index)) { |
| 159 | const ind = this.activeIndexs.indexOf(index); | 169 | const ind = this.activeIndexs.indexOf(index); |
| @@ -167,30 +177,37 @@ export struct ZhSingleColumn09 { | @@ -167,30 +177,37 @@ export struct ZhSingleColumn09 { | ||
| 167 | .height(90) | 177 | .height(90) |
| 168 | .columnsTemplate('1fr 1fr 1fr 1fr') | 178 | .columnsTemplate('1fr 1fr 1fr 1fr') |
| 169 | .rowsTemplate('1fr 1fr') | 179 | .rowsTemplate('1fr 1fr') |
| 170 | - .margin({bottom: 5}) | 180 | + .margin({ bottom: 5 }) |
| 171 | 181 | ||
| 172 | Row() { | 182 | Row() { |
| 173 | Row() { | 183 | Row() { |
| 174 | Text('换一换') | 184 | Text('换一换') |
| 175 | .fontSize(14) | 185 | .fontSize(14) |
| 176 | - .fontColor(this.compDTO?.operDataList.length > 8 ? 0xed2800 : 0xB0B0B0) | ||
| 177 | - .margin({right: 4}) | 186 | + .fontColor(this.compDTO?.operDataList.length > 8 && this.currentOperDataListIndex > 0 ? 0xed2800 : 0xB0B0B0) |
| 187 | + .margin({ right: 4 }) | ||
| 178 | Image(this.compDTO?.operDataList.length > 8 ? $r('app.media.icon_refresh') : $r('app.media.ic_refresh')) | 188 | Image(this.compDTO?.operDataList.length > 8 ? $r('app.media.icon_refresh') : $r('app.media.ic_refresh')) |
| 179 | .width(14) | 189 | .width(14) |
| 180 | .height(14) | 190 | .height(14) |
| 181 | } | 191 | } |
| 182 | .onClick(() => { | 192 | .onClick(() => { |
| 193 | + if (this.currentOperDataListIndex > 0) { | ||
| 194 | + this.currentOperDataListIndex-- | ||
| 195 | + } | ||
| 183 | if (this.compDTO?.operDataList.length > 8) { | 196 | if (this.compDTO?.operDataList.length > 8) { |
| 184 | - this.operDataList = this.shuffleArray(this.operDataList) | 197 | + if (this.pageModel) { |
| 198 | + this.pageModel.compList.deleteItem(this.compIndex) | ||
| 199 | + } | ||
| 185 | this.activeIndexs = []; | 200 | this.activeIndexs = []; |
| 186 | } | 201 | } |
| 187 | }) | 202 | }) |
| 203 | + | ||
| 188 | Row() { | 204 | Row() { |
| 189 | Image($r("app.media.close_button_new")) | 205 | Image($r("app.media.close_button_new")) |
| 190 | .width(9) | 206 | .width(9) |
| 191 | .height(9) | 207 | .height(9) |
| 192 | .onClick(() => { | 208 | .onClick(() => { |
| 193 | this.trackClick('close_interest_card_click') | 209 | this.trackClick('close_interest_card_click') |
| 210 | + this.pageModel.compList.deleteItem(this.compIndex) | ||
| 194 | this.selfClosed = true; | 211 | this.selfClosed = true; |
| 195 | }) | 212 | }) |
| 196 | } | 213 | } |
| @@ -44,7 +44,7 @@ export struct PlayUIComponent { | @@ -44,7 +44,7 @@ export struct PlayUIComponent { | ||
| 44 | return | 44 | return |
| 45 | } | 45 | } |
| 46 | this.isMenuVisible = false | 46 | this.isMenuVisible = false |
| 47 | - }, 4 * 1000) | 47 | + }, 5 * 1000) |
| 48 | } else { | 48 | } else { |
| 49 | clearTimeout(time) | 49 | clearTimeout(time) |
| 50 | } | 50 | } |
| @@ -168,7 +168,7 @@ export struct PlayUIComponent { | @@ -168,7 +168,7 @@ export struct PlayUIComponent { | ||
| 168 | } | 168 | } |
| 169 | //第二行右边直播状态参与人数 | 169 | //第二行右边直播状态参与人数 |
| 170 | this.getLiveStatusView() | 170 | this.getLiveStatusView() |
| 171 | - }.margin({top:-7}) | 171 | + }.margin({top:this.contentDetailData.liveInfo?.liveState != 'wait' ? 0 : -10}) |
| 172 | } | 172 | } |
| 173 | .width('100%') | 173 | .width('100%') |
| 174 | // .width(this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL ? 'calc(100% - 80vp)' : 'calc(100% - 32vp)') | 174 | // .width(this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL ? 'calc(100% - 80vp)' : 'calc(100% - 32vp)') |
| @@ -88,7 +88,7 @@ export struct PlayerTitleComponent { | @@ -88,7 +88,7 @@ export struct PlayerTitleComponent { | ||
| 88 | Row() { | 88 | Row() { |
| 89 | this.getLiveStatusView() | 89 | this.getLiveStatusView() |
| 90 | } | 90 | } |
| 91 | - .margin({left: this.contentDetailData.rmhInfo?.rmhName ? 0 : 34}) | 91 | + .margin({left: this.isLarge && this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL ? 34 : 0}) |
| 92 | 92 | ||
| 93 | } | 93 | } |
| 94 | .width('100%') | 94 | .width('100%') |
| @@ -18,6 +18,7 @@ const TAG = 'MainPage'; | @@ -18,6 +18,7 @@ const TAG = 'MainPage'; | ||
| 18 | 18 | ||
| 19 | PersistentStorage.persistProp('GestureLoadStrategy', 0); // 点播视频手势动画0为用户首次进入视频点播,1为用户已进入视频点播 | 19 | PersistentStorage.persistProp('GestureLoadStrategy', 0); // 点播视频手势动画0为用户首次进入视频点播,1为用户已进入视频点播 |
| 20 | PersistentStorage.persistProp('clickedIds', []); // 频道稿件已读存放稿件ID结合用户频道列表已读置灰回显 | 20 | PersistentStorage.persistProp('clickedIds', []); // 频道稿件已读存放稿件ID结合用户频道列表已读置灰回显 |
| 21 | +PersistentStorage.persistProp('selfClosed', false); // 新闻频道推荐兴趣卡,默认显示 | ||
| 21 | 22 | ||
| 22 | @Entry | 23 | @Entry |
| 23 | @Component | 24 | @Component |
| @@ -44,6 +44,7 @@ export struct MultiPictureDetailPageComponent { | @@ -44,6 +44,7 @@ export struct MultiPictureDetailPageComponent { | ||
| 44 | private swiperController: SwiperController = new SwiperController() | 44 | private swiperController: SwiperController = new SwiperController() |
| 45 | @State swiperIndex: number = 0; | 45 | @State swiperIndex: number = 0; |
| 46 | @Provide followStatus: string | undefined = '0' // 关注状态 | 46 | @Provide followStatus: string | undefined = '0' // 关注状态 |
| 47 | + @State isShowButton: boolean = false // 展示关注按钮,默认不展示 | ||
| 47 | @Provide showCommentList: boolean = false | 48 | @Provide showCommentList: boolean = false |
| 48 | private scroller: Scroller = new Scroller() | 49 | private scroller: Scroller = new Scroller() |
| 49 | private listScroller: ListScroller = new ListScroller() | 50 | private listScroller: ListScroller = new ListScroller() |
| @@ -155,6 +156,7 @@ export struct MultiPictureDetailPageComponent { | @@ -155,6 +156,7 @@ export struct MultiPictureDetailPageComponent { | ||
| 155 | @Builder | 156 | @Builder |
| 156 | rmh() { | 157 | rmh() { |
| 157 | if (!this.showDownload) { | 158 | if (!this.showDownload) { |
| 159 | + Row(){ | ||
| 158 | Row() { | 160 | Row() { |
| 159 | Row({ space: 8 }) { | 161 | Row({ space: 8 }) { |
| 160 | if (this.getImgUrl()) { | 162 | if (this.getImgUrl()) { |
| @@ -261,7 +263,7 @@ export struct MultiPictureDetailPageComponent { | @@ -261,7 +263,7 @@ export struct MultiPictureDetailPageComponent { | ||
| 261 | .height(24) | 263 | .height(24) |
| 262 | .onClick(() => { | 264 | .onClick(() => { |
| 263 | this.handleAccention() | 265 | this.handleAccention() |
| 264 | - }) | 266 | + }).visibility(this.isShowButton ? Visibility.Visible : Visibility.None) |
| 265 | } else { | 267 | } else { |
| 266 | Button({ type: ButtonType.Normal, stateEffect: true }) { | 268 | Button({ type: ButtonType.Normal, stateEffect: true }) { |
| 267 | Row() { | 269 | Row() { |
| @@ -274,7 +276,7 @@ export struct MultiPictureDetailPageComponent { | @@ -274,7 +276,7 @@ export struct MultiPictureDetailPageComponent { | ||
| 274 | .height(24) | 276 | .height(24) |
| 275 | .onClick(() => { | 277 | .onClick(() => { |
| 276 | this.handleAccention() | 278 | this.handleAccention() |
| 277 | - }) | 279 | + }).visibility(this.isShowButton ? Visibility.Visible : Visibility.None) |
| 278 | } | 280 | } |
| 279 | 281 | ||
| 280 | } | 282 | } |
| @@ -296,6 +298,15 @@ export struct MultiPictureDetailPageComponent { | @@ -296,6 +298,15 @@ export struct MultiPictureDetailPageComponent { | ||
| 296 | TransitionEffect.translate({ x: 0, y: `-${this.topSafeHeight + 12}px` }) | 298 | TransitionEffect.translate({ x: 0, y: `-${this.topSafeHeight + 12}px` }) |
| 297 | )) | 299 | )) |
| 298 | } | 300 | } |
| 301 | + .width('100%') | ||
| 302 | + .height(44 + px2vp(this.topSafeHeight)) | ||
| 303 | + .zIndex(10) | ||
| 304 | + .linearGradient({ | ||
| 305 | + direction: GradientDirection.Top, // 渐变方向 | ||
| 306 | + colors: [['rgba(18, 18, 18, 0)', 0], | ||
| 307 | + ['rgba(18, 18, 18, 0.8)', 1.0]] // 数组末尾元素占比小于1时满足重复着色效果 | ||
| 308 | + }) | ||
| 309 | + } | ||
| 299 | } | 310 | } |
| 300 | 311 | ||
| 301 | @Builder | 312 | @Builder |
| @@ -436,6 +447,11 @@ export struct MultiPictureDetailPageComponent { | @@ -436,6 +447,11 @@ export struct MultiPictureDetailPageComponent { | ||
| 436 | .edgeEffect(EdgeEffect.None) | 447 | .edgeEffect(EdgeEffect.None) |
| 437 | .scrollBarWidth(0) | 448 | .scrollBarWidth(0) |
| 438 | .scrollBar(BarState.Off) | 449 | .scrollBar(BarState.Off) |
| 450 | + .linearGradient({ | ||
| 451 | + direction: GradientDirection.Bottom, // 渐变方向 | ||
| 452 | + colors: [['rgba(18, 18, 18, 0)', 0], | ||
| 453 | + ['rgba(18, 18, 18, 0.8)', 1.0]] // 数组末尾元素占比小于1时满足重复着色效果 | ||
| 454 | + }) | ||
| 439 | 455 | ||
| 440 | OperRowListView({ | 456 | OperRowListView({ |
| 441 | contentDetailData: this.contentDetailData, | 457 | contentDetailData: this.contentDetailData, |
| @@ -536,11 +552,11 @@ export struct MultiPictureDetailPageComponent { | @@ -536,11 +552,11 @@ export struct MultiPictureDetailPageComponent { | ||
| 536 | .then(async (resDTO: ResponseDTO<ContentDetailDTO[]>) => { | 552 | .then(async (resDTO: ResponseDTO<ContentDetailDTO[]>) => { |
| 537 | this.isOffLine = resDTO.data == null ? true : false | 553 | this.isOffLine = resDTO.data == null ? true : false |
| 538 | if (!resDTO || !resDTO.data) { | 554 | if (!resDTO || !resDTO.data) { |
| 539 | - Logger.error(TAG, 'fetchDetailData is empty'); | 555 | + // Logger.error(TAG, 'fetchDetailData is empty'); |
| 540 | return | 556 | return |
| 541 | } | 557 | } |
| 542 | if (resDTO.code != 0) { | 558 | if (resDTO.code != 0) { |
| 543 | - Logger.error(TAG, `fetchDetailData then code:${resDTO.code}, message:${resDTO.message}`); | 559 | + // Logger.error(TAG, `fetchDetailData then code:${resDTO.code}, message:${resDTO.message}`); |
| 544 | return | 560 | return |
| 545 | } | 561 | } |
| 546 | this.netStatus = undefined | 562 | this.netStatus = undefined |
| @@ -565,9 +581,9 @@ export struct MultiPictureDetailPageComponent { | @@ -565,9 +581,9 @@ export struct MultiPictureDetailPageComponent { | ||
| 565 | // 暂无内容 | 581 | // 暂无内容 |
| 566 | this.netStatus = 0 | 582 | this.netStatus = 0 |
| 567 | this.operationButtonList = [] | 583 | this.operationButtonList = [] |
| 568 | - Logger.info(TAG, `this.netStatus:${JSON.stringify(this.netStatus)}`) | 584 | + // Logger.info(TAG, `this.netStatus:${JSON.stringify(this.netStatus)}`) |
| 569 | } | 585 | } |
| 570 | - Logger.info(TAG, `contentDetailData:${JSON.stringify(this.contentDetailData)}`) | 586 | + // Logger.info(TAG, `contentDetailData:${JSON.stringify(this.contentDetailData)}`) |
| 571 | // 未登录,跳转登录 | 587 | // 未登录,跳转登录 |
| 572 | const user_id = await SPHelper.default.get(SpConstants.USER_ID, '') | 588 | const user_id = await SPHelper.default.get(SpConstants.USER_ID, '') |
| 573 | if (user_id) { | 589 | if (user_id) { |
| @@ -576,7 +592,7 @@ export struct MultiPictureDetailPageComponent { | @@ -576,7 +592,7 @@ export struct MultiPictureDetailPageComponent { | ||
| 576 | } | 592 | } |
| 577 | }) | 593 | }) |
| 578 | .catch((err: Error) => { | 594 | .catch((err: Error) => { |
| 579 | - console.log(TAG, `fetchDetailData then,err: ${JSON.stringify(err)}`); | 595 | + // console.log(TAG, `fetchDetailData then,err: ${JSON.stringify(err)}`); |
| 580 | // 内容获取失败 | 596 | // 内容获取失败 |
| 581 | this.netStatus = 9 | 597 | this.netStatus = 9 |
| 582 | this.operationButtonList = [] | 598 | this.operationButtonList = [] |
| @@ -592,7 +608,6 @@ export struct MultiPictureDetailPageComponent { | @@ -592,7 +608,6 @@ export struct MultiPictureDetailPageComponent { | ||
| 592 | 608 | ||
| 593 | // 记录浏览历史 | 609 | // 记录浏览历史 |
| 594 | private getInteractBrowsOperate() { | 610 | private getInteractBrowsOperate() { |
| 595 | - try { | ||
| 596 | const params: postInteractBrowsOperateParams = { | 611 | const params: postInteractBrowsOperateParams = { |
| 597 | delStatus: 0, | 612 | delStatus: 0, |
| 598 | contentList: [{ | 613 | contentList: [{ |
| @@ -601,26 +616,18 @@ export struct MultiPictureDetailPageComponent { | @@ -601,26 +616,18 @@ export struct MultiPictureDetailPageComponent { | ||
| 601 | contentType: this.contentDetailData?.newsType || 0, | 616 | contentType: this.contentDetailData?.newsType || 0, |
| 602 | }] | 617 | }] |
| 603 | } | 618 | } |
| 604 | - MultiPictureDetailViewModel.getInteractBrowsOperate(params).then(res => { | ||
| 605 | - console.log(TAG, '记录浏览历史==', JSON.stringify(res.data)) | ||
| 606 | - }) | ||
| 607 | - } catch (exception) { | ||
| 608 | - | ||
| 609 | - } | 619 | + MultiPictureDetailViewModel.getInteractBrowsOperate(params) |
| 610 | } | 620 | } |
| 611 | 621 | ||
| 612 | // 已登录->批量查作品是否被号主关注 | 622 | // 已登录->批量查作品是否被号主关注 |
| 613 | private async getBatchAttentionStatus() { | 623 | private async getBatchAttentionStatus() { |
| 614 | - try { | ||
| 615 | const params: postBatchAttentionStatusParams = { | 624 | const params: postBatchAttentionStatusParams = { |
| 616 | creatorIds: [{ creatorId: this.contentDetailData?.rmhInfo?.rmhId ?? '' }] | 625 | creatorIds: [{ creatorId: this.contentDetailData?.rmhInfo?.rmhId ?? '' }] |
| 617 | } | 626 | } |
| 618 | let data = await MultiPictureDetailViewModel.getBatchAttentionStatus(params) | 627 | let data = await MultiPictureDetailViewModel.getBatchAttentionStatus(params) |
| 619 | this.followStatus = data[0]?.status; | 628 | this.followStatus = data[0]?.status; |
| 620 | - Logger.info(TAG, `followStatus:${JSON.stringify(this.followStatus)}`) | ||
| 621 | - } catch (exception) { | ||
| 622 | - | ||
| 623 | - } | 629 | + this.isShowButton = true |
| 630 | + // Logger.info(TAG, `followStatus:${JSON.stringify(this.followStatus)}`) | ||
| 624 | } | 631 | } |
| 625 | 632 | ||
| 626 | /** | 633 | /** |
| @@ -643,7 +650,7 @@ export struct MultiPictureDetailPageComponent { | @@ -643,7 +650,7 @@ export struct MultiPictureDetailPageComponent { | ||
| 643 | status: this.followStatus == '1' ? 0 : 1, | 650 | status: this.followStatus == '1' ? 0 : 1, |
| 644 | } | 651 | } |
| 645 | PageRepository.postInteractAccentionOperate(params).then(res => { | 652 | PageRepository.postInteractAccentionOperate(params).then(res => { |
| 646 | - console.log(TAG, '关注号主==', JSON.stringify(res.data)) | 653 | + // console.log(TAG, '关注号主==', JSON.stringify(res.data)) |
| 647 | if (this.followStatus == '1') { | 654 | if (this.followStatus == '1') { |
| 648 | this.followStatus = '0' | 655 | this.followStatus = '0' |
| 649 | TrackingContent.follow(true,this.followUserId,this.followUserName,TrackConstants.PageName.Atlas_Detail,TrackConstants.PageName.Atlas_Detail,this.pageParam) | 656 | TrackingContent.follow(true,this.followUserId,this.followUserName,TrackConstants.PageName.Atlas_Detail,TrackConstants.PageName.Atlas_Detail,this.pageParam) |
-
Please register or login to post a comment