陈剑华

Merge remote-tracking branch 'origin/main'

@@ -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)
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 // 无网情况
43 this.pageModel.pageCompType = TemplatePageStateType.OTHER 44 this.pageModel.pageCompType = TemplatePageStateType.OTHER
44 this.pageModel.noNormalState = WDViewDefaultType.WDViewDefaultType_NoNetwork 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,9 +44,10 @@ export struct CustomPullToRefresh { @@ -44,9 +44,10 @@ export struct CustomPullToRefresh {
44 this.onRefresh(resolve) 44 this.onRefresh(resolve)
45 }).then((text) => { 45 }).then((text) => {
46 setTimeout(()=>{ 46 setTimeout(()=>{
  47 + this.refreshDestroy()
47 // 延时500,展示第二段动画 TODO 是否去掉? 48 // 延时500,展示第二段动画 TODO 是否去掉?
  49 + if(text){
48 this.refreshState = 3 50 this.refreshState = 3
49 - this.refreshDestroy()  
50 setTimeout(() => { 51 setTimeout(() => {
51 success(text) 52 success(text)
52 }, 500) 53 }, 500)
@@ -54,6 +55,11 @@ export struct CustomPullToRefresh { @@ -54,6 +55,11 @@ export struct CustomPullToRefresh {
54 this.refreshState = 4 55 this.refreshState = 4
55 // 延时将状态改为空闲,组件closeRefresh做了延时,不能配置,这里配合延时 56 // 延时将状态改为空闲,组件closeRefresh做了延时,不能配置,这里配合延时
56 }, 1200) 57 }, 1200)
  58 + }else {
  59 + success(text)
  60 + this.refreshState = 4
  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,10 +117,11 @@ export struct newsSkeleton { @@ -116,10 +117,11 @@ export struct newsSkeleton {
116 right: 15, 117 right: 15,
117 left: 15 118 left: 15
118 }) 119 })
119 - 120 + if (this.showBottom) {
120 Column().backgroundColor('#CBCBCB').height(5).width(339) 121 Column().backgroundColor('#CBCBCB').height(5).width(339)
121 Column().backgroundColor('#909090').height(5).width(326) 122 Column().backgroundColor('#909090').height(5).width(326)
122 } 123 }
  124 + }
123 .width('100%') 125 .width('100%')
124 } 126 }
125 .height('100%') 127 .height('100%')
@@ -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)
@@ -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",