Merge branch 'main' of http://192.168.1.42/developOne/harmonyPool into main
* 'main' of http://192.168.1.42/developOne/harmonyPool: feat(动态):动态详情处理
Showing
5 changed files
with
92 additions
and
68 deletions
| @@ -51,6 +51,8 @@ export { MultiPictureDetailPageComponent } from "./src/main/ets/components/Multi | @@ -51,6 +51,8 @@ export { MultiPictureDetailPageComponent } from "./src/main/ets/components/Multi | ||
| 51 | 51 | ||
| 52 | export { AudioDetailComponent } from "./src/main/ets/components/AudioDetailComponent" | 52 | export { AudioDetailComponent } from "./src/main/ets/components/AudioDetailComponent" |
| 53 | 53 | ||
| 54 | +export { DynamicDetailComponent } from "./src/main/ets/components/DynamicDetailComponent" | ||
| 55 | + | ||
| 54 | export { AudioSuspensionModel } from "./src/main/ets/viewmodel/AudioSuspensionModel" | 56 | export { AudioSuspensionModel } from "./src/main/ets/viewmodel/AudioSuspensionModel" |
| 55 | 57 | ||
| 56 | export { BroadcastPageComponent } from "./src/main/ets/components/broadcast/BroadcastPageComponent" | 58 | export { BroadcastPageComponent } from "./src/main/ets/components/broadcast/BroadcastPageComponent" |
| @@ -2,12 +2,14 @@ import { AccountManagerUtils, Logger } from 'wdKit'; | @@ -2,12 +2,14 @@ import { AccountManagerUtils, Logger } from 'wdKit'; | ||
| 2 | import { MultiPictureDetailViewModel } from '../viewmodel/MultiPictureDetailViewModel'; | 2 | import { MultiPictureDetailViewModel } from '../viewmodel/MultiPictureDetailViewModel'; |
| 3 | import { ContentDetailDTO,batchLikeAndCollectResult,batchLikeAndCollectParams,postBatchAttentionStatusParams, | 3 | import { ContentDetailDTO,batchLikeAndCollectResult,batchLikeAndCollectParams,postBatchAttentionStatusParams, |
| 4 | PhotoListBean, | 4 | PhotoListBean, |
| 5 | - ContentDTO, } from 'wdBean'; | 5 | + ContentDTO, |
| 6 | + RmhInfoDTO, } from 'wdBean'; | ||
| 6 | import media from '@ohos.multimedia.media'; | 7 | import media from '@ohos.multimedia.media'; |
| 7 | import { OperRowListView } from './view/OperRowListView'; | 8 | import { OperRowListView } from './view/OperRowListView'; |
| 8 | import { WDPlayerController } from 'wdPlayer/Index'; | 9 | import { WDPlayerController } from 'wdPlayer/Index'; |
| 9 | import { ContentConstants } from '../constants/ContentConstants'; | 10 | import { ContentConstants } from '../constants/ContentConstants'; |
| 10 | import { ProcessUtils } from '../utils/ProcessUtils'; | 11 | import { ProcessUtils } from '../utils/ProcessUtils'; |
| 12 | +import { StringUtils } from 'wdKit/src/main/ets/utils/StringUtils'; | ||
| 11 | 13 | ||
| 12 | const TAG = 'DynamicDetailComponent' | 14 | const TAG = 'DynamicDetailComponent' |
| 13 | @Preview | 15 | @Preview |
| @@ -17,8 +19,15 @@ export struct DynamicDetailComponent { | @@ -17,8 +19,15 @@ export struct DynamicDetailComponent { | ||
| 17 | private relId: string = '' | 19 | private relId: string = '' |
| 18 | private contentId: string = '' | 20 | private contentId: string = '' |
| 19 | private relType: string = '' | 21 | private relType: string = '' |
| 20 | - //出参 | ||
| 21 | - @State contentDetailData: ContentDetailDTO = {} as ContentDetailDTO | 22 | + //出参 fixme 模拟数据用json转换 |
| 23 | + @State contentDetailData: ContentDetailDTO = { | ||
| 24 | + publishTime: "2023年03月14日 08:16", | ||
| 25 | + rmhInfo:{rmhHeadUrl:"",rmhName:"人民号名称",rmhDesc:"人民号描述单行展示"}, | ||
| 26 | + newsContent:"优先展示这个内容", | ||
| 27 | + newsSummary:"其次展示这个内容", | ||
| 28 | + newsTitle:"上面两个都没有再展示这个内容", | ||
| 29 | + newsType:15 | ||
| 30 | + } as ContentDetailDTO | ||
| 22 | //变量 | 31 | //变量 |
| 23 | /** | 32 | /** |
| 24 | * 默认未关注 点击去关注 | 33 | * 默认未关注 点击去关注 |
| @@ -46,7 +55,7 @@ export struct DynamicDetailComponent { | @@ -46,7 +55,7 @@ export struct DynamicDetailComponent { | ||
| 46 | .height($r('app.float.margin_28')) | 55 | .height($r('app.float.margin_28')) |
| 47 | .margin({ left: $r('app.float.margin_16') }) | 56 | .margin({ left: $r('app.float.margin_16') }) |
| 48 | Blank() | 57 | Blank() |
| 49 | - Text("2023年03月14日 08:16") | 58 | + Text(this.contentDetailData.publishTime) |
| 50 | .fontColor($r('app.color.color_B0B0B0')) | 59 | .fontColor($r('app.color.color_B0B0B0')) |
| 51 | .fontSize($r('app.float.font_size_12')) | 60 | .fontSize($r('app.float.font_size_12')) |
| 52 | .lineHeight($r('app.float.margin_28')) | 61 | .lineHeight($r('app.float.margin_28')) |
| @@ -80,22 +89,27 @@ export struct DynamicDetailComponent { | @@ -80,22 +89,27 @@ export struct DynamicDetailComponent { | ||
| 80 | .alignContent(Alignment.Center) | 89 | .alignContent(Alignment.Center) |
| 81 | Column(){ | 90 | Column(){ |
| 82 | //昵称 | 91 | //昵称 |
| 83 | - Text("this.contentDetailData.rmhInfo?.rmhName") | 92 | + Text(this.contentDetailData.rmhInfo?.rmhName) |
| 84 | .fontSize($r('app.float.font_size_14')) | 93 | .fontSize($r('app.float.font_size_14')) |
| 85 | .fontColor($r('app.color.color_222222')) | 94 | .fontColor($r('app.color.color_222222')) |
| 86 | .fontWeight(FontWeight.Medium) | 95 | .fontWeight(FontWeight.Medium) |
| 87 | .margin({ left: $r('app.float.margin_5') }) | 96 | .margin({ left: $r('app.float.margin_5') }) |
| 97 | + .alignSelf(ItemAlign.Start) | ||
| 88 | //简介 | 98 | //简介 |
| 89 | - Text("this.contentDetailData.rmhInfo?.rmhDesc") | 99 | + Text(this.contentDetailData.rmhInfo?.rmhDesc) |
| 90 | .fontSize($r('app.float.font_size_14')) | 100 | .fontSize($r('app.float.font_size_14')) |
| 91 | .fontColor($r('app.color.color_B0B0B0')) | 101 | .fontColor($r('app.color.color_B0B0B0')) |
| 92 | .fontWeight(FontWeight.Medium) | 102 | .fontWeight(FontWeight.Medium) |
| 103 | + .maxLines(1) | ||
| 93 | .margin({ left: $r('app.float.margin_5') }) | 104 | .margin({ left: $r('app.float.margin_5') }) |
| 105 | + .alignSelf(ItemAlign.Start) | ||
| 94 | } | 106 | } |
| 107 | + .width('63%') | ||
| 108 | + .margin({right: $r('app.float.margin_6')}) | ||
| 95 | if (this.followStatus == '0') { | 109 | if (this.followStatus == '0') { |
| 96 | Text('关注') | 110 | Text('关注') |
| 97 | - .width(60) | ||
| 98 | - .height($r('app.float.margin_48')) | 111 | + .width($r('app.float.margin_54')) |
| 112 | + .height($r('app.float.margin_24')) | ||
| 99 | .textAlign(TextAlign.Center) | 113 | .textAlign(TextAlign.Center) |
| 100 | .fontSize($r('app.float.font_size_12')) | 114 | .fontSize($r('app.float.font_size_12')) |
| 101 | .borderRadius($r('app.float.vp_3')) | 115 | .borderRadius($r('app.float.vp_3')) |
| @@ -120,14 +134,20 @@ export struct DynamicDetailComponent { | @@ -120,14 +134,20 @@ export struct DynamicDetailComponent { | ||
| 120 | } | 134 | } |
| 121 | } | 135 | } |
| 122 | .width('100%') | 136 | .width('100%') |
| 137 | + .margin({ left: $r('app.float.margin_16')}) | ||
| 123 | //内容 | 138 | //内容 |
| 124 | - Text("这里展示标题这里展示标题这里展示标题这里这里展示标题这里展示标题这里展示标题这里这里展示标题这里展示标题这里展示标题这里") | 139 | + Text(StringUtils.isEmpty(this.contentDetailData.newsContent) |
| 140 | + ?StringUtils.isEmpty(this.contentDetailData.newsSummary) | ||
| 141 | + ?this.contentDetailData.newsTitle | ||
| 142 | + :this.contentDetailData.newsSummary | ||
| 143 | + :this.contentDetailData.newsContent) | ||
| 125 | .fontColor($r('app.color.color_222222')) | 144 | .fontColor($r('app.color.color_222222')) |
| 126 | .fontSize($r('app.float.font_size_18')) | 145 | .fontSize($r('app.float.font_size_18')) |
| 127 | .lineHeight($r('app.float.margin_25')) | 146 | .lineHeight($r('app.float.margin_25')) |
| 128 | .margin({ top: $r('app.float.margin_6') | 147 | .margin({ top: $r('app.float.margin_6') |
| 129 | ,left: $r('app.float.margin_16') | 148 | ,left: $r('app.float.margin_16') |
| 130 | ,right: $r('app.float.margin_16') }) | 149 | ,right: $r('app.float.margin_16') }) |
| 150 | + .alignSelf(ItemAlign.Start) | ||
| 131 | if(this.contentDetailData.photoList!= null && this.contentDetailData.photoList.length>0){ | 151 | if(this.contentDetailData.photoList!= null && this.contentDetailData.photoList.length>0){ |
| 132 | //附件内容:图片/视频 | 152 | //附件内容:图片/视频 |
| 133 | if(this.contentDetailData.newsType+"" == ContentConstants.TYPE_FOURTEEN){ | 153 | if(this.contentDetailData.newsType+"" == ContentConstants.TYPE_FOURTEEN){ |
| @@ -140,17 +160,13 @@ export struct DynamicDetailComponent { | @@ -140,17 +160,13 @@ export struct DynamicDetailComponent { | ||
| 140 | }) { | 160 | }) { |
| 141 | ForEach(this.contentDetailData.photoList, (item: PhotoListBean, index: number) => { | 161 | ForEach(this.contentDetailData.photoList, (item: PhotoListBean, index: number) => { |
| 142 | GridCol() { | 162 | GridCol() { |
| 143 | - this.buildItemCard(this.contentDetailData.photoList[index],this.contentDetailData.photoList.length, index); | 163 | + this.buildItemCard(item.picPath,this.contentDetailData.photoList.length, index); |
| 144 | } | 164 | } |
| 165 | + // .onClick() | ||
| 145 | }) | 166 | }) |
| 146 | } | 167 | } |
| 147 | }else{ | 168 | }else{ |
| 148 | - //附件内容:视频,只有一个 | ||
| 149 | - ForEach(this.contentDetailData.photoList, (item: PhotoListBean, index: number) => { | ||
| 150 | - GridCol() { | ||
| 151 | - this.buildItemCard(this.contentDetailData.photoList[index],this.contentDetailData.photoList.length, index); | ||
| 152 | - } | ||
| 153 | - }) | 169 | + this.buildItemCard(this.contentDetailData.videoInfo[0].firstFrameImageUri, this.contentDetailData.photoList.length, 0); |
| 154 | } | 170 | } |
| 155 | } | 171 | } |
| 156 | //特别声明 | 172 | //特别声明 |
| @@ -194,8 +210,11 @@ export struct DynamicDetailComponent { | @@ -194,8 +210,11 @@ export struct DynamicDetailComponent { | ||
| 194 | //评论组件/底部组件 | 210 | //评论组件/底部组件 |
| 195 | 211 | ||
| 196 | } | 212 | } |
| 213 | + .alignSelf(ItemAlign.Start) | ||
| 197 | } | 214 | } |
| 198 | .backgroundColor('#FFFFFFFF') | 215 | .backgroundColor('#FFFFFFFF') |
| 216 | + .width('100%') | ||
| 217 | + .height('100%') | ||
| 199 | } | 218 | } |
| 200 | /** | 219 | /** |
| 201 | * 请求(动态)详情页数据 | 220 | * 请求(动态)详情页数据 |
| @@ -265,7 +284,7 @@ export struct DynamicDetailComponent { | @@ -265,7 +284,7 @@ export struct DynamicDetailComponent { | ||
| 265 | * @param programmeBean item 组件项, 上面icon,下面标题 | 284 | * @param programmeBean item 组件项, 上面icon,下面标题 |
| 266 | */ | 285 | */ |
| 267 | @Builder | 286 | @Builder |
| 268 | - buildItemCard(item: PhotoListBean,len: number,index: number) { | 287 | + buildItemCard(item: string,len: number,index: number) { |
| 269 | Column() { | 288 | Column() { |
| 270 | this.setItemImageRoundCorner(len, item, index) | 289 | this.setItemImageRoundCorner(len, item, index) |
| 271 | Flex({ direction: FlexDirection.Row }) { | 290 | Flex({ direction: FlexDirection.Row }) { |
| @@ -307,137 +326,137 @@ export struct DynamicDetailComponent { | @@ -307,137 +326,137 @@ export struct DynamicDetailComponent { | ||
| 307 | 326 | ||
| 308 | //设置图片圆角 | 327 | //设置图片圆角 |
| 309 | @Builder | 328 | @Builder |
| 310 | - setItemImageRoundCorner(len: number, item: PhotoListBean, index: number) { | 329 | + setItemImageRoundCorner(len: number, picPath: string, index: number) { |
| 311 | if (len == 1) { | 330 | if (len == 1) { |
| 312 | //四角圆角 | 331 | //四角圆角 |
| 313 | - this.setItemImageStyle(item.picPath, 4, 4, 4, 4); | 332 | + this.setItemImageStyle(picPath, 4, 4, 4, 4); |
| 314 | } else if (len == 2) { | 333 | } else if (len == 2) { |
| 315 | if (index == 0) { | 334 | if (index == 0) { |
| 316 | //左边圆角 | 335 | //左边圆角 |
| 317 | - this.setItemImageStyle(item.picPath, 4, 0, 4, 0); | 336 | + this.setItemImageStyle(picPath, 4, 0, 4, 0); |
| 318 | } else { | 337 | } else { |
| 319 | //右边圆角 | 338 | //右边圆角 |
| 320 | - this.setItemImageStyle(item.picPath, 0, 4, 0, 4); | 339 | + this.setItemImageStyle(picPath, 0, 4, 0, 4); |
| 321 | } | 340 | } |
| 322 | } else if (3 == len) { | 341 | } else if (3 == len) { |
| 323 | if (index == 0) { | 342 | if (index == 0) { |
| 324 | //左边圆角 | 343 | //左边圆角 |
| 325 | - this.setItemImageStyle(item.picPath, 4, 0, 4, 0); | 344 | + this.setItemImageStyle(picPath, 4, 0, 4, 0); |
| 326 | } else if (index == 1) { | 345 | } else if (index == 1) { |
| 327 | //直角 | 346 | //直角 |
| 328 | - this.setItemImageStyle(item.picPath, 0, 0, 0, 0); | 347 | + this.setItemImageStyle(picPath, 0, 0, 0, 0); |
| 329 | } else { | 348 | } else { |
| 330 | //右边圆角 | 349 | //右边圆角 |
| 331 | - this.setItemImageStyle(item.picPath, 0, 4, 0, 4); | 350 | + this.setItemImageStyle(picPath, 0, 4, 0, 4); |
| 332 | } | 351 | } |
| 333 | } else if (4 == len) { | 352 | } else if (4 == len) { |
| 334 | if (index == 0) { | 353 | if (index == 0) { |
| 335 | //左边圆角 | 354 | //左边圆角 |
| 336 | - this.setItemImageStyle(item.picPath, 4, 0, 4, 0); | 355 | + this.setItemImageStyle(picPath, 4, 0, 4, 0); |
| 337 | } else if (index == 1) { | 356 | } else if (index == 1) { |
| 338 | //右边圆角 | 357 | //右边圆角 |
| 339 | - this.setItemImageStyle(item.picPath, 0, 4, 0, 4); | 358 | + this.setItemImageStyle(picPath, 0, 4, 0, 4); |
| 340 | } else if (index = 2) { | 359 | } else if (index = 2) { |
| 341 | //左边圆角 | 360 | //左边圆角 |
| 342 | - this.setItemImageStyle(item.picPath, 4, 0, 4, 0); | 361 | + this.setItemImageStyle(picPath, 4, 0, 4, 0); |
| 343 | } else { | 362 | } else { |
| 344 | //右边圆角 | 363 | //右边圆角 |
| 345 | - this.setItemImageStyle(item.picPath, 0, 4, 0, 4); | 364 | + this.setItemImageStyle(picPath, 0, 4, 0, 4); |
| 346 | } | 365 | } |
| 347 | } else if (5 == len) { | 366 | } else if (5 == len) { |
| 348 | if (index == 0) { | 367 | if (index == 0) { |
| 349 | - this.setItemImageStyle(item.picPath, 4, 0, 0, 0); | 368 | + this.setItemImageStyle(picPath, 4, 0, 0, 0); |
| 350 | } else if (index == 1) { | 369 | } else if (index == 1) { |
| 351 | //直角 | 370 | //直角 |
| 352 | - this.setItemImageStyle(item.picPath, 0, 0, 0, 0); | 371 | + this.setItemImageStyle(picPath, 0, 0, 0, 0); |
| 353 | } else if (index = 2) { | 372 | } else if (index = 2) { |
| 354 | - this.setItemImageStyle(item.picPath, 4, 4, 4, 4); | 373 | + this.setItemImageStyle(picPath, 4, 4, 4, 4); |
| 355 | } else if (index = 3) { | 374 | } else if (index = 3) { |
| 356 | - this.setItemImageStyle(item.picPath, 0, 0, 4, 0); | 375 | + this.setItemImageStyle(picPath, 0, 0, 4, 0); |
| 357 | } else { | 376 | } else { |
| 358 | - this.setItemImageStyle(item.picPath, 0, 0, 0, 4); | 377 | + this.setItemImageStyle(picPath, 0, 0, 0, 4); |
| 359 | } | 378 | } |
| 360 | } else if (6 == len) { | 379 | } else if (6 == len) { |
| 361 | if (index == 0) { | 380 | if (index == 0) { |
| 362 | - this.setItemImageStyle(item.picPath, 4, 0, 0, 0); | 381 | + this.setItemImageStyle(picPath, 4, 0, 0, 0); |
| 363 | } else if (index == 1) { | 382 | } else if (index == 1) { |
| 364 | //直角 | 383 | //直角 |
| 365 | - this.setItemImageStyle(item.picPath, 0, 0, 0, 0); | 384 | + this.setItemImageStyle(picPath, 0, 0, 0, 0); |
| 366 | } else if (index = 2) { | 385 | } else if (index = 2) { |
| 367 | - this.setItemImageStyle(item.picPath, 0, 4, 0, 0); | 386 | + this.setItemImageStyle(picPath, 0, 4, 0, 0); |
| 368 | } else if (index = 3) { | 387 | } else if (index = 3) { |
| 369 | - this.setItemImageStyle(item.picPath, 0, 0, 4, 0); | 388 | + this.setItemImageStyle(picPath, 0, 0, 4, 0); |
| 370 | } else if (index = 4) { | 389 | } else if (index = 4) { |
| 371 | //直角 | 390 | //直角 |
| 372 | - this.setItemImageStyle(item.picPath, 0, 0, 0, 0); | 391 | + this.setItemImageStyle(picPath, 0, 0, 0, 0); |
| 373 | } else { | 392 | } else { |
| 374 | //右边圆角 | 393 | //右边圆角 |
| 375 | - this.setItemImageStyle(item.picPath, 0, 0, 0, 4); | 394 | + this.setItemImageStyle(picPath, 0, 0, 0, 4); |
| 376 | } | 395 | } |
| 377 | } else if (7 == len) { | 396 | } else if (7 == len) { |
| 378 | if (index == 0) { | 397 | if (index == 0) { |
| 379 | - this.setItemImageStyle(item.picPath, 4, 0, 0, 0); | 398 | + this.setItemImageStyle(picPath, 4, 0, 0, 0); |
| 380 | } else if (index == 1) { | 399 | } else if (index == 1) { |
| 381 | //直角 | 400 | //直角 |
| 382 | - this.setItemImageStyle(item.picPath, 0, 0, 0, 0); | 401 | + this.setItemImageStyle(picPath, 0, 0, 0, 0); |
| 383 | } else if (index = 2) { | 402 | } else if (index = 2) { |
| 384 | - this.setItemImageStyle(item.picPath, 0, 4, 0, 0); | 403 | + this.setItemImageStyle(picPath, 0, 4, 0, 0); |
| 385 | } else if (index = 3) { | 404 | } else if (index = 3) { |
| 386 | //直角 | 405 | //直角 |
| 387 | - this.setItemImageStyle(item.picPath, 0, 0, 0, 0); | 406 | + this.setItemImageStyle(picPath, 0, 0, 0, 0); |
| 388 | } else if (index = 4) { | 407 | } else if (index = 4) { |
| 389 | //直角 | 408 | //直角 |
| 390 | - this.setItemImageStyle(item.picPath, 0, 0, 0, 0); | 409 | + this.setItemImageStyle(picPath, 0, 0, 0, 0); |
| 391 | } else if (index = 5) { | 410 | } else if (index = 5) { |
| 392 | - this.setItemImageStyle(item.picPath, 0, 0, 0, 4); | 411 | + this.setItemImageStyle(picPath, 0, 0, 0, 4); |
| 393 | } else { | 412 | } else { |
| 394 | - this.setItemImageStyle(item.picPath, 0, 0, 4, 4); | 413 | + this.setItemImageStyle(picPath, 0, 0, 4, 4); |
| 395 | } | 414 | } |
| 396 | } else if (8 == len) { | 415 | } else if (8 == len) { |
| 397 | if (index == 0) { | 416 | if (index == 0) { |
| 398 | - this.setItemImageStyle(item.picPath, 4, 0, 0, 0); | 417 | + this.setItemImageStyle(picPath, 4, 0, 0, 0); |
| 399 | } else if (index == 1) { | 418 | } else if (index == 1) { |
| 400 | //直角 | 419 | //直角 |
| 401 | - this.setItemImageStyle(item.picPath, 0, 0, 0, 0); | 420 | + this.setItemImageStyle(picPath, 0, 0, 0, 0); |
| 402 | } else if (index = 2) { | 421 | } else if (index = 2) { |
| 403 | - this.setItemImageStyle(item.picPath, 0, 4, 0, 0); | 422 | + this.setItemImageStyle(picPath, 0, 4, 0, 0); |
| 404 | } else if (index = 3) { | 423 | } else if (index = 3) { |
| 405 | //直角 | 424 | //直角 |
| 406 | - this.setItemImageStyle(item.picPath, 0, 0, 0, 0); | 425 | + this.setItemImageStyle(picPath, 0, 0, 0, 0); |
| 407 | } else if (index = 4) { | 426 | } else if (index = 4) { |
| 408 | //直角 | 427 | //直角 |
| 409 | - this.setItemImageStyle(item.picPath, 0, 0, 0, 0); | 428 | + this.setItemImageStyle(picPath, 0, 0, 0, 0); |
| 410 | } else if (index = 5) { | 429 | } else if (index = 5) { |
| 411 | - this.setItemImageStyle(item.picPath, 0, 0, 0, 4); | 430 | + this.setItemImageStyle(picPath, 0, 0, 0, 4); |
| 412 | } else if (index = 6) { | 431 | } else if (index = 6) { |
| 413 | - this.setItemImageStyle(item.picPath, 0, 0, 4, 0); | 432 | + this.setItemImageStyle(picPath, 0, 0, 4, 0); |
| 414 | } else { | 433 | } else { |
| 415 | - this.setItemImageStyle(item.picPath, 0, 0, 0, 4); | 434 | + this.setItemImageStyle(picPath, 0, 0, 0, 4); |
| 416 | } | 435 | } |
| 417 | } else { | 436 | } else { |
| 418 | if (index == 0) { | 437 | if (index == 0) { |
| 419 | - this.setItemImageStyle(item.picPath, 4, 0, 0, 0); | 438 | + this.setItemImageStyle(picPath, 4, 0, 0, 0); |
| 420 | } else if (index == 1) { | 439 | } else if (index == 1) { |
| 421 | //直角 | 440 | //直角 |
| 422 | - this.setItemImageStyle(item.picPath, 0, 0, 0, 0); | 441 | + this.setItemImageStyle(picPath, 0, 0, 0, 0); |
| 423 | } else if (index == 2) { | 442 | } else if (index == 2) { |
| 424 | - this.setItemImageStyle(item.picPath, 0, 4, 0, 0); | 443 | + this.setItemImageStyle(picPath, 0, 4, 0, 0); |
| 425 | } else if (index == 3) { | 444 | } else if (index == 3) { |
| 426 | //直角 | 445 | //直角 |
| 427 | - this.setItemImageStyle(item.picPath, 0, 0, 0, 0); | 446 | + this.setItemImageStyle(picPath, 0, 0, 0, 0); |
| 428 | } else if (index == 4) { | 447 | } else if (index == 4) { |
| 429 | //直角 | 448 | //直角 |
| 430 | - this.setItemImageStyle(item.picPath, 0, 0, 0, 0); | 449 | + this.setItemImageStyle(picPath, 0, 0, 0, 0); |
| 431 | } else if (index == 5) { | 450 | } else if (index == 5) { |
| 432 | //直角 | 451 | //直角 |
| 433 | - this.setItemImageStyle(item.picPath, 0, 0, 0, 0); | 452 | + this.setItemImageStyle(picPath, 0, 0, 0, 0); |
| 434 | } else if (index == 6) { | 453 | } else if (index == 6) { |
| 435 | - this.setItemImageStyle(item.picPath, 0, 0, 4, 0); | 454 | + this.setItemImageStyle(picPath, 0, 0, 4, 0); |
| 436 | } else if (index == 7) { | 455 | } else if (index == 7) { |
| 437 | //直角 | 456 | //直角 |
| 438 | - this.setItemImageStyle(item.picPath, 0, 0, 0, 0); | 457 | + this.setItemImageStyle(picPath, 0, 0, 0, 0); |
| 439 | } else { | 458 | } else { |
| 440 | - this.setItemImageStyle(item.picPath, 0, 0, 0, 4); | 459 | + this.setItemImageStyle(picPath, 0, 0, 0, 4); |
| 441 | } | 460 | } |
| 442 | } | 461 | } |
| 443 | } | 462 | } |
| @@ -57,10 +57,9 @@ export class ProcessUtils { | @@ -57,10 +57,9 @@ export class ProcessUtils { | ||
| 57 | break; | 57 | break; |
| 58 | //动态详情页(动态图文) | 58 | //动态详情页(动态图文) |
| 59 | case ContentConstants.TYPE_FOURTEEN: | 59 | case ContentConstants.TYPE_FOURTEEN: |
| 60 | - break; | ||
| 61 | //动态详情页(动态视频) | 60 | //动态详情页(动态视频) |
| 62 | case ContentConstants.TYPE_FIFTEEN: | 61 | case ContentConstants.TYPE_FIFTEEN: |
| 63 | - ProcessUtils.gotoWeb(content); | 62 | + ProcessUtils.gotoDynamicDetailPage(content); |
| 64 | break; | 63 | break; |
| 65 | default: | 64 | default: |
| 66 | break; | 65 | break; |
| @@ -75,7 +74,7 @@ export class ProcessUtils { | @@ -75,7 +74,7 @@ export class ProcessUtils { | ||
| 75 | let taskAction: Action = { | 74 | let taskAction: Action = { |
| 76 | type: 'JUMP_DETAIL_PAGE', | 75 | type: 'JUMP_DETAIL_PAGE', |
| 77 | params: { | 76 | params: { |
| 78 | - detailPageType: 14, | 77 | + detailPageType: Number.parseInt(content.objectType), |
| 79 | contentID: content?.objectId, | 78 | contentID: content?.objectId, |
| 80 | extra: { | 79 | extra: { |
| 81 | relType: content?.relType, | 80 | relType: content?.relType, |
| 1 | import { Logger } from 'wdKit'; | 1 | import { Logger } from 'wdKit'; |
| 2 | -import { AudioDetailComponent } from 'wdComponent'; | 2 | +import { DynamicDetailComponent } from 'wdComponent'; |
| 3 | import router from '@ohos.router'; | 3 | import router from '@ohos.router'; |
| 4 | import { Params, Action } from 'wdBean'; | 4 | import { Params, Action } from 'wdBean'; |
| 5 | const TAG = 'DynamicDetailPage'; | 5 | const TAG = 'DynamicDetailPage'; |
| @@ -13,7 +13,7 @@ struct DynamicDetailPage { | @@ -13,7 +13,7 @@ struct DynamicDetailPage { | ||
| 13 | 13 | ||
| 14 | build() { | 14 | build() { |
| 15 | Column() { | 15 | Column() { |
| 16 | - AudioDetailComponent({ | 16 | + DynamicDetailComponent({ |
| 17 | relId: this.relId, | 17 | relId: this.relId, |
| 18 | contentId: this.contentId, | 18 | contentId: this.contentId, |
| 19 | relType: this.relType | 19 | relType: this.relType |
-
Please register or login to post a comment