zhenghy
@@ -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 }
1 import { PhotoListBean } from 'wdBean'; 1 import { PhotoListBean } from 'wdBean';
2 import { Logger } from 'wdKit'; 2 import { Logger } from 'wdKit';
3 -import router from '@ohos.router';  
4 -import display from '@ohos.display';  
5 3
6 const TAG = 'MultiPictureDetailPageComponent'; 4 const TAG = 'MultiPictureDetailPageComponent';
7 5
@@ -11,14 +9,10 @@ export struct MultiPictureDetailItemComponent { @@ -11,14 +9,10 @@ export struct MultiPictureDetailItemComponent {
11 //alt app.media.picture_loading 设计稿尺寸 9 //alt app.media.picture_loading 设计稿尺寸
12 @State imageWidth:string | number = 167 10 @State imageWidth:string | number = 167
13 @State ratio:number = 167/60 11 @State ratio:number = 167/60
14 - private scroller: Scroller = new Scroller()  
15 - private displayTool = display.getDefaultDisplaySync()  
16 - @State picHeight: number = 0  
17 12
18 13
19 async aboutToAppear() { 14 async aboutToAppear() {
20 Logger.info(TAG, 'pictures preview') 15 Logger.info(TAG, 'pictures preview')
21 - this.picHeight = this.displayTool.width * 578 / 375  
22 } 16 }
23 17
24 build() { 18 build() {
@@ -33,16 +27,6 @@ export struct MultiPictureDetailItemComponent { @@ -33,16 +27,6 @@ export struct MultiPictureDetailItemComponent {
33 this.imageWidth = '100%' 27 this.imageWidth = '100%'
34 this.ratio = this.MultiPictureDetailItem.width / this.MultiPictureDetailItem.height 28 this.ratio = this.MultiPictureDetailItem.width / this.MultiPictureDetailItem.height
35 }) 29 })
36 - /*.onDrop(event => {  
37 - router.back();  
38 - })  
39 - .draggable(true)*/  
40 - /*Scroll(this.scroller) {  
41 -  
42 - }  
43 - .scrollable(ScrollDirection.Vertical)  
44 - .scrollBarWidth(0)  
45 - .height(px2vp(this.picHeight))*/  
46 } 30 }
47 .height('100%') 31 .height('100%')
48 .width('100%') 32 .width('100%')
@@ -18,6 +18,7 @@ import { HttpUrlUtils } from 'wdNetwork/Index'; @@ -18,6 +18,7 @@ import { HttpUrlUtils } from 'wdNetwork/Index';
18 import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'; 18 import { WDRouterPage, WDRouterRule } from 'wdRouter/Index';
19 import { PageRepository } from '../repository/PageRepository'; 19 import { PageRepository } from '../repository/PageRepository';
20 import { SpConstants } from 'wdConstant/Index'; 20 import { SpConstants } from 'wdConstant/Index';
  21 +import { router } from '@kit.ArkUI';
21 22
22 const TAG = 'MultiPictureDetailPageComponent'; 23 const TAG = 'MultiPictureDetailPageComponent';
23 24
@@ -34,6 +35,7 @@ export struct MultiPictureDetailPageComponent { @@ -34,6 +35,7 @@ export struct MultiPictureDetailPageComponent {
34 @State contentDetailData: ContentDetailDTO = {} as ContentDetailDTO 35 @State contentDetailData: ContentDetailDTO = {} as ContentDetailDTO
35 @Provide @Watch('onCurrentPageNumUpdated') currentPageNum: string = '01' 36 @Provide @Watch('onCurrentPageNumUpdated') currentPageNum: string = '01'
36 private swiperController: SwiperController = new SwiperController() 37 private swiperController: SwiperController = new SwiperController()
  38 + private swiperControllerItem: SwiperController = new SwiperController()
37 @State swiperIndex: number = 0; 39 @State swiperIndex: number = 0;
38 @Provide followStatus: string = '0' // 关注状态 40 @Provide followStatus: string = '0' // 关注状态
39 private scroller: Scroller = new Scroller() 41 private scroller: Scroller = new Scroller()
@@ -71,7 +73,19 @@ export struct MultiPictureDetailPageComponent { @@ -71,7 +73,19 @@ export struct MultiPictureDetailPageComponent {
71 if (this.contentDetailData?.photoList && this.contentDetailData?.photoList?.length > 0) { 73 if (this.contentDetailData?.photoList && this.contentDetailData?.photoList?.length > 0) {
72 Swiper(this.swiperController) { 74 Swiper(this.swiperController) {
73 ForEach(this.contentDetailData.photoList, (item: PhotoListBean) => { 75 ForEach(this.contentDetailData.photoList, (item: PhotoListBean) => {
  76 + Swiper(this.swiperController) {
74 MultiPictureDetailItemComponent({ MultiPictureDetailItem: item }) 77 MultiPictureDetailItemComponent({ MultiPictureDetailItem: item })
  78 + }
  79 + .width('100%')
  80 + .height('100%')
  81 + .vertical(true)
  82 + .autoPlay(false)
  83 + .cachedCount(1)
  84 + .indicator(false)
  85 + .displayCount(1)
  86 + .onAnimationEnd(event => {
  87 + router.back()
  88 + })
75 }) 89 })
76 } 90 }
77 .index(this.swiperIndex) 91 .index(this.swiperIndex)
@@ -82,6 +96,7 @@ export struct MultiPictureDetailPageComponent { @@ -82,6 +96,7 @@ export struct MultiPictureDetailPageComponent {
82 .cachedCount(3) 96 .cachedCount(3)
83 .indicator(false) 97 .indicator(false)
84 .displayCount(1) 98 .displayCount(1)
  99 + .loop(false)
85 .id('e_swiper_content') 100 .id('e_swiper_content')
86 .alignRules({ 101 .alignRules({
87 center: { anchor: "__container__", align: VerticalAlign.Center }, 102 center: { anchor: "__container__", align: VerticalAlign.Center },
@@ -156,22 +156,23 @@ struct EditUserInfoPage { @@ -156,22 +156,23 @@ struct EditUserInfoPage {
156 156
157 if (userName) { 157 if (userName) {
158 if (userName != this.currentUserInfo.userName) { 158 if (userName != this.currentUserInfo.userName) {
159 - this.currentUserInfo.userName = userName;  
160 - this.currentUserInfo.editDataType = WDEditDataModelType.WDEditDataModelType_nickname  
161 - this.updateEditModel() 159 + // this.currentUserInfo.userName = userName;
  160 + // this.currentUserInfo.editDataType = WDEditDataModelType.WDEditDataModelType_nickname
  161 + // this.updateEditModel()
  162 + this.getAccountOwnerInfo()
162 } 163 }
163 } else if (introduction){ 164 } else if (introduction){
164 if (introduction != this.currentUserInfo.userExtend.introduction ) { 165 if (introduction != this.currentUserInfo.userExtend.introduction ) {
165 - this.currentUserInfo.userExtend.introduction = introduction;  
166 - this.currentUserInfo.editDataType = WDEditDataModelType.WDEditDataModelType_intro  
167 - this.updateEditModel() 166 + // this.currentUserInfo.userExtend.introduction = introduction;
  167 + // this.currentUserInfo.editDataType = WDEditDataModelType.WDEditDataModelType_intro
  168 + // this.updateEditModel()
  169 + this.getAccountOwnerInfo()
168 } 170 }
169 } 171 }
170 } 172 }
171 } 173 }
172 174
173 updateEditModel(){ 175 updateEditModel(){
174 - this.listData = []  
175 // this.listData.push(...EditInfoViewModel.getEditListInfo(this.currentUserInfo)) 176 // this.listData.push(...EditInfoViewModel.getEditListInfo(this.currentUserInfo))
176 EditInfoViewModel.updateUserInfo(this.currentUserInfo).then(()=>{ 177 EditInfoViewModel.updateUserInfo(this.currentUserInfo).then(()=>{
177 this.getAccountOwnerInfo() 178 this.getAccountOwnerInfo()
@@ -179,6 +180,7 @@ struct EditUserInfoPage { @@ -179,6 +180,7 @@ struct EditUserInfoPage {
179 } 180 }
180 getAccountOwnerInfo(){ 181 getAccountOwnerInfo(){
181 EditInfoViewModel.queryAccountOwnerInfo(1,getContext(this)).then((editModel) => { 182 EditInfoViewModel.queryAccountOwnerInfo(1,getContext(this)).then((editModel) => {
  183 + this.listData = []
182 this.headerImg = editModel.userExtend.headPhotoUrl 184 this.headerImg = editModel.userExtend.headPhotoUrl
183 this.currentUserInfo = editModel as editModel; 185 this.currentUserInfo = editModel as editModel;
184 this.listData.push(...EditInfoViewModel.getEditListInfo(editModel)) 186 this.listData.push(...EditInfoViewModel.getEditListInfo(editModel))
1 import { CustomTitleUI } from '../reusable/CustomTitleUI' 1 import { CustomTitleUI } from '../reusable/CustomTitleUI'
2 import router from '@ohos.router' 2 import router from '@ohos.router'
3 -import { editModelParams } from '../../model/EditInfoModel'  
4 - 3 +import { editModel, editModelParams, WDEditDataModelType } from '../../model/EditInfoModel'
  4 +import EditInfoViewModel from '../../viewmodel/EditInfoViewModel';
5 @Entry 5 @Entry
6 @Component 6 @Component
7 struct EditUserIntroductionPage { 7 struct EditUserIntroductionPage {
@@ -51,6 +51,11 @@ struct EditUserIntroductionPage { @@ -51,6 +51,11 @@ struct EditUserIntroductionPage {
51 .borderRadius(5) 51 .borderRadius(5)
52 .margin(30) 52 .margin(30)
53 .onClick(()=>{ 53 .onClick(()=>{
  54 + let currentUserInfo:editModel = new editModel()
  55 + currentUserInfo.userExtend.introduction = this.introduction
  56 + currentUserInfo.editDataType = WDEditDataModelType.WDEditDataModelType_intro
  57 + this.updateEditModel(currentUserInfo)
  58 +
54 let params: editModelParams = { 59 let params: editModelParams = {
55 introduction: this.introduction 60 introduction: this.introduction
56 } 61 }
@@ -61,4 +66,9 @@ struct EditUserIntroductionPage { @@ -61,4 +66,9 @@ struct EditUserIntroductionPage {
61 }) 66 })
62 } 67 }
63 } 68 }
  69 +
  70 +
  71 + updateEditModel(Info:editModel){
  72 + EditInfoViewModel.updateUserInfo(Info)
  73 + }
64 } 74 }
1 import { CustomTitleUI } from '../reusable/CustomTitleUI' 1 import { CustomTitleUI } from '../reusable/CustomTitleUI'
2 import router from '@ohos.router' 2 import router from '@ohos.router'
3 -import { editModelParams } from '../../model/EditInfoModel'  
4 - 3 +import { editModel, editModelParams, WDEditDataModelType } from '../../model/EditInfoModel'
  4 +import EditInfoViewModel from '../../viewmodel/EditInfoViewModel';
5 @Entry 5 @Entry
6 @Component 6 @Component
7 struct EditUserNikeNamePage { 7 struct EditUserNikeNamePage {
@@ -51,6 +51,13 @@ struct EditUserNikeNamePage { @@ -51,6 +51,13 @@ struct EditUserNikeNamePage {
51 .borderRadius(5) 51 .borderRadius(5)
52 .margin(30) 52 .margin(30)
53 .onClick(()=>{ 53 .onClick(()=>{
  54 +
  55 + ///内部更新
  56 + let currentUserInfo:editModel = new editModel()
  57 + currentUserInfo.userExtend.introduction = this.nikeName
  58 + currentUserInfo.editDataType = WDEditDataModelType.WDEditDataModelType_nickname
  59 + this.updateEditModel(currentUserInfo)
  60 +
54 let params: editModelParams = { 61 let params: editModelParams = {
55 userName: this.nikeName 62 userName: this.nikeName
56 } 63 }
@@ -61,4 +68,8 @@ struct EditUserNikeNamePage { @@ -61,4 +68,8 @@ struct EditUserNikeNamePage {
61 }) 68 })
62 } 69 }
63 } 70 }
  71 +
  72 + updateEditModel(Info:editModel){
  73 + EditInfoViewModel.updateUserInfo(Info)
  74 + }
64 } 75 }
@@ -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,
@@ -121,6 +121,10 @@ @@ -121,6 +121,10 @@
121 "value": "48vp" 121 "value": "48vp"
122 }, 122 },
123 { 123 {
  124 + "name": "margin_54",
  125 + "value": "54vp"
  126 + },
  127 + {
124 "name": "margin_60", 128 "name": "margin_60",
125 "value": "60vp" 129 "value": "60vp"
126 }, 130 },
@@ -102,12 +102,14 @@ export struct TabLiveComponent { @@ -102,12 +102,14 @@ export struct TabLiveComponent {
102 this.pageModel.hasMore = true; 102 this.pageModel.hasMore = true;
103 } else { 103 } else {
104 this.pageModel.hasMore = false; 104 this.pageModel.hasMore = false;
105 - if (StringUtils.isNotEmpty(this.liveDetailsBean.oldNewsId) 105 + if (StringUtils.isEmpty(this.liveDetailsBean.oldNewsId)
106 && this.liveDetailsBean 106 && this.liveDetailsBean
107 && this.liveDetailsBean.liveInfo.liveState != 'wait') { 107 && this.liveDetailsBean.liveInfo.liveState != 'wait') {
108 let liveRoomItemBeanTemp: LiveRoomItemBean = {} as LiveRoomItemBean 108 let liveRoomItemBeanTemp: LiveRoomItemBean = {} as LiveRoomItemBean
109 liveRoomItemBeanTemp.text = this.liveDetailsBean.newIntroduction 109 liveRoomItemBeanTemp.text = this.liveDetailsBean.newIntroduction
110 liveRoomItemBeanTemp.senderUserName = '人民日报主持人' 110 liveRoomItemBeanTemp.senderUserName = '人民日报主持人'
  111 + liveRoomItemBeanTemp.pictureUrls=[]
  112 + liveRoomItemBeanTemp.pictureUrls.push(this.liveDetailsBean?.fullColumnImgUrls[0]?.url)
111 this.liveList.push(liveRoomItemBeanTemp) 113 this.liveList.push(liveRoomItemBeanTemp)
112 } 114 }
113 } 115 }
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