wangliang_wd

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

* 'main' of http://192.168.1.42/developOne/harmonyPool:
  fix: 19069 精选评论卡-非人民号账号登录默认头像显示的是人民号默认头像
  升级lottie动画库
  feat:1)优化样板信息流块,无网络状态的业务逻辑处理
  fix(18705): UI还原问题-【生产】进入视频直播,点击问道更多,android正常显示,鸿蒙显示空白页,看视频
  fix(18895): 功能缺陷-【生产】点击正在直播卡片,无反应
  电子报骨架屏修改
  fix: 18883 功能缺陷-【uat】 进入视频详情,点击全屏按钮,进入全屏,按住进度条不放,会自动消失,android不消失,看图
@@ -12,4 +12,5 @@ export interface commentInfo { @@ -12,4 +12,5 @@ export interface commentInfo {
12 relType: string; 12 relType: string;
13 newsType?: string, 13 newsType?: string,
14 objectType?: string, 14 objectType?: string,
  15 + userType?: number
15 } 16 }
@@ -49,7 +49,7 @@ export struct ENewspaperItemComponent { @@ -49,7 +49,7 @@ export struct ENewspaperItemComponent {
49 }) 49 })
50 .objectFit(ImageFit.Fill) 50 .objectFit(ImageFit.Fill)
51 .zIndex(10) 51 .zIndex(10)
52 - newsSkeleton() 52 + newsSkeleton({showBottom: false})
53 .visibility(this.isShowSkeleton ? Visibility.Visible : Visibility.None) 53 .visibility(this.isShowSkeleton ? Visibility.Visible : Visibility.None)
54 .width('100%') 54 .width('100%')
55 .zIndex(1) 55 .zIndex(1)
@@ -186,8 +186,11 @@ export struct ZhSingleRow06 { @@ -186,8 +186,11 @@ export struct ZhSingleRow06 {
186 this.loadImg 186 this.loadImg
187 ? item.operDataList[0]?.commentInfo?.userHeaderUrl 187 ? item.operDataList[0]?.commentInfo?.userHeaderUrl
188 ? item.operDataList[0].commentInfo.userHeaderUrl 188 ? item.operDataList[0].commentInfo.userHeaderUrl
189 - : $r('app.media.icon_default_head_mater') 189 + : commentViewModel.adjustUserType(item.operDataList[0].commentInfo?.userType)
  190 + ? $r('app.media.WDAccountOwnerHedaerDefaultIcon')
  191 + : $r('app.media.WDAccountDefaultIcon')
190 : $r('app.media.icon_default_head_mater')) 192 : $r('app.media.icon_default_head_mater'))
  193 +
191 .width(32) 194 .width(32)
192 .height(32) 195 .height(32)
193 .borderRadius(16) 196 .borderRadius(16)
1 -import { Action, CompDTO, ContentDTO } from 'wdBean';  
2 -import { CommonConstants, ViewType } from 'wdConstant';  
3 -import PageViewModel from '../../viewmodel/PageViewModel';  
4 -import PageModel from '../../viewmodel/PageModel'; 1 +import { Action } from 'wdBean';
5 import router from '@ohos.router'; 2 import router from '@ohos.router';
6 -import { CardParser } from '../CardParser';  
7 -import { channelSkeleton } from '../skeleton/channelSkeleton';  
8 -import { ErrorComponent } from '../view/ErrorComponent';  
9 -import { EmptyComponent } from '../view/EmptyComponent';  
10 -import { listTouchEvent } from '../../utils/PullDownRefresh';  
11 import PageAdModel from '../../viewmodel/PageAdvModel'; 3 import PageAdModel from '../../viewmodel/PageAdvModel';
12 -import { RefreshLayoutBean } from '../refresh/RefreshLayoutBean';  
13 -import RefreshLayout from '../refresh/RefreshLayout';  
14 -import PageNoMoreLayout from './PageNoMoreLayout';  
15 -import { NoMoreBean } from './NoMoreBean';  
16 import CommonPageTitle from './CommonPageTitle'; 4 import CommonPageTitle from './CommonPageTitle';
17 import TemplatePageComponent from './template/TemplatePageComponent'; 5 import TemplatePageComponent from './template/TemplatePageComponent';
18 import { TemplatePageConstant } from './template/TemplatePageConstant'; 6 import { TemplatePageConstant } from './template/TemplatePageConstant';
@@ -38,10 +38,12 @@ export class TemplatePageHelp extends BasePageHelp { @@ -38,10 +38,12 @@ export class TemplatePageHelp extends BasePageHelp {
38 this.treatDiffBusinessDataSource() 38 this.treatDiffBusinessDataSource()
39 } else if (pageModel.compList.size() > 0) { 39 } else if (pageModel.compList.size() > 0) {
40 // 加载缓存数据了,不用无网络提示 40 // 加载缓存数据了,不用无网络提示
  41 + this.closeAnimation(this.pageModel.resolve)
41 } else { 42 } else {
42 - // 无网情况  
43 - this.pageModel.pageCompType = TemplatePageStateType.OTHER  
44 - this.pageModel.noNormalState = WDViewDefaultType.WDViewDefaultType_NoNetwork 43 + // 无网情况
  44 + this.pageModel.pageCompType = TemplatePageStateType.OTHER
  45 + this.pageModel.noNormalState = WDViewDefaultType.WDViewDefaultType_NoNetwork
  46 +
45 } 47 }
46 } 48 }
47 49
@@ -293,6 +295,12 @@ export class TemplatePageHelp extends BasePageHelp { @@ -293,6 +295,12 @@ export class TemplatePageHelp extends BasePageHelp {
293 } 295 }
294 296
295 } 297 }
  298 +
  299 + private closeAnimation(resolve?: (value: string | PromiseLike<string>) => void) {
  300 + if (resolve) {
  301 + resolve('')
  302 + }
  303 + }
296 } 304 }
297 305
298 306
@@ -44,16 +44,22 @@ export struct CustomPullToRefresh { @@ -44,16 +44,22 @@ export struct CustomPullToRefresh {
44 this.onRefresh(resolve) 44 this.onRefresh(resolve)
45 }).then((text) => { 45 }).then((text) => {
46 setTimeout(()=>{ 46 setTimeout(()=>{
47 - // 延时500,展示第二段动画 TODO 是否去掉?  
48 - this.refreshState = 3  
49 this.refreshDestroy() 47 this.refreshDestroy()
50 - setTimeout(() => { 48 + // 延时500,展示第二段动画 TODO 是否去掉?
  49 + if(text){
  50 + this.refreshState = 3
  51 + setTimeout(() => {
  52 + success(text)
  53 + }, 500)
  54 + setTimeout(() => {
  55 + this.refreshState = 4
  56 + // 延时将状态改为空闲,组件closeRefresh做了延时,不能配置,这里配合延时
  57 + }, 1200)
  58 + }else {
51 success(text) 59 success(text)
52 - }, 500)  
53 - setTimeout(() => {  
54 this.refreshState = 4 60 this.refreshState = 4
55 - // 延时将状态改为空闲,组件closeRefresh做了延时,不能配置,这里配合延时  
56 - }, 1200) 61 + }
  62 +
57 },500) 63 },500)
58 }) 64 })
59 }); 65 });
@@ -6,6 +6,7 @@ @@ -6,6 +6,7 @@
6 @Component 6 @Component
7 export struct newsSkeleton { 7 export struct newsSkeleton {
8 @State quantity: Array<number> = [1, 2, 3,] 8 @State quantity: Array<number> = [1, 2, 3,]
  9 + @State showBottom: boolean = true
9 10
10 build() { 11 build() {
11 Row() { 12 Row() {
@@ -116,9 +117,10 @@ export struct newsSkeleton { @@ -116,9 +117,10 @@ export struct newsSkeleton {
116 right: 15, 117 right: 15,
117 left: 15 118 left: 15
118 }) 119 })
119 -  
120 - Column().backgroundColor('#CBCBCB').height(5).width(339)  
121 - Column().backgroundColor('#909090').height(5).width(326) 120 + if (this.showBottom) {
  121 + Column().backgroundColor('#CBCBCB').height(5).width(339)
  122 + Column().backgroundColor('#909090').height(5).width(326)
  123 + }
122 } 124 }
123 .width('100%') 125 .width('100%')
124 } 126 }
@@ -66,10 +66,10 @@ export struct LiveHorizontalCardComponent { @@ -66,10 +66,10 @@ export struct LiveHorizontalCardComponent {
66 66
67 liveToMore() { 67 liveToMore() {
68 if (!!this.compDTO.dataSourceType) { 68 if (!!this.compDTO.dataSourceType) {
69 - if (this.compDTO.dataSourceType === 'OBJECT_POS') {  
70 - ProcessUtils.jumpChannelTab(this.compDTO.objectId, this.compDTO.pageId as string, this.compDTO.objectTitle)  
71 - return;  
72 - } 69 + // if (this.compDTO.dataSourceType === 'OBJECT_POS') {
  70 + // ProcessUtils.jumpChannelTab(this.compDTO.objectId, this.compDTO.pageId as string, this.compDTO.objectTitle)
  71 + // return;
  72 + // }
73 if (this.compDTO.linkUrl) { 73 if (this.compDTO.linkUrl) {
74 let taskAction: Action = { 74 let taskAction: Action = {
75 type: 'JUMP_H5_BY_WEB_VIEW', 75 type: 'JUMP_H5_BY_WEB_VIEW',
@@ -236,6 +236,13 @@ export struct LiveHorizontalCardComponent { @@ -236,6 +236,13 @@ export struct LiveHorizontalCardComponent {
236 } else if (this.compDTO.operDataList.length) { 236 } else if (this.compDTO.operDataList.length) {
237 // 一个 237 // 一个
238 LiveHorizontalCardForOneComponent({ contentDTO: this.compDTO.operDataList[0] }) 238 LiveHorizontalCardForOneComponent({ contentDTO: this.compDTO.operDataList[0] })
  239 + .onClick(() => {
  240 + InfomationCardClick.track(this.compDTO, this.compDTO.operDataList[0], this.pageId, this.pageName)
  241 + if (this.compDTO.operDataList[0].objectType != '0') {
  242 + console.log(this.compDTO.operDataList[0].objectId)
  243 + this.gotoLive(this.compDTO.operDataList[0])
  244 + }
  245 + })
239 } 246 }
240 } 247 }
241 // .width(CommonConstants.FULL_WIDTH) 248 // .width(CommonConstants.FULL_WIDTH)
@@ -142,6 +142,16 @@ export struct PlayerFullScreenView { @@ -142,6 +142,16 @@ export struct PlayerFullScreenView {
142 .margin({ left: 16, right: 8 }) 142 .margin({ left: 16, right: 8 })
143 143
144 PlayerProgressFullScreenView({ playerController: this.playerController }).layoutWeight(1) 144 PlayerProgressFullScreenView({ playerController: this.playerController }).layoutWeight(1)
  145 + .onTouch((event?: TouchEvent) => {
  146 + if (event) {
  147 + if (event.type === TouchType.Down) {
  148 + clearInterval(this.timer)
  149 + }
  150 + if (event.type === TouchType.Up) {
  151 + this.restartTimer();
  152 + }
  153 + }
  154 + })
145 155
146 Text(DateTimeUtils.secondToTime(this.videoDuration)) 156 Text(DateTimeUtils.secondToTime(this.videoDuration))
147 .fontSize(12) 157 .fontSize(12)
@@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
7 "main": "", 7 "main": "",
8 "version": "1.0.0", 8 "version": "1.0.0",
9 "dependencies": { 9 "dependencies": {
10 - "@ohos/lottie": "2.0.10", 10 + "@ohos/lottie": "v2.0.11-rc.6",
11 "wdComponent": "file:../../features/wdComponent", 11 "wdComponent": "file:../../features/wdComponent",
12 "wdConstant": "file:../../commons/wdConstant", 12 "wdConstant": "file:../../commons/wdConstant",
13 "wdKit": "file:../../commons/wdKit", 13 "wdKit": "file:../../commons/wdKit",