yumaochao
Showing 93 changed files with 1187 additions and 393 deletions
@@ -13,6 +13,11 @@ export class ContentConstants { @@ -13,6 +13,11 @@ export class ContentConstants {
13 */ 13 */
14 static readonly TYPE_LIVE: string = "2"; 14 static readonly TYPE_LIVE: string = "2";
15 15
  16 + /**
  17 + * 3:活动
  18 + */
  19 + static readonly TYPE_Activity: string = "3";
  20 +
16 static readonly TYPE_FOUR: string = "4"; 21 static readonly TYPE_FOUR: string = "4";
17 /** 22 /**
18 * 5:专题详情 23 * 5:专题详情
@@ -65,3 +65,6 @@ export { MpaasUpgradeCheck, UpgradeTipContent } from './src/main/ets/mpaas/Mpaas @@ -65,3 +65,6 @@ export { MpaasUpgradeCheck, UpgradeTipContent } from './src/main/ets/mpaas/Mpaas
65 export { TingyunAPM } from './src/main/ets/tingyunAPM/TingyunAPM' 65 export { TingyunAPM } from './src/main/ets/tingyunAPM/TingyunAPM'
66 66
67 export { FastClickUtil } from './src/main/ets/utils/FastClickUtil'; 67 export { FastClickUtil } from './src/main/ets/utils/FastClickUtil';
  68 +
  69 +// export { PublicPopupDialogView } from "./src/main/ets/pubComps/dialog/PublicPopupDialogView"
  70 +export { PublicDialogManager, CloseAction } from "./src/main/ets/pubComps/dialog/PublicDialogManager"
  1 +
  2 +export type CloseAction = () => void
  3 +
  4 +export class PublicDialogManager {
  5 +
  6 + private dialogControllers: CustomDialogController[] = []
  7 + private closeActions: CloseAction[] = []
  8 +
  9 + private constructor() {
  10 + }
  11 + private static manager: PublicDialogManager
  12 + static shareInstance(): PublicDialogManager {
  13 + if (!PublicDialogManager.manager) {
  14 + PublicDialogManager.manager = new PublicDialogManager()
  15 + }
  16 + return PublicDialogManager.manager
  17 + }
  18 +
  19 + openDialog(dialogController: CustomDialogController, closeAction: CloseAction) {
  20 + if (!dialogController) {
  21 + return
  22 + }
  23 + dialogController.open()
  24 + this.dialogControllers.push(dialogController)
  25 + this.closeActions.push(closeAction)
  26 + }
  27 +
  28 + closeDialog(dialogController: CustomDialogController) {
  29 + if (!dialogController) {
  30 + return
  31 + }
  32 + dialogController.close()
  33 + const index = this.dialogControllers.indexOf(dialogController)
  34 + if (index != -1) {
  35 + this.dialogControllers.splice(index, 1)
  36 + this.closeActions.splice(index, 1)[0]()
  37 + }
  38 + }
  39 +
  40 + closeLastDialog() {
  41 + const count = this.dialogControllers.length
  42 + if (count > 0) {
  43 + this.closeDialog(this.dialogControllers[count - 1])
  44 + }
  45 + }
  46 +}
  1 +import { PublicDialogManager } from './PublicDialogManager'
  2 +
  3 +/*
  4 + * 公共自定义弹出框,上层赋值showPopup变量,决定是否显示
  5 + *
  6 + * 当上层需要关闭,调用 PublicDialogManager.shareInstance().closeDialog(dialogController) 关闭
  7 + *
  8 + * ===> customBuilder 当前传值有问题,用不了
  9 + */
  10 +@Component
  11 +struct PublicPopupDialogView {
  12 +
  13 + // 决定是否显示变量
  14 + @Link @Watch('showPopupAction') showPopup: boolean
  15 +
  16 + // 自定义弹框的 @CustomDialog
  17 + private customBuilder: Object | null = null
  18 +
  19 + private autoCancel: boolean = false
  20 +
  21 + dialogController: CustomDialogController = new CustomDialogController({
  22 + builder: this.customBuilder,
  23 + autoCancel: this.autoCancel,
  24 + cancel: () => {
  25 + this.showPopup = false
  26 + },
  27 + customStyle: true,
  28 + alignment: DialogAlignment.Bottom,
  29 + })
  30 +
  31 + showPopupAction(val: boolean) {
  32 + if (this.showPopup) {
  33 + PublicDialogManager.shareInstance().openDialog(this.dialogController, this.closeAction)
  34 + } else {
  35 + PublicDialogManager.shareInstance().closeDialog(this.dialogController)
  36 + }
  37 + }
  38 +
  39 + @Builder emptyBuild() {
  40 +
  41 + }
  42 +
  43 + closeAction() {
  44 + this.showPopup = false
  45 + }
  46 +
  47 + build() {
  48 + this.emptyBuild()
  49 + }
  50 +
  51 +}
  52 +
@@ -106,7 +106,7 @@ export class ProcessUtils { @@ -106,7 +106,7 @@ export class ProcessUtils {
106 case ContentConstants.TYPE_AUDIO: 106 case ContentConstants.TYPE_AUDIO:
107 ProcessUtils.gotoAudio(content) 107 ProcessUtils.gotoAudio(content)
108 break; 108 break;
109 - case ContentConstants.TYPE_TELETEXT: 109 + case ContentConstants.TYPE_TELETEXT:case ContentConstants.TYPE_Activity:
110 // 图文详情,跳转h5 110 // 图文详情,跳转h5
111 if (content?.linkUrl) { //有 linkUrl 走专题页展示逻辑 111 if (content?.linkUrl) { //有 linkUrl 走专题页展示逻辑
112 ProcessUtils.gotoSpecialTopic(content,true) 112 ProcessUtils.gotoSpecialTopic(content,true)
@@ -5,12 +5,15 @@ import { BaseDTO } from './BaseDTO'; @@ -5,12 +5,15 @@ import { BaseDTO } from './BaseDTO';
5 5
6 @Observed 6 @Observed
7 export class CompDTO implements BaseDTO { 7 export class CompDTO implements BaseDTO {
  8 + expIds: string = '';
  9 + itemId: string = '';
8 contentText?: string = ''; 10 contentText?: string = '';
9 backgroundColor: string = ''; 11 backgroundColor: string = '';
10 backgroundImgUrl: string = ''; 12 backgroundImgUrl: string = '';
11 cityCode: string = ''; 13 cityCode: string = '';
12 compStyle: string = ''; 14 compStyle: string = '';
13 compType: string = ''; 15 compType: string = '';
  16 + cardItemId: string = '';
14 // dataSourceRequest: any[]; 17 // dataSourceRequest: any[];
15 districtCode: string = ''; 18 districtCode: string = '';
16 extraData?: string; 19 extraData?: string;
@@ -44,7 +47,7 @@ export class CompDTO implements BaseDTO { @@ -44,7 +47,7 @@ export class CompDTO implements BaseDTO {
44 matInfo: CompAdvMatInfoBean = new CompAdvMatInfoBean 47 matInfo: CompAdvMatInfoBean = new CompAdvMatInfoBean
45 pageId?: string; 48 pageId?: string;
46 objectType?: string; 49 objectType?: string;
47 - hasMore: number = 1 50 + hasMore: number = 1;
48 51
49 // keyGenerator相关字符串,用于刷新list布局 52 // keyGenerator相关字符串,用于刷新list布局
50 timestamp: String = '1' 53 timestamp: String = '1'
@@ -13,12 +13,15 @@ import { LiveRoomDataBean } from '../live/LiveRoomDataBean'; @@ -13,12 +13,15 @@ import { LiveRoomDataBean } from '../live/LiveRoomDataBean';
13 export class ContentDTO implements BaseDTO { 13 export class ContentDTO implements BaseDTO {
14 seoTags?:string; 14 seoTags?:string;
15 liveType?: string; // 直播新闻-直播状态 15 liveType?: string; // 直播新闻-直播状态
  16 + expIds: string = '';
  17 + itemId: string = '';
16 shareFlag?: string = '1'; 18 shareFlag?: string = '1';
17 appStyle: string = ''; 19 appStyle: string = '';
18 cityCode: string = ''; 20 cityCode: string = '';
19 coverSize: string = ''; 21 coverSize: string = '';
20 coverType: number = -1; 22 coverType: number = -1;
21 coverUrl: string = ''; 23 coverUrl: string = '';
  24 + cnsTraceId: string = ''
22 description: string = ''; 25 description: string = '';
23 districtCode: string = ''; 26 districtCode: string = '';
24 endTime: string = ''; 27 endTime: string = '';
@@ -47,6 +50,8 @@ export class ContentDTO implements BaseDTO { @@ -47,6 +50,8 @@ export class ContentDTO implements BaseDTO {
47 startTime: string = ''; 50 startTime: string = '';
48 subType: string = ''; 51 subType: string = '';
49 subtitle: string = ''; 52 subtitle: string = '';
  53 + sceneId: string = '';
  54 + subSceneId: string = '';
50 title: string = ''; 55 title: string = '';
51 vImageUrl: string = ''; 56 vImageUrl: string = '';
52 screenType: string = ''; 57 screenType: string = '';
@@ -6,7 +6,7 @@ export interface TopicInfo { @@ -6,7 +6,7 @@ export interface TopicInfo {
6 commentFlag: number; 6 commentFlag: number;
7 commentPreviewFlag: number; 7 commentPreviewFlag: number;
8 commentShowFlag: number; 8 commentShowFlag: number;
9 - // frontFlag?: any; 9 + frontFlag: number;
10 frontLinkObject?: FrontLinkObject; 10 frontLinkObject?: FrontLinkObject;
11 posterFlag: number; 11 posterFlag: number;
12 posterUrl: string; 12 posterUrl: string;
@@ -16,6 +16,8 @@ export { LikeComponent } from "./src/main/ets/components/view/LikeComponent" @@ -16,6 +16,8 @@ export { LikeComponent } from "./src/main/ets/components/view/LikeComponent"
16 16
17 export { TopNavigationComponent } from "./src/main/ets/components/page/TopNavigationComponent" 17 export { TopNavigationComponent } from "./src/main/ets/components/page/TopNavigationComponent"
18 18
  19 +export { TopNavigationComponentNew } from "./src/main/ets/components/page/TopNavigationComponentNew"
  20 +
19 export { LabelComponent } from "./src/main/ets/components/view/LabelComponent" 21 export { LabelComponent } from "./src/main/ets/components/view/LabelComponent"
20 22
21 export { BannerComponent } from "./src/main/ets/components/view/BannerComponent" 23 export { BannerComponent } from "./src/main/ets/components/view/BannerComponent"
@@ -96,3 +98,5 @@ export { PageRepository } from './src/main/ets/repository/PageRepository'; @@ -96,3 +98,5 @@ export { PageRepository } from './src/main/ets/repository/PageRepository';
96 export { MultiPictureDetailViewModel } from './src/main/ets/viewmodel/MultiPictureDetailViewModel'; 98 export { MultiPictureDetailViewModel } from './src/main/ets/viewmodel/MultiPictureDetailViewModel';
97 99
98 export { viewBlogItemInsightIntentShare } from './src/main/ets/utils/InsightIntentShare'; 100 export { viewBlogItemInsightIntentShare } from './src/main/ets/utils/InsightIntentShare';
  101 +
  102 +export { CommentListDialogView } from './src/main/ets/components/comment/view/CommentListDialog';
@@ -23,6 +23,8 @@ import { SearchContentComponent } from './cardview/SearchContentComponent'; @@ -23,6 +23,8 @@ import { SearchContentComponent } from './cardview/SearchContentComponent';
23 */ 23 */
24 @Component 24 @Component
25 export struct CardParser { 25 export struct CardParser {
  26 + @State pageId: string = '';
  27 + @State pageName: string = '';
26 @State contentDTO: ContentDTO = new ContentDTO(); 28 @State contentDTO: ContentDTO = new ContentDTO();
27 @ObjectLink compDTO: CompDTO 29 @ObjectLink compDTO: CompDTO
28 30
@@ -34,39 +36,39 @@ export struct CardParser { @@ -34,39 +36,39 @@ export struct CardParser {
34 contentBuilder(contentDTO: ContentDTO) { 36 contentBuilder(contentDTO: ContentDTO) {
35 // Card6Component({ compDTO: this.compDTO, contentDTO: this.contentDTO }) 37 // Card6Component({ compDTO: this.compDTO, contentDTO: this.contentDTO })
36 if (!!contentDTO.contentText) { 38 if (!!contentDTO.contentText) {
37 - SearchContentComponent({ contentDTO }) 39 + SearchContentComponent({ contentDTO, compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
38 } else { 40 } else {
39 if (contentDTO.appStyle === CompStyle.Card_02) { 41 if (contentDTO.appStyle === CompStyle.Card_02) {
40 - Card2Component({ compDTO: this.compDTO, contentDTO }) 42 + Card2Component({ compDTO: this.compDTO, contentDTO, pageId: this.pageId, pageName: this.pageName })
41 } else if (contentDTO.appStyle === CompStyle.Card_03) { 43 } else if (contentDTO.appStyle === CompStyle.Card_03) {
42 - Card3Component({ compDTO: this.compDTO, contentDTO }) 44 + Card3Component({ compDTO: this.compDTO, contentDTO, pageId: this.pageId, pageName: this.pageName })
43 } else if (contentDTO.appStyle === CompStyle.Card_04) { 45 } else if (contentDTO.appStyle === CompStyle.Card_04) {
44 - Card4Component({ compDTO: this.compDTO, contentDTO }) 46 + Card4Component({ compDTO: this.compDTO, contentDTO, pageId: this.pageId, pageName: this.pageName })
45 } else if (contentDTO.appStyle === CompStyle.Card_05) { 47 } else if (contentDTO.appStyle === CompStyle.Card_05) {
46 - Card5Component({ contentDTO, titleShowPolicy: this.compDTO.titleShowPolicy}) 48 + Card5Component({ compDTO: this.compDTO, contentDTO, titleShowPolicy: this.compDTO.titleShowPolicy, pageId: this.pageId, pageName: this.pageName})
47 } else if (contentDTO.appStyle === CompStyle.Card_06 || contentDTO.appStyle === CompStyle 49 } else if (contentDTO.appStyle === CompStyle.Card_06 || contentDTO.appStyle === CompStyle
48 .Card_13) { 50 .Card_13) {
49 - Card6Component({ compDTO: this.compDTO, contentDTO: this.contentDTO }) 51 + Card6Component({ compDTO: this.compDTO, contentDTO: this.contentDTO, pageId: this.pageId, pageName: this.pageName })
50 } else if (contentDTO.appStyle === CompStyle.Card_10) { 52 } else if (contentDTO.appStyle === CompStyle.Card_10) {
51 - Card10Component({ compDTO: this.compDTO, contentDTO }) 53 + Card10Component({ compDTO: this.compDTO, contentDTO, pageId: this.pageId, pageName: this.pageName })
52 } else if (contentDTO.appStyle === CompStyle.Card_11) { 54 } else if (contentDTO.appStyle === CompStyle.Card_11) {
53 - Card11Component({ compDTO: this.compDTO, contentDTO }) 55 + Card11Component({ compDTO: this.compDTO, contentDTO, pageId: this.pageId, pageName: this.pageName })
54 } else if (contentDTO.appStyle === CompStyle.Card_12) { 56 } else if (contentDTO.appStyle === CompStyle.Card_12) {
55 - Card12Component({ contentDTO }) 57 + Card12Component({ compDTO: this.compDTO, contentDTO, pageId: this.pageId, pageName: this.pageName })
56 } else if (contentDTO.appStyle === CompStyle.Card_14) { 58 } else if (contentDTO.appStyle === CompStyle.Card_14) {
57 - Card14Component({ contentDTO }) 59 + Card14Component({ contentDTO, compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
58 } else if (contentDTO.appStyle === CompStyle.Card_15) { 60 } else if (contentDTO.appStyle === CompStyle.Card_15) {
59 - Card15Component({ contentDTO }) 61 + Card15Component({ contentDTO, compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
60 } else if (contentDTO.appStyle === CompStyle.Card_16) { 62 } else if (contentDTO.appStyle === CompStyle.Card_16) {
61 - Card16Component({ contentDTO }) 63 + Card16Component({ contentDTO, compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
62 } else if (contentDTO.appStyle === CompStyle.Card_17) { 64 } else if (contentDTO.appStyle === CompStyle.Card_17) {
63 - Card17Component({ compDTO: this.compDTO, contentDTO }) 65 + Card17Component({ compDTO: this.compDTO, contentDTO, pageId: this.pageId, pageName: this.pageName })
64 } else if (contentDTO.appStyle === CompStyle.Card_19) { 66 } else if (contentDTO.appStyle === CompStyle.Card_19) {
65 - Card19Component({ contentDTO }) 67 + Card19Component({ contentDTO, compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
66 } else if (contentDTO.appStyle === CompStyle.Card_20) { 68 } else if (contentDTO.appStyle === CompStyle.Card_20) {
67 - Card20Component({ contentDTO }) 69 + Card20Component({ contentDTO, compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
68 } else if (contentDTO.appStyle === CompStyle.Card_21) { 70 } else if (contentDTO.appStyle === CompStyle.Card_21) {
69 - Card21Component({ contentDTO }) 71 + Card21Component({ contentDTO, compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
70 } else { 72 } else {
71 // todo:组件未实现 / Component Not Implemented 73 // todo:组件未实现 / Component Not Implemented
72 // Text(contentDTO.appStyle) 74 // Text(contentDTO.appStyle)
@@ -33,6 +33,8 @@ import { LiveHorizontalCardComponent } from './view/LiveHorizontalCardComponent' @@ -33,6 +33,8 @@ import { LiveHorizontalCardComponent } from './view/LiveHorizontalCardComponent'
33 */ 33 */
34 @Component 34 @Component
35 export struct CompParser { 35 export struct CompParser {
  36 + @State pageId: string = '';
  37 + @State pageName: string = '';
36 @ObjectLink compDTO: CompDTO 38 @ObjectLink compDTO: CompDTO
37 @State compIndex: number = 0; 39 @State compIndex: number = 0;
38 @State private pageModel: PageModel = new PageModel(); 40 @State private pageModel: PageModel = new PageModel();
@@ -71,26 +73,26 @@ export struct CompParser { @@ -71,26 +73,26 @@ export struct CompParser {
71 Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 }) 73 Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 })
72 } else if (this.compDTO.compStyle === CompStyle.Zh_Carousel_Layout_01) { 74 } else if (this.compDTO.compStyle === CompStyle.Zh_Carousel_Layout_01) {
73 if (this.compDTO.operDataList.length > this.audioItems.length) { 75 if (this.compDTO.operDataList.length > this.audioItems.length) {
74 - ZhCarouselLayout01({ compDTO: this.compDTO }) 76 + ZhCarouselLayout01({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
75 Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 }) 77 Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 })
76 } 78 }
77 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_01 && 79 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_01 &&
78 this.compDTO.imageScale === 2) { // && compDTO.name ==="横划卡" 80 this.compDTO.imageScale === 2) { // && compDTO.name ==="横划卡"
79 81
80 - LiveHorizontalCardComponent({ compDTO: this.compDTO }) 82 + LiveHorizontalCardComponent({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
81 Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 }) 83 Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 })
82 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_01 && this.compDTO.imageScale === 3) { 84 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_01 && this.compDTO.imageScale === 3) {
83 if (this.compDTO.operDataList.length > 1) { 85 if (this.compDTO.operDataList.length > 1) {
84 - HorizontalStrokeCardThreeTwoRadioForMoreComponent({ compDTO: this.compDTO }) 86 + HorizontalStrokeCardThreeTwoRadioForMoreComponent({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
85 } else { 87 } else {
86 - HorizontalStrokeCardThreeTwoRadioForOneComponent({ compDTO: this.compDTO }) 88 + HorizontalStrokeCardThreeTwoRadioForOneComponent({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
87 } 89 }
88 Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 }) 90 Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 })
89 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_02) { 91 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_02) {
90 - ZhSingleRow02({ compDTO: this.compDTO }) 92 + ZhSingleRow02({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
91 Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 }) 93 Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 })
92 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_03) { 94 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_03) {
93 - ZhSingleRow03({ compDTO: this.compDTO }) 95 + ZhSingleRow03({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
94 Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 }) 96 Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 })
95 } else if (this.compDTO.compStyle === CompStyle.Zh_Grid_Layout_02) { //双列流小视频,一行两图卡 ->标题 97 } else if (this.compDTO.compStyle === CompStyle.Zh_Grid_Layout_02) { //双列流小视频,一行两图卡 ->标题
96 //ZhGridLayout02({ compDTO: this.compDTO }) 98 //ZhGridLayout02({ compDTO: this.compDTO })
@@ -98,34 +100,34 @@ export struct CompParser { @@ -98,34 +100,34 @@ export struct CompParser {
98 // Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 }) 100 // Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 })
99 } else if (this.compDTO.compStyle === CompStyle.Card_Comp_Zh_Grid_Layout_02) { //双列流小视频,一行两图卡 101 } else if (this.compDTO.compStyle === CompStyle.Card_Comp_Zh_Grid_Layout_02) { //双列流小视频,一行两图卡
100 102
101 - ZhGridLayout02NewsContent({ compDTO: this.compDTO, operDataList: this.compDTO.operDataList }) 103 + ZhGridLayout02NewsContent({ compDTO: this.compDTO, operDataList: this.compDTO.operDataList, pageId: this.pageId, pageName: this.pageName })
102 104
103 } else if (this.compDTO.compStyle === CompStyle.Zh_Grid_Layout_03) { 105 } else if (this.compDTO.compStyle === CompStyle.Zh_Grid_Layout_03) {
104 - ZhGridLayout03({ compDTO: this.compDTO }) 106 + ZhGridLayout03({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
105 Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 }) 107 Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 })
106 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_04) { 108 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_04) {
107 - ZhSingleRow04({ compDTO: this.compDTO }) 109 + ZhSingleRow04({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
108 Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 }) 110 Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 })
109 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_05) { 111 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_05) {
110 // ZhSingleRow05({ compDTO }) 112 // ZhSingleRow05({ compDTO })
111 // Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 }) 113 // Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 })
112 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_06) { 114 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_06) {
113 - ZhSingleRow06({ compDTO: this.compDTO }) 115 + ZhSingleRow06({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
114 Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 }) 116 Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 })
115 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_02) { 117 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_02) {
116 //头图卡 和comStyle 2相同, 118 //头图卡 和comStyle 2相同,
117 - Card5Component({ contentDTO: this.compDTO.operDataList[0], titleShowPolicy: this.compDTO.titleShowPolicy }) 119 + Card5Component({ compDTO: this.compDTO, contentDTO: this.compDTO.operDataList[0], titleShowPolicy: this.compDTO.titleShowPolicy, pageId: this.pageId, pageName: this.pageName })
118 Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 }) 120 Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 })
119 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_03) { 121 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_03) {
120 // 大图卡 122 // 大图卡
121 - Card2Component({ compDTO: this.compDTO, contentDTO: this.compDTO.operDataList[0] }) 123 + Card2Component({ compDTO: this.compDTO, contentDTO: this.compDTO.operDataList[0], pageId: this.pageId, pageName: this.pageName })
122 Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 }) 124 Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 })
123 } else if (this.compDTO.compStyle === CompStyle.Card_09) { 125 } else if (this.compDTO.compStyle === CompStyle.Card_09) {
124 //时间链卡 126 //时间链卡
125 - Card9Component({ contentDTO:this.compDTO.operDataList[0] }) 127 + Card9Component({ compDTO: this.compDTO, contentDTO:this.compDTO.operDataList[0], pageId: this.pageId, pageName: this.pageName })
126 Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 }) 128 Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 })
127 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_04) { 129 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_04) {
128 - ZhSingleColumn04({ compDTO: this.compDTO }) 130 + ZhSingleColumn04({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
129 Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 }) 131 Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 })
130 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_05) { 132 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_05) {
131 // ZhSingleColumn05({ compDTO: compDTO }) 133 // ZhSingleColumn05({ compDTO: compDTO })
@@ -133,14 +135,14 @@ export struct CompParser { @@ -133,14 +135,14 @@ export struct CompParser {
133 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_09) { 135 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_09) {
134 Divider().strokeWidth(3).color('#ffffff').padding({ left: 0, right: 0 }).margin({ top: -3 }) 136 Divider().strokeWidth(3).color('#ffffff').padding({ left: 0, right: 0 }).margin({ top: -3 })
135 Divider().strokeWidth(6).color('#f5f5f5') 137 Divider().strokeWidth(6).color('#f5f5f5')
136 - ZhSingleColumn09({ compDTO: this.compDTO }) 138 + ZhSingleColumn09({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
137 Divider().strokeWidth(6).color('#f5f5f5') 139 Divider().strokeWidth(6).color('#f5f5f5')
138 } else if (this.compDTO.compStyle === CompStyle.Card_Comp_Adv) { // 广告 140 } else if (this.compDTO.compStyle === CompStyle.Card_Comp_Adv) { // 广告
139 AdvCardParser({ pageModel: this.pageModel, compDTO: this.compDTO }) 141 AdvCardParser({ pageModel: this.pageModel, compDTO: this.compDTO })
140 //Text(`compIndex = ${compIndex}`).width('100%').fontSize('12fp').fontColor(Color.Red).padding({ left: 0, right: 0 }) 142 //Text(`compIndex = ${compIndex}`).width('100%').fontSize('12fp').fontColor(Color.Red).padding({ left: 0, right: 0 })
141 Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 }) 143 Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 })
142 } else if (!Number.isNaN(Number(this.compDTO.compStyle))) { 144 } else if (!Number.isNaN(Number(this.compDTO.compStyle))) {
143 - CardParser({ contentDTO: this.compDTO.operDataList[0], compDTO: this.compDTO }); 145 + CardParser({ contentDTO: this.compDTO.operDataList[0], compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName });
144 Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) 146 Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })
145 } else { 147 } else {
146 // Text(this.compDTO.compStyle) 148 // Text(this.compDTO.compStyle)
@@ -109,7 +109,7 @@ export struct DynamicDetailComponent { @@ -109,7 +109,7 @@ export struct DynamicDetailComponent {
109 //分割线 109 //分割线
110 Image($r('app.media.ic_news_detail_division')) 110 Image($r('app.media.ic_news_detail_division'))
111 .width('100%') 111 .width('100%')
112 - .height($r('app.float.margin_12')) 112 + .height($r('app.float.margin_6'))
113 .padding({ left: $r('app.float.margin_16'), right: $r('app.float.margin_16') }) 113 .padding({ left: $r('app.float.margin_16'), right: $r('app.float.margin_16') })
114 Stack({ alignContent: Alignment.Bottom }) { 114 Stack({ alignContent: Alignment.Bottom }) {
115 if (!this.isNetConnected) { 115 if (!this.isNetConnected) {
1 -import { Action, NewspaperListItemBean, NewspaperPositionItemBean, Params } from 'wdBean';  
2 -import { ExtraDTO } from 'wdBean/src/main/ets/bean/component/extra/ExtraDTO'; 1 +import { ContentDTO, NewspaperListItemBean, NewspaperPositionItemBean, Params } from 'wdBean';
3 import { StringUtils } from 'wdKit'; 2 import { StringUtils } from 'wdKit';
4 -import { WDRouterRule } from 'wdRouter'; 3 +import { ProcessUtils } from 'wdRouter';
5 import { newsSkeleton } from './skeleton/newsSkeleton'; 4 import { newsSkeleton } from './skeleton/newsSkeleton';
6 5
7 @Component 6 @Component
@@ -62,21 +61,15 @@ export struct ENewspaperItemComponent { @@ -62,21 +61,15 @@ export struct ENewspaperItemComponent {
62 } 61 }
63 if (event.type === TouchType.Up) { 62 if (event.type === TouchType.Up) {
64 this.context.clearRect(0, 0, this.context.width, this.context.height) 63 this.context.clearRect(0, 0, this.context.width, this.context.height)
65 - if (this.itemBeanClicked && this.itemBeanClicked.newsId) {  
66 - let taskAction: Action = {  
67 - type: 'JUMP_INNER_NEW_PAGE',  
68 - params: {  
69 - contentID: '' + this.itemBeanClicked.newsId,  
70 - pageID: 'IMAGE_TEXT_DETAIL',  
71 - extra: {  
72 - relType: this.itemBeanClicked.relType ?? '',  
73 - relId: '' + this.itemBeanClicked.relId,  
74 - sourcePage: '5'  
75 - } as ExtraDTO  
76 - } as Params,  
77 - };  
78 - WDRouterRule.jumpWithAction(taskAction)  
79 - 64 + if (this.itemBeanClicked != null && this.itemBeanClicked.newsId != 0) {
  65 + //公共跳转
  66 + let content: ContentDTO = {
  67 + objectId:this.itemBeanClicked.newsId+'',
  68 + objectType:this.itemBeanClicked.newsType+'',
  69 + relId:this.itemBeanClicked.relId+'',
  70 + relType:this.itemBeanClicked.relType ?? '0'
  71 + } as ContentDTO
  72 + ProcessUtils.processPage(content)
80 this.itemBeanClicked = {} as NewspaperPositionItemBean 73 this.itemBeanClicked = {} as NewspaperPositionItemBean
81 } 74 }
82 } 75 }
@@ -139,7 +132,6 @@ export struct ENewspaperItemComponent { @@ -139,7 +132,6 @@ export struct ENewspaperItemComponent {
139 } 132 }
140 133
141 } 134 }
142 -  
143 if (vp2px(x) > minX && vp2px(x) < maxX && vp2px(y) > minY && vp2px(y) < maxY) { 135 if (vp2px(x) > minX && vp2px(x) < maxX && vp2px(y) > minY && vp2px(y) < maxY) {
144 this.itemBeanClicked = itemBean; 136 this.itemBeanClicked = itemBean;
145 return xys; 137 return xys;
@@ -33,8 +33,6 @@ export struct FeedBackActivity { @@ -33,8 +33,6 @@ export struct FeedBackActivity {
33 //添加图片 33 //添加图片
34 addPic: PhotoListBean = {itemType:1} as PhotoListBean 34 addPic: PhotoListBean = {itemType:1} as PhotoListBean
35 @State pics: PhotoListBean[] = [this.addPic] as PhotoListBean[] 35 @State pics: PhotoListBean[] = [this.addPic] as PhotoListBean[]
36 - // 选择媒体文件的最大数目  
37 - selectNum = 3;  
38 36
39 async aboutToAppear() { 37 async aboutToAppear() {
40 await this.getContentDetailData() 38 await this.getContentDetailData()
@@ -110,15 +108,15 @@ export struct FeedBackActivity { @@ -110,15 +108,15 @@ export struct FeedBackActivity {
110 GridCol({ 108 GridCol({
111 }) { 109 }) {
112 if(1 == feedbackImageItem.itemType){ 110 if(1 == feedbackImageItem.itemType){
113 - Image($r('app.media.feekback_add'))  
114 - .width(60)  
115 - .height(60)  
116 - .onClick(async (event: ClickEvent) => {  
117 - if(await FastClickUtil.isMinDelayTime()){  
118 - return  
119 - }  
120 - this.callFilePickerSelectImage();  
121 - }) 111 + // Image($r('app.media.feekback_add'))
  112 + // .width(60)
  113 + // .height(60)
  114 + // .onClick(async (event: ClickEvent) => {
  115 + // if(await FastClickUtil.isMinDelayTime()){
  116 + // return
  117 + // }
  118 + // this.callFilePickerSelectImage();
  119 + // })
122 }else{ 120 }else{
123 Stack({alignContent: Alignment.TopEnd}) { 121 Stack({alignContent: Alignment.TopEnd}) {
124 Image(feedbackImageItem.picPath) 122 Image(feedbackImageItem.picPath)
@@ -140,7 +138,6 @@ export struct FeedBackActivity { @@ -140,7 +138,6 @@ export struct FeedBackActivity {
140 if(await FastClickUtil.isMinDelayTime()){ 138 if(await FastClickUtil.isMinDelayTime()){
141 return 139 return
142 } 140 }
143 -  
144 let temp: PhotoListBean[] = [] as PhotoListBean[] 141 let temp: PhotoListBean[] = [] as PhotoListBean[]
145 temp.length = this.pics.length - 1; 142 temp.length = this.pics.length - 1;
146 let tempIndex = 0; 143 let tempIndex = 0;
@@ -267,7 +264,8 @@ export struct FeedBackActivity { @@ -267,7 +264,8 @@ export struct FeedBackActivity {
267 // 设置photoPicker的参数 264 // 设置photoPicker的参数
268 let PhotoSelectOptions = new picker.PhotoSelectOptions(); 265 let PhotoSelectOptions = new picker.PhotoSelectOptions();
269 PhotoSelectOptions.MIMEType = picker.PhotoViewMIMETypes.IMAGE_TYPE; // 过滤选择媒体文件类型 266 PhotoSelectOptions.MIMEType = picker.PhotoViewMIMETypes.IMAGE_TYPE; // 过滤选择媒体文件类型
270 - PhotoSelectOptions.maxSelectNumber = this.selectNum; // 选择媒体文件的最大数目 267 + let max = 3-this.pics.length+1
  268 + PhotoSelectOptions.maxSelectNumber = max; // 选择媒体文件的最大数目
271 let mediaFlag = false; 269 let mediaFlag = false;
272 let photoPicker = new picker.PhotoViewPicker(); // 使用图库选择器对象前,需要先创建PhotoViewPicker实例 270 let photoPicker = new picker.PhotoViewPicker(); // 使用图库选择器对象前,需要先创建PhotoViewPicker实例
273 photoPicker.select(PhotoSelectOptions).then((PhotoSelectResult) => { 271 photoPicker.select(PhotoSelectOptions).then((PhotoSelectResult) => {
@@ -278,26 +276,35 @@ export struct FeedBackActivity { @@ -278,26 +276,35 @@ export struct FeedBackActivity {
278 // 其中包含Array<string>类型的photoUris,为返回图库选择后的媒体文件的uri数组;还包含boolean类型的isOriginalPhoto,指示返回图库选择后的媒体文件是否为原图。 276 // 其中包含Array<string>类型的photoUris,为返回图库选择后的媒体文件的uri数组;还包含boolean类型的isOriginalPhoto,指示返回图库选择后的媒体文件是否为原图。
279 // 声明变量array,其取值为PhotoSelectResult中的数组。 277 // 声明变量array,其取值为PhotoSelectResult中的数组。
280 array = PhotoSelectResult['photoUris']; 278 array = PhotoSelectResult['photoUris'];
281 - let beforeLen = this.pics.length;  
282 - let startIndex = this.pics.length-1; 279 + let beforeLen = this.pics.length + array.length;
283 let totalLen = this.pics.length+array.length; 280 let totalLen = this.pics.length+array.length;
284 if(totalLen > 3){ 281 if(totalLen > 3){
285 totalLen = 3 282 totalLen = 3
286 } 283 }
287 - this.pics.length = totalLen;  
288 - 284 + // this.pics.length = totalLen;
  285 + let tempPics = [] as PhotoListBean[]
  286 + tempPics.length = totalLen;
  287 + let startIndex = 0;
  288 + this.pics.forEach((value) => {
  289 + if(value.itemType == 2){
  290 + value.id = startIndex
  291 + tempPics[startIndex] = value;
  292 + startIndex = startIndex+1;
  293 + mediaFlag = true;
  294 + }
  295 + })
289 array.forEach((value) => { 296 array.forEach((value) => {
290 let pic: PhotoListBean = {itemType:2,picPath:value} as PhotoListBean 297 let pic: PhotoListBean = {itemType:2,picPath:value} as PhotoListBean
291 pic.id = startIndex 298 pic.id = startIndex
292 - this.pics[startIndex] = pic 299 + tempPics[startIndex] = pic;
293 startIndex = startIndex+1; 300 startIndex = startIndex+1;
294 mediaFlag = true; 301 mediaFlag = true;
295 - Logger.info(TAG, `select image/video uri: ${value}`);  
296 }) 302 })
297 - if(this.pics.length<=3 && beforeLen != 3 && array.length != 3){ 303 + if(startIndex<3){
298 this.addPic.id = startIndex 304 this.addPic.id = startIndex
299 - this.pics[this.pics.length-1]=this.addPic; 305 + tempPics[startIndex]=this.addPic;
300 } 306 }
  307 + this.pics = tempPics;
301 } 308 }
302 if (mediaFlag) { 309 if (mediaFlag) {
303 this.getFilenameByUriForMedia(array); 310 this.getFilenameByUriForMedia(array);
@@ -23,6 +23,9 @@ import { PeopleShipMainViewModel } from '../../viewmodel/PeopleShipMainViewModel @@ -23,6 +23,9 @@ import { PeopleShipMainViewModel } from '../../viewmodel/PeopleShipMainViewModel
23 import { AudioSuspensionModel } from '../../viewmodel/AudioSuspensionModel' 23 import { AudioSuspensionModel } from '../../viewmodel/AudioSuspensionModel'
24 import { viewColumInsightIntentShare } from '../../utils/InsightIntentShare' 24 import { viewColumInsightIntentShare } from '../../utils/InsightIntentShare'
25 import { common } from '@kit.AbilityKit'; 25 import { common } from '@kit.AbilityKit';
  26 +import TrackingPageBrowseUtils from '../../utils/TrackingPageBrowseUtils'
  27 +import {TrackConstants,TrackParamConvert}from 'wdTracking/Index'
  28 +import { ColorUtils } from '../../utils/ColorUtils';
26 29
27 const TAG = 'MorningEveningPaperComponent'; 30 const TAG = 'MorningEveningPaperComponent';
28 31
@@ -200,13 +203,18 @@ export struct MorningEveningPaperComponent { @@ -200,13 +203,18 @@ export struct MorningEveningPaperComponent {
200 203
201 const imageSource: image.ImageSource | undefined = await getPicture(imageUrl) 204 const imageSource: image.ImageSource | undefined = await getPicture(imageUrl)
202 205
203 - if (imageSource) { 206 + if (imageSource && this.pageInfoBean.topicInfo.frontFlag === 1) {
204 this.pickColor(imageSource) 207 this.pickColor(imageSource)
205 208
206 } else { 209 } else {
207 - this.mixedBgColor = this.pageInfoBean.backgroundColor 210 + if (this.pageInfoBean.topicInfo.topicPattern === 1) {
  211 + this.mixedBgColor = '#66BDBD'
  212 + }else if(this.pageInfoBean.topicInfo.topicPattern === 2){
  213 + this.mixedBgColor = '#E78E17'
  214 + }else {
  215 + this.mixedBgColor = '#2F2170'
  216 + }
208 } 217 }
209 -  
210 } 218 }
211 219
212 private async pickColor(imageSource: image.ImageSource | undefined) { 220 private async pickColor(imageSource: image.ImageSource | undefined) {
@@ -216,6 +224,7 @@ export struct MorningEveningPaperComponent { @@ -216,6 +224,7 @@ export struct MorningEveningPaperComponent {
216 let color = colorPicker.getMainColorSync(); 224 let color = colorPicker.getMainColorSync();
217 Logger.debug(TAG, "compInfoBean compStyle = " + color) 225 Logger.debug(TAG, "compInfoBean compStyle = " + color)
218 226
  227 + color = ColorUtils.getMorningEveningPaperRgb({red:color.red,green:color.green,blue:color.blue,alpha:color.alpha})
219 // 将取色器选取的color示例转换为十六进制颜色代码 228 // 将取色器选取的color示例转换为十六进制颜色代码
220 this.mixedBgColor = "#" + color.alpha.toString(16) + color.red.toString(16) + color.green.toString(16) + color.blue.toString(16); 229 this.mixedBgColor = "#" + color.alpha.toString(16) + color.red.toString(16) + color.green.toString(16) + color.blue.toString(16);
221 Logger.debug(TAG, "compInfoBean compStyle = " + this.mixedBgColor) 230 Logger.debug(TAG, "compInfoBean compStyle = " + this.mixedBgColor)
@@ -230,9 +239,15 @@ export struct MorningEveningPaperComponent { @@ -230,9 +239,15 @@ export struct MorningEveningPaperComponent {
230 // WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#000000', }) 239 // WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#000000', })
231 } 240 }
232 241
  242 + onPageShow(){
  243 + TrackingPageBrowseUtils.TrackingPageBrowseExposureStart()
  244 + }
  245 +
233 onPageHide() { 246 onPageHide() {
234 this.status = PlayerConstants.STATUS_PAUSE; 247 this.status = PlayerConstants.STATUS_PAUSE;
235 this.playerController?.pause(); 248 this.playerController?.pause();
  249 +
  250 + TrackingPageBrowseUtils.TrackingPageBrowseExposureEnd('','',TrackParamConvert.pageInfoBean_ParamType(this.pageInfoBean))
236 } 251 }
237 252
238 build() { 253 build() {
1 -import { FrontLinkObject } from 'wdBean'; 1 +import { ContentDTO, FrontLinkObject } from 'wdBean';
  2 +import { ProcessUtils } from 'wdRouter/Index';
2 3
3 /** 4 /**
4 * 早晚报,topic 5 * 早晚报,topic
@@ -47,7 +48,15 @@ export struct topicInfoView { @@ -47,7 +48,15 @@ export struct topicInfoView {
47 .backgroundColor($r('app.color.color_99636363')) 48 .backgroundColor($r('app.color.color_99636363'))
48 .margin({ top: 8, left: 16, right: 16, bottom: 16 }) 49 .margin({ top: 8, left: 16, right: 16, bottom: 16 })
49 .borderRadius(2) 50 .borderRadius(2)
50 - // .backgroundColor(Color.Red) 51 + .onClick(()=>{
  52 + if (this.frontLinkObject) {
  53 + let contentDTO :ContentDTO = new ContentDTO();
  54 + contentDTO.objectType = this.frontLinkObject?.newsType.toString()
  55 + contentDTO.objectId = this.frontLinkObject?.newsId
  56 + contentDTO.linkUrl = this.frontLinkObject?.linkUrl
  57 + ProcessUtils.processPage(contentDTO)
  58 + }
  59 + }).width(80)
51 .alignRules({ 60 .alignRules({
52 left: { anchor: "__container__", align: HorizontalAlign.Start }, 61 left: { anchor: "__container__", align: HorizontalAlign.Start },
53 bottom: { anchor: "__container__", align: VerticalAlign.Bottom } 62 bottom: { anchor: "__container__", align: VerticalAlign.Bottom }
@@ -138,6 +138,7 @@ export struct SpacialTopicPageComponent { @@ -138,6 +138,7 @@ export struct SpacialTopicPageComponent {
138 contentDetailData: this.contentDetailData, 138 contentDetailData: this.contentDetailData,
139 publishCommentModel: this.publishCommentModel, 139 publishCommentModel: this.publishCommentModel,
140 operationButtonList: this.operationButtonList, 140 operationButtonList: this.operationButtonList,
  141 + styleType: 1,
141 }) 142 })
142 } 143 }
143 }.width(CommonConstants.FULL_WIDTH).height(CommonConstants.FULL_HEIGHT) 144 }.width(CommonConstants.FULL_WIDTH).height(CommonConstants.FULL_HEIGHT)
@@ -12,13 +12,18 @@ import font from '@ohos.font'; @@ -12,13 +12,18 @@ import font from '@ohos.font';
12 */ 12 */
13 @Component 13 @Component
14 export struct CardMediaInfo { 14 export struct CardMediaInfo {
  15 +
  16 + @State livePeopleNum :boolean = true
15 @State contentDTO: ContentDTO = new ContentDTO() // 如果有duraion,代表点播,显示时长;如果不传或者传0,显示直播中 17 @State contentDTO: ContentDTO = new ContentDTO() // 如果有duraion,代表点播,显示时长;如果不传或者传0,显示直播中
16 @State joinPeopleNum: number = 0; 18 @State joinPeopleNum: number = 0;
17 // objectType 0:不跳转 1:点播,2:直播,3:活动,4:广告,5:专题,6:链接,7:榜单,8:图文,9:组图,10:H5新闻,11:频道,12:组件,13:音频, 19 // objectType 0:不跳转 1:点播,2:直播,3:活动,4:广告,5:专题,6:链接,7:榜单,8:图文,9:组图,10:H5新闻,11:频道,12:组件,13:音频,
18 // 14动态图文,15动态视频16问政;100人民号,101标签 20 // 14动态图文,15动态视频16问政;100人民号,101标签
19 21
20 aboutToAppear(): void { 22 aboutToAppear(): void {
  23 + if(this.livePeopleNum){
21 this.getJoinPeopleNum(); 24 this.getJoinPeopleNum();
  25 + }
  26 +
22 27
23 font.registerFont({ 28 font.registerFont({
24 familyName: 'BebasNeue', 29 familyName: 'BebasNeue',
@@ -49,7 +49,7 @@ export struct CardAdvVideoComponent { @@ -49,7 +49,7 @@ export struct CardAdvVideoComponent {
49 .borderColor($r('app.color.color_0D000000')) 49 .borderColor($r('app.color.color_0D000000'))
50 //播放状态+时长 50 //播放状态+时长
51 CardMediaInfo({ 51 CardMediaInfo({
52 - contentDTO: this.contentDTO 52 + contentDTO: this.contentDTO, livePeopleNum:false,
53 }) 53 })
54 } 54 }
55 .alignContent(Alignment.BottomEnd) 55 .alignContent(Alignment.BottomEnd)
@@ -5,6 +5,7 @@ import { CardSourceInfo } from '../cardCommon/CardSourceInfo'; @@ -5,6 +5,7 @@ import { CardSourceInfo } from '../cardCommon/CardSourceInfo';
5 import { CardMediaInfo } from '../cardCommon/CardMediaInfo'; 5 import { CardMediaInfo } from '../cardCommon/CardMediaInfo';
6 import { Notes } from './notes'; 6 import { Notes } from './notes';
7 import { onlyWifiLoadImg } from '../../utils/lazyloadImg'; 7 import { onlyWifiLoadImg } from '../../utils/lazyloadImg';
  8 +import { InfomationCardClick } from '../../utils/infomationCardClick'
8 9
9 /** 10 /**
10 * 大专题卡--CompStyle: 10 11 * 大专题卡--CompStyle: 10
@@ -14,6 +15,8 @@ const TAG: string = 'Card10Component'; @@ -14,6 +15,8 @@ const TAG: string = 'Card10Component';
14 @Preview 15 @Preview
15 @Component 16 @Component
16 export struct Card10Component { 17 export struct Card10Component {
  18 + @State pageId: string = '';
  19 + @State pageName: string = '';
17 @State contentDTO: ContentDTO = new ContentDTO(); 20 @State contentDTO: ContentDTO = new ContentDTO();
18 @State loadImg: boolean = false; 21 @State loadImg: boolean = false;
19 @ObjectLink compDTO: CompDTO 22 @ObjectLink compDTO: CompDTO
@@ -57,6 +60,7 @@ export struct Card10Component { @@ -57,6 +60,7 @@ export struct Card10Component {
57 .textOverflow({ overflow: TextOverflow.Ellipsis }) 60 .textOverflow({ overflow: TextOverflow.Ellipsis })
58 .margin({ bottom: 19 }) 61 .margin({ bottom: 19 })
59 .onClick((event: ClickEvent) => { 62 .onClick((event: ClickEvent) => {
  63 + InfomationCardClick.track(this.compDTO, this.contentDTO, this.pageId, this.pageName)
60 ProcessUtils.processPage(this.contentDTO) 64 ProcessUtils.processPage(this.contentDTO)
61 }) 65 })
62 } 66 }
@@ -70,6 +74,7 @@ export struct Card10Component { @@ -70,6 +74,7 @@ export struct Card10Component {
70 topRight: $r('app.float.image_border_radius') 74 topRight: $r('app.float.image_border_radius')
71 }) 75 })
72 .onClick((event: ClickEvent) => { 76 .onClick((event: ClickEvent) => {
  77 + InfomationCardClick.track(this.compDTO, this.contentDTO, this.pageId, this.pageName)
73 ProcessUtils.processPage(this.contentDTO) 78 ProcessUtils.processPage(this.contentDTO)
74 }) 79 })
75 if (this.contentDTO.objectType == '5') { 80 if (this.contentDTO.objectType == '5') {
@@ -102,6 +107,7 @@ export struct Card10Component { @@ -102,6 +107,7 @@ export struct Card10Component {
102 .justifyContent(FlexAlign.Center) 107 .justifyContent(FlexAlign.Center)
103 .margin({ top: 5 }) 108 .margin({ top: 5 })
104 .onClick((event: ClickEvent) => { 109 .onClick((event: ClickEvent) => {
  110 + InfomationCardClick.track(this.compDTO, this.contentDTO, this.pageId, this.pageName)
105 ProcessUtils.processPage(this.contentDTO) 111 ProcessUtils.processPage(this.contentDTO)
106 }) 112 })
107 } 113 }
@@ -6,6 +6,7 @@ import { ProcessUtils } from 'wdRouter'; @@ -6,6 +6,7 @@ import { ProcessUtils } from 'wdRouter';
6 import { CardSourceInfo } from '../cardCommon/CardSourceInfo'; 6 import { CardSourceInfo } from '../cardCommon/CardSourceInfo';
7 import { Notes } from './notes'; 7 import { Notes } from './notes';
8 import { persistentStorage, hasClicked } from '../../utils/persistentStorage'; 8 import { persistentStorage, hasClicked } from '../../utils/persistentStorage';
  9 +import { InfomationCardClick } from '../../utils/infomationCardClick'
9 10
10 const TAG = 'Card11Component'; 11 const TAG = 'Card11Component';
11 12
@@ -14,6 +15,8 @@ const TAG = 'Card11Component'; @@ -14,6 +15,8 @@ const TAG = 'Card11Component';
14 */ 15 */
15 @Component 16 @Component
16 export struct Card11Component { 17 export struct Card11Component {
  18 + @State pageId: string = '';
  19 + @State pageName: string = '';
17 @State contentDTO: ContentDTO = new ContentDTO(); 20 @State contentDTO: ContentDTO = new ContentDTO();
18 @State clicked: boolean = false; 21 @State clicked: boolean = false;
19 @ObjectLink compDTO: CompDTO 22 @ObjectLink compDTO: CompDTO
@@ -78,6 +81,7 @@ export struct Card11Component { @@ -78,6 +81,7 @@ export struct Card11Component {
78 }) 81 })
79 .backgroundColor($r("app.color.white")) 82 .backgroundColor($r("app.color.white"))
80 .onClick((event: ClickEvent) => { 83 .onClick((event: ClickEvent) => {
  84 + InfomationCardClick.track(this.compDTO, this.contentDTO, this.pageId, this.pageName)
81 this.clicked = true; 85 this.clicked = true;
82 persistentStorage(this.contentDTO.objectId); 86 persistentStorage(this.contentDTO.objectId);
83 ProcessUtils.processPage(this.contentDTO) 87 ProcessUtils.processPage(this.contentDTO)
1 -import { ContentDTO } from 'wdBean'; 1 +import { ContentDTO, CompDTO } from 'wdBean';
2 import { RmhTitle } from '../cardCommon/RmhTitle' 2 import { RmhTitle } from '../cardCommon/RmhTitle'
3 import { CardMediaInfo } from '../cardCommon/CardMediaInfo' 3 import { CardMediaInfo } from '../cardCommon/CardMediaInfo'
4 import { CommonConstants } from 'wdConstant/Index'; 4 import { CommonConstants } from 'wdConstant/Index';
5 import { ProcessUtils } from 'wdRouter'; 5 import { ProcessUtils } from 'wdRouter';
6 import {CarderInteraction} from '../CarderInteraction' 6 import {CarderInteraction} from '../CarderInteraction'
7 import { persistentStorage, hasClicked } from '../../utils/persistentStorage'; 7 import { persistentStorage, hasClicked } from '../../utils/persistentStorage';
  8 +import { InfomationCardClick } from '../../utils/infomationCardClick'
8 9
9 const TAG = 'Card12Component'; 10 const TAG = 'Card12Component';
10 11
@@ -13,6 +14,9 @@ const TAG = 'Card12Component'; @@ -13,6 +14,9 @@ const TAG = 'Card12Component';
13 */ 14 */
14 @Component 15 @Component
15 export struct Card12Component { 16 export struct Card12Component {
  17 + @ObjectLink compDTO: CompDTO
  18 + @State pageId: string = '';
  19 + @State pageName: string = '';
16 @State contentDTO: ContentDTO = new ContentDTO(); 20 @State contentDTO: ContentDTO = new ContentDTO();
17 @State clicked: boolean = false; 21 @State clicked: boolean = false;
18 @State titleMarked: boolean = false; 22 @State titleMarked: boolean = false;
@@ -70,6 +74,7 @@ export struct Card12Component { @@ -70,6 +74,7 @@ export struct Card12Component {
70 bottom: $r('app.float.card_comp_pagePadding_tb') 74 bottom: $r('app.float.card_comp_pagePadding_tb')
71 }) 75 })
72 .onClick((event: ClickEvent) => { 76 .onClick((event: ClickEvent) => {
  77 + InfomationCardClick.track(this.compDTO, this.contentDTO, this.pageId, this.pageName)
73 this.clicked = true; 78 this.clicked = true;
74 persistentStorage(this.contentDTO.objectId); 79 persistentStorage(this.contentDTO.objectId);
75 ProcessUtils.processPage(this.contentDTO) 80 ProcessUtils.processPage(this.contentDTO)
1 -import { ContentDTO } from 'wdBean'; 1 +import { ContentDTO, CompDTO } from 'wdBean';
2 import { RmhTitle } from '../cardCommon/RmhTitle' 2 import { RmhTitle } from '../cardCommon/RmhTitle'
3 import { CardMediaInfo } from '../cardCommon/CardMediaInfo' 3 import { CardMediaInfo } from '../cardCommon/CardMediaInfo'
4 import { CommonConstants } from 'wdConstant/Index'; 4 import { CommonConstants } from 'wdConstant/Index';
@@ -6,6 +6,7 @@ import { ProcessUtils } from 'wdRouter'; @@ -6,6 +6,7 @@ import { ProcessUtils } from 'wdRouter';
6 import {CarderInteraction} from '../CarderInteraction' 6 import {CarderInteraction} from '../CarderInteraction'
7 import { onlyWifiLoadImg } from '../../utils/lazyloadImg'; 7 import { onlyWifiLoadImg } from '../../utils/lazyloadImg';
8 import { persistentStorage, hasClicked } from '../../utils/persistentStorage'; 8 import { persistentStorage, hasClicked } from '../../utils/persistentStorage';
  9 +import { InfomationCardClick } from '../../utils/infomationCardClick'
9 10
10 const TAG = 'Card14Component'; 11 const TAG = 'Card14Component';
11 12
@@ -14,6 +15,9 @@ const TAG = 'Card14Component'; @@ -14,6 +15,9 @@ const TAG = 'Card14Component';
14 */ 15 */
15 @Component 16 @Component
16 export struct Card14Component { 17 export struct Card14Component {
  18 + @ObjectLink compDTO: CompDTO
  19 + @State pageId: string = '';
  20 + @State pageName: string = '';
17 @State contentDTO: ContentDTO = new ContentDTO(); 21 @State contentDTO: ContentDTO = new ContentDTO();
18 @State loadImg: boolean = false; 22 @State loadImg: boolean = false;
19 @State clicked: boolean = false; 23 @State clicked: boolean = false;
@@ -89,6 +93,7 @@ export struct Card14Component { @@ -89,6 +93,7 @@ export struct Card14Component {
89 bottom: $r('app.float.card_comp_pagePadding_tb') 93 bottom: $r('app.float.card_comp_pagePadding_tb')
90 }) 94 })
91 .onClick((event: ClickEvent) => { 95 .onClick((event: ClickEvent) => {
  96 + InfomationCardClick.track(this.compDTO, this.contentDTO, this.pageId, this.pageName)
92 this.clicked = true; 97 this.clicked = true;
93 persistentStorage(this.contentDTO.objectId); 98 persistentStorage(this.contentDTO.objectId);
94 ProcessUtils.processPage(this.contentDTO) 99 ProcessUtils.processPage(this.contentDTO)
1 -import { ContentDTO } from 'wdBean'; 1 +import { ContentDTO, CompDTO } from 'wdBean';
2 import { ProcessUtils } from 'wdRouter'; 2 import { ProcessUtils } from 'wdRouter';
3 import { RmhTitle } from '../cardCommon/RmhTitle' 3 import { RmhTitle } from '../cardCommon/RmhTitle'
4 import { CardMediaInfo } from '../cardCommon/CardMediaInfo' 4 import { CardMediaInfo } from '../cardCommon/CardMediaInfo'
@@ -6,6 +6,7 @@ import { CommonConstants } from 'wdConstant/Index'; @@ -6,6 +6,7 @@ import { CommonConstants } from 'wdConstant/Index';
6 import {CarderInteraction} from '../CarderInteraction' 6 import {CarderInteraction} from '../CarderInteraction'
7 import { onlyWifiLoadImg } from '../../utils/lazyloadImg'; 7 import { onlyWifiLoadImg } from '../../utils/lazyloadImg';
8 import { persistentStorage, hasClicked } from '../../utils/persistentStorage'; 8 import { persistentStorage, hasClicked } from '../../utils/persistentStorage';
  9 +import { InfomationCardClick } from '../../utils/infomationCardClick'
9 10
10 const TAG: string = 'Card15Component'; 11 const TAG: string = 'Card15Component';
11 12
@@ -18,6 +19,9 @@ const TAG: string = 'Card15Component'; @@ -18,6 +19,9 @@ const TAG: string = 'Card15Component';
18 */ 19 */
19 @Component 20 @Component
20 export struct Card15Component { 21 export struct Card15Component {
  22 + @ObjectLink compDTO: CompDTO
  23 + @State pageId: string = '';
  24 + @State pageName: string = '';
21 @State contentDTO: ContentDTO = new ContentDTO(); 25 @State contentDTO: ContentDTO = new ContentDTO();
22 @State loadImg: boolean = false; 26 @State loadImg: boolean = false;
23 @State clicked: boolean = false; 27 @State clicked: boolean = false;
@@ -87,6 +91,7 @@ export struct Card15Component { @@ -87,6 +91,7 @@ export struct Card15Component {
87 bottom: $r('app.float.card_comp_pagePadding_tb') 91 bottom: $r('app.float.card_comp_pagePadding_tb')
88 }) 92 })
89 .onClick((event: ClickEvent) => { 93 .onClick((event: ClickEvent) => {
  94 + InfomationCardClick.track(this.compDTO, this.contentDTO, this.pageId, this.pageName)
90 this.clicked = true; 95 this.clicked = true;
91 persistentStorage(this.contentDTO.objectId); 96 persistentStorage(this.contentDTO.objectId);
92 ProcessUtils.processPage(this.contentDTO) 97 ProcessUtils.processPage(this.contentDTO)
1 -import { ContentDTO } from 'wdBean'; 1 +import { ContentDTO, CompDTO } from 'wdBean';
2 import { RmhTitle } from '../cardCommon/RmhTitle' 2 import { RmhTitle } from '../cardCommon/RmhTitle'
3 import { CardMediaInfo } from '../cardCommon/CardMediaInfo' 3 import { CardMediaInfo } from '../cardCommon/CardMediaInfo'
4 import { CommonConstants } from 'wdConstant/Index'; 4 import { CommonConstants } from 'wdConstant/Index';
@@ -6,6 +6,7 @@ import { ProcessUtils } from 'wdRouter'; @@ -6,6 +6,7 @@ import { ProcessUtils } from 'wdRouter';
6 import {CarderInteraction} from '../CarderInteraction' 6 import {CarderInteraction} from '../CarderInteraction'
7 import { onlyWifiLoadImg } from '../../utils/lazyloadImg'; 7 import { onlyWifiLoadImg } from '../../utils/lazyloadImg';
8 import { persistentStorage, hasClicked } from '../../utils/persistentStorage'; 8 import { persistentStorage, hasClicked } from '../../utils/persistentStorage';
  9 +import { InfomationCardClick } from '../../utils/infomationCardClick'
9 10
10 const TAG = 'Card16Component'; 11 const TAG = 'Card16Component';
11 12
@@ -19,6 +20,9 @@ interface fullColumnImgUrlItem { @@ -19,6 +20,9 @@ interface fullColumnImgUrlItem {
19 */ 20 */
20 @Component 21 @Component
21 export struct Card16Component { 22 export struct Card16Component {
  23 + @ObjectLink compDTO: CompDTO
  24 + @State pageId: string = '';
  25 + @State pageName: string = '';
22 @State contentDTO: ContentDTO = new ContentDTO(); 26 @State contentDTO: ContentDTO = new ContentDTO();
23 @State loadImg: boolean = false; 27 @State loadImg: boolean = false;
24 @State clicked: boolean = false; 28 @State clicked: boolean = false;
@@ -88,6 +92,7 @@ export struct Card16Component { @@ -88,6 +92,7 @@ export struct Card16Component {
88 bottom: $r('app.float.card_comp_pagePadding_tb') 92 bottom: $r('app.float.card_comp_pagePadding_tb')
89 }) 93 })
90 .onClick((event: ClickEvent) => { 94 .onClick((event: ClickEvent) => {
  95 + InfomationCardClick.track(this.compDTO, this.contentDTO, this.pageId, this.pageName)
91 this.clicked = true; 96 this.clicked = true;
92 persistentStorage(this.contentDTO.objectId); 97 persistentStorage(this.contentDTO.objectId);
93 ProcessUtils.processPage(this.contentDTO) 98 ProcessUtils.processPage(this.contentDTO)
@@ -6,6 +6,7 @@ import { CardSourceInfo } from '../cardCommon/CardSourceInfo'; @@ -6,6 +6,7 @@ import { CardSourceInfo } from '../cardCommon/CardSourceInfo';
6 import { onlyWifiLoadImg } from '../../utils/lazyloadImg'; 6 import { onlyWifiLoadImg } from '../../utils/lazyloadImg';
7 import { CardMediaInfo } from '../cardCommon/CardMediaInfo'; 7 import { CardMediaInfo } from '../cardCommon/CardMediaInfo';
8 import { persistentStorage, hasClicked } from '../../utils/persistentStorage'; 8 import { persistentStorage, hasClicked } from '../../utils/persistentStorage';
  9 +import { InfomationCardClick } from '../../utils/infomationCardClick'
9 10
10 const TAG = 'Card17Component'; 11 const TAG = 'Card17Component';
11 12
@@ -14,6 +15,8 @@ const TAG = 'Card17Component'; @@ -14,6 +15,8 @@ const TAG = 'Card17Component';
14 */ 15 */
15 @Component 16 @Component
16 export struct Card17Component { 17 export struct Card17Component {
  18 + @State pageId: string = '';
  19 + @State pageName: string = '';
17 @State contentDTO: ContentDTO = new ContentDTO(); 20 @State contentDTO: ContentDTO = new ContentDTO();
18 @State loadImg: boolean = false; 21 @State loadImg: boolean = false;
19 @State clicked: boolean = false; 22 @State clicked: boolean = false;
@@ -106,6 +109,7 @@ export struct Card17Component { @@ -106,6 +109,7 @@ export struct Card17Component {
106 } 109 }
107 .width(CommonConstants.FULL_WIDTH) 110 .width(CommonConstants.FULL_WIDTH)
108 .onClick((event: ClickEvent) => { 111 .onClick((event: ClickEvent) => {
  112 + InfomationCardClick.track(this.compDTO, this.contentDTO, this.pageId, this.pageName)
109 this.clicked = true; 113 this.clicked = true;
110 persistentStorage(this.contentDTO.objectId); 114 persistentStorage(this.contentDTO.objectId);
111 let taskAction: Action = { 115 let taskAction: Action = {
1 -import { ContentDTO, FullColumnImgUrlDTO, PhotoListBean } from 'wdBean'; 1 +import { ContentDTO, FullColumnImgUrlDTO, PhotoListBean, CompDTO } from 'wdBean';
2 import { RmhTitle } from '../cardCommon/RmhTitle' 2 import { RmhTitle } from '../cardCommon/RmhTitle'
3 import { ProcessUtils } from 'wdRouter'; 3 import { ProcessUtils } from 'wdRouter';
4 import { CommonConstants } from 'wdConstant/Index'; 4 import { CommonConstants } from 'wdConstant/Index';
5 import { CarderInteraction } from '../CarderInteraction' 5 import { CarderInteraction } from '../CarderInteraction'
6 import { onlyWifiLoadImg } from '../../utils/lazyloadImg'; 6 import { onlyWifiLoadImg } from '../../utils/lazyloadImg';
7 import { persistentStorage, hasClicked } from '../../utils/persistentStorage'; 7 import { persistentStorage, hasClicked } from '../../utils/persistentStorage';
  8 +import { InfomationCardClick } from '../../utils/infomationCardClick'
8 9
9 const TAG = 'Card19Component'; 10 const TAG = 'Card19Component';
10 11
@@ -13,6 +14,9 @@ const TAG = 'Card19Component'; @@ -13,6 +14,9 @@ const TAG = 'Card19Component';
13 */ 14 */
14 @Component 15 @Component
15 export struct Card19Component { 16 export struct Card19Component {
  17 + @ObjectLink compDTO: CompDTO
  18 + @State pageId: string = '';
  19 + @State pageName: string = '';
16 @State contentDTO: ContentDTO = new ContentDTO() 20 @State contentDTO: ContentDTO = new ContentDTO()
17 @State clicked: boolean = false; 21 @State clicked: boolean = false;
18 @State titleMarked: boolean = false; 22 @State titleMarked: boolean = false;
@@ -48,7 +52,7 @@ export struct Card19Component { @@ -48,7 +52,7 @@ export struct Card19Component {
48 .fontColor(0xED2800) 52 .fontColor(0xED2800)
49 Span(this.str03) 53 Span(this.str03)
50 } else { 54 } else {
51 - Span(this.contentDTO.newsTitle) 55 + Span(this.contentDTO.newsTitle=='null'?"":this.contentDTO.newsTitle)
52 } 56 }
53 } 57 }
54 .fontSize($r('app.float.font_size_18')) 58 .fontSize($r('app.float.font_size_18'))
@@ -58,6 +62,7 @@ export struct Card19Component { @@ -58,6 +62,7 @@ export struct Card19Component {
58 .width(CommonConstants.FULL_WIDTH) 62 .width(CommonConstants.FULL_WIDTH)
59 .lineHeight(25) 63 .lineHeight(25)
60 .onClick((event: ClickEvent) => { 64 .onClick((event: ClickEvent) => {
  65 + InfomationCardClick.track(this.compDTO, this.contentDTO, this.pageId, this.pageName)
61 this.clicked = true; 66 this.clicked = true;
62 ProcessUtils.processPage(this.contentDTO) 67 ProcessUtils.processPage(this.contentDTO)
63 }) 68 })
@@ -75,6 +80,7 @@ export struct Card19Component { @@ -75,6 +80,7 @@ export struct Card19Component {
75 bottom: $r('app.float.card_comp_pagePadding_tb') 80 bottom: $r('app.float.card_comp_pagePadding_tb')
76 }) 81 })
77 .onClick((event: ClickEvent) => { 82 .onClick((event: ClickEvent) => {
  83 + InfomationCardClick.track(this.compDTO, this.contentDTO, this.pageId, this.pageName)
78 this.clicked = true; 84 this.clicked = true;
79 persistentStorage(this.contentDTO.objectId); 85 persistentStorage(this.contentDTO.objectId);
80 ProcessUtils.processPage(this.contentDTO) 86 ProcessUtils.processPage(this.contentDTO)
1 -import { ContentDTO } from 'wdBean'; 1 +import { ContentDTO, CompDTO } from 'wdBean';
2 import { RmhTitle } from '../cardCommon/RmhTitle' 2 import { RmhTitle } from '../cardCommon/RmhTitle'
3 import { CardMediaInfo } from '../cardCommon/CardMediaInfo' 3 import { CardMediaInfo } from '../cardCommon/CardMediaInfo'
4 import { CommonConstants } from 'wdConstant/Index'; 4 import { CommonConstants } from 'wdConstant/Index';
@@ -6,6 +6,7 @@ import { ProcessUtils } from 'wdRouter'; @@ -6,6 +6,7 @@ import { ProcessUtils } from 'wdRouter';
6 import {CarderInteraction} from '../CarderInteraction' 6 import {CarderInteraction} from '../CarderInteraction'
7 import { onlyWifiLoadImg } from '../../utils/lazyloadImg'; 7 import { onlyWifiLoadImg } from '../../utils/lazyloadImg';
8 import { persistentStorage, hasClicked } from '../../utils/persistentStorage'; 8 import { persistentStorage, hasClicked } from '../../utils/persistentStorage';
  9 +import { InfomationCardClick } from '../../utils/infomationCardClick'
9 10
10 const TAG = 'Card20Component'; 11 const TAG = 'Card20Component';
11 12
@@ -14,6 +15,9 @@ const TAG = 'Card20Component'; @@ -14,6 +15,9 @@ const TAG = 'Card20Component';
14 */ 15 */
15 @Component 16 @Component
16 export struct Card20Component { 17 export struct Card20Component {
  18 + @ObjectLink compDTO: CompDTO
  19 + @State pageId: string = '';
  20 + @State pageName: string = '';
17 @State contentDTO: ContentDTO = new ContentDTO(); 21 @State contentDTO: ContentDTO = new ContentDTO();
18 @State clicked: boolean = false; 22 @State clicked: boolean = false;
19 @State titleMarked: boolean = false; 23 @State titleMarked: boolean = false;
@@ -72,6 +76,7 @@ export struct Card20Component { @@ -72,6 +76,7 @@ export struct Card20Component {
72 bottom: $r('app.float.card_comp_pagePadding_tb') 76 bottom: $r('app.float.card_comp_pagePadding_tb')
73 }) 77 })
74 .onClick((event: ClickEvent) => { 78 .onClick((event: ClickEvent) => {
  79 + InfomationCardClick.track(this.compDTO, this.contentDTO, this.pageId, this.pageName)
75 this.clicked = true; 80 this.clicked = true;
76 persistentStorage(this.contentDTO.objectId); 81 persistentStorage(this.contentDTO.objectId);
77 ProcessUtils.processPage(this.contentDTO) 82 ProcessUtils.processPage(this.contentDTO)
@@ -98,7 +103,7 @@ struct createImg { @@ -98,7 +103,7 @@ struct createImg {
98 103
99 build() { 104 build() {
100 GridRow() { 105 GridRow() {
101 - if (this.contentDTO.fullColumnImgUrls[0].landscape === 1) { 106 + if (this.contentDTO.fullColumnImgUrls[0].landscape === 1 || this.contentDTO.fullColumnImgUrls[0].weight > this.contentDTO.fullColumnImgUrls[0].height) {
102 // 横屏 107 // 横屏
103 GridCol({ 108 GridCol({
104 span: { xs: 12 } 109 span: { xs: 12 }
1 -import { ContentDTO } from 'wdBean'; 1 +import { ContentDTO, CompDTO } from 'wdBean';
2 import { CommonConstants, CompStyle } from 'wdConstant'; 2 import { CommonConstants, CompStyle } from 'wdConstant';
3 import { ProcessUtils } from 'wdRouter'; 3 import { ProcessUtils } from 'wdRouter';
4 import { RmhTitle } from '../cardCommon/RmhTitle' 4 import { RmhTitle } from '../cardCommon/RmhTitle'
@@ -6,6 +6,7 @@ import { CardMediaInfo } from '../cardCommon/CardMediaInfo' @@ -6,6 +6,7 @@ import { CardMediaInfo } from '../cardCommon/CardMediaInfo'
6 import {CarderInteraction} from '../CarderInteraction' 6 import {CarderInteraction} from '../CarderInteraction'
7 import { onlyWifiLoadImg } from '../../utils/lazyloadImg'; 7 import { onlyWifiLoadImg } from '../../utils/lazyloadImg';
8 import { persistentStorage, hasClicked } from '../../utils/persistentStorage'; 8 import { persistentStorage, hasClicked } from '../../utils/persistentStorage';
  9 +import { InfomationCardClick } from '../../utils/infomationCardClick'
9 10
10 const TAG: string = 'Card6Component-Card13Component'; 11 const TAG: string = 'Card6Component-Card13Component';
11 12
@@ -14,6 +15,9 @@ const TAG: string = 'Card6Component-Card13Component'; @@ -14,6 +15,9 @@ const TAG: string = 'Card6Component-Card13Component';
14 */ 15 */
15 @Component 16 @Component
16 export struct Card21Component { 17 export struct Card21Component {
  18 + @ObjectLink compDTO: CompDTO
  19 + @State pageId: string = '';
  20 + @State pageName: string = '';
17 @State contentDTO: ContentDTO = new ContentDTO(); 21 @State contentDTO: ContentDTO = new ContentDTO();
18 @State loadImg: boolean = false; 22 @State loadImg: boolean = false;
19 @State clicked: boolean = false; 23 @State clicked: boolean = false;
@@ -80,6 +84,7 @@ export struct Card21Component { @@ -80,6 +84,7 @@ export struct Card21Component {
80 //TODO 底部的:分享、评论、点赞 功能;需要引用一个公共组件 84 //TODO 底部的:分享、评论、点赞 功能;需要引用一个公共组件
81 } 85 }
82 .onClick((event: ClickEvent) => { 86 .onClick((event: ClickEvent) => {
  87 + InfomationCardClick.track(this.compDTO, this.contentDTO, this.pageId, this.pageName)
83 this.clicked = true; 88 this.clicked = true;
84 persistentStorage(this.contentDTO.objectId); 89 persistentStorage(this.contentDTO.objectId);
85 ProcessUtils.processPage(this.contentDTO) 90 ProcessUtils.processPage(this.contentDTO)
@@ -6,8 +6,9 @@ import { CardMediaInfo } from '../cardCommon/CardMediaInfo'; @@ -6,8 +6,9 @@ import { CardMediaInfo } from '../cardCommon/CardMediaInfo';
6 import { CardSourceInfo } from '../cardCommon/CardSourceInfo'; 6 import { CardSourceInfo } from '../cardCommon/CardSourceInfo';
7 import { Notes } from './notes'; 7 import { Notes } from './notes';
8 import { onlyWifiLoadImg } from '../../utils/lazyloadImg'; 8 import { onlyWifiLoadImg } from '../../utils/lazyloadImg';
9 -  
10 import { persistentStorage, hasClicked } from '../../utils/persistentStorage'; 9 import { persistentStorage, hasClicked } from '../../utils/persistentStorage';
  10 +import { InfomationCardClick } from '../../utils/infomationCardClick';
  11 +
11 const TAG: string = 'Card2Component'; 12 const TAG: string = 'Card2Component';
12 13
13 /** 14 /**
@@ -19,6 +20,8 @@ const TAG: string = 'Card2Component'; @@ -19,6 +20,8 @@ const TAG: string = 'Card2Component';
19 */ 20 */
20 @Component 21 @Component
21 export struct Card2Component { 22 export struct Card2Component {
  23 + @State pageId: string = '';
  24 + @State pageName: string = '';
22 @State contentDTO: ContentDTO = new ContentDTO(); 25 @State contentDTO: ContentDTO = new ContentDTO();
23 @State loadImg: boolean = false; 26 @State loadImg: boolean = false;
24 @State clicked: boolean = false; 27 @State clicked: boolean = false;
@@ -110,6 +113,7 @@ export struct Card2Component { @@ -110,6 +113,7 @@ export struct Card2Component {
110 bottom: $r('app.float.card_comp_pagePadding_tb') 113 bottom: $r('app.float.card_comp_pagePadding_tb')
111 }) 114 })
112 .onClick((event: ClickEvent) => { 115 .onClick((event: ClickEvent) => {
  116 + InfomationCardClick.track(this.compDTO, this.contentDTO, this.pageId, this.pageName)
113 this.clicked = true; 117 this.clicked = true;
114 persistentStorage(this.contentDTO.objectId); 118 persistentStorage(this.contentDTO.objectId);
115 ProcessUtils.processPage(this.contentDTO) 119 ProcessUtils.processPage(this.contentDTO)
@@ -4,6 +4,8 @@ import { ProcessUtils } from 'wdRouter'; @@ -4,6 +4,8 @@ import { ProcessUtils } from 'wdRouter';
4 import { CardSourceInfo } from '../cardCommon/CardSourceInfo'; 4 import { CardSourceInfo } from '../cardCommon/CardSourceInfo';
5 import { Notes } from './notes'; 5 import { Notes } from './notes';
6 import { persistentStorage, hasClicked } from '../../utils/persistentStorage'; 6 import { persistentStorage, hasClicked } from '../../utils/persistentStorage';
  7 +import { InfomationCardClick } from '../../utils/infomationCardClick'
  8 +
7 9
8 /** 10 /**
9 * 卡片样式:"appStyle":"3" 11 * 卡片样式:"appStyle":"3"
@@ -11,6 +13,8 @@ import { persistentStorage, hasClicked } from '../../utils/persistentStorage'; @@ -11,6 +13,8 @@ import { persistentStorage, hasClicked } from '../../utils/persistentStorage';
11 */ 13 */
12 @Component 14 @Component
13 export struct Card3Component { 15 export struct Card3Component {
  16 + @State pageId: string = '';
  17 + @State pageName: string = '';
14 @State contentDTO: ContentDTO = new ContentDTO(); 18 @State contentDTO: ContentDTO = new ContentDTO();
15 @State clicked: boolean = false; 19 @State clicked: boolean = false;
16 @ObjectLink compDTO: CompDTO 20 @ObjectLink compDTO: CompDTO
@@ -71,6 +75,7 @@ export struct Card3Component { @@ -71,6 +75,7 @@ export struct Card3Component {
71 bottom: $r('app.float.card_comp_pagePadding_tb') 75 bottom: $r('app.float.card_comp_pagePadding_tb')
72 }) 76 })
73 .onClick((event: ClickEvent) => { 77 .onClick((event: ClickEvent) => {
  78 + InfomationCardClick.track(this.compDTO, this.contentDTO, this.pageId, this.pageName)
74 this.clicked = true; 79 this.clicked = true;
75 persistentStorage(this.contentDTO.objectId); 80 persistentStorage(this.contentDTO.objectId);
76 ProcessUtils.processPage(this.contentDTO) 81 ProcessUtils.processPage(this.contentDTO)
@@ -6,6 +6,8 @@ import { CardMediaInfo } from '../cardCommon/CardMediaInfo' @@ -6,6 +6,8 @@ import { CardMediaInfo } from '../cardCommon/CardMediaInfo'
6 import { onlyWifiLoadImg } from '../../utils/lazyloadImg'; 6 import { onlyWifiLoadImg } from '../../utils/lazyloadImg';
7 import { Notes } from './notes'; 7 import { Notes } from './notes';
8 import { persistentStorage, hasClicked } from '../../utils/persistentStorage'; 8 import { persistentStorage, hasClicked } from '../../utils/persistentStorage';
  9 +import { InfomationCardClick } from '../../utils/infomationCardClick'
  10 +
9 const TAG: string = 'Card4Component'; 11 const TAG: string = 'Card4Component';
10 12
11 /** 13 /**
@@ -17,6 +19,8 @@ const TAG: string = 'Card4Component'; @@ -17,6 +19,8 @@ const TAG: string = 'Card4Component';
17 */ 19 */
18 @Component 20 @Component
19 export struct Card4Component { 21 export struct Card4Component {
  22 + @State pageId: string = '';
  23 + @State pageName: string = '';
20 @State contentDTO: ContentDTO = new ContentDTO(); 24 @State contentDTO: ContentDTO = new ContentDTO();
21 @State loadImg: boolean = false; 25 @State loadImg: boolean = false;
22 @State clicked: boolean = false; 26 @State clicked: boolean = false;
@@ -106,6 +110,7 @@ export struct Card4Component { @@ -106,6 +110,7 @@ export struct Card4Component {
106 .justifyContent(FlexAlign.Start) 110 .justifyContent(FlexAlign.Start)
107 .alignItems(HorizontalAlign.Start) 111 .alignItems(HorizontalAlign.Start)
108 .onClick((event: ClickEvent) => { 112 .onClick((event: ClickEvent) => {
  113 + InfomationCardClick.track(this.compDTO, this.contentDTO, this.pageId, this.pageName)
109 this.clicked = true; 114 this.clicked = true;
110 persistentStorage(this.contentDTO.objectId); 115 persistentStorage(this.contentDTO.objectId);
111 ProcessUtils.processPage(this.contentDTO) 116 ProcessUtils.processPage(this.contentDTO)
@@ -4,6 +4,8 @@ import { ProcessUtils } from 'wdRouter'; @@ -4,6 +4,8 @@ import { ProcessUtils } from 'wdRouter';
4 import { onlyWifiLoadImg } from '../../utils/lazyloadImg'; 4 import { onlyWifiLoadImg } from '../../utils/lazyloadImg';
5 import { Notes } from './notes'; 5 import { Notes } from './notes';
6 import { persistentStorage, hasClicked } from '../../utils/persistentStorage'; 6 import { persistentStorage, hasClicked } from '../../utils/persistentStorage';
  7 +import { InfomationCardClick } from '../../utils/infomationCardClick'
  8 +
7 9
8 const TAG: string = 'Card5Component'; 10 const TAG: string = 'Card5Component';
9 11
@@ -12,7 +14,10 @@ const TAG: string = 'Card5Component'; @@ -12,7 +14,10 @@ const TAG: string = 'Card5Component';
12 */ 14 */
13 @Component 15 @Component
14 export struct Card5Component { 16 export struct Card5Component {
  17 + @State pageId: string = '';
  18 + @State pageName: string = '';
15 @State contentDTO: ContentDTO = new ContentDTO(); 19 @State contentDTO: ContentDTO = new ContentDTO();
  20 + @ObjectLink compDTO: CompDTO
16 @Prop titleShowPolicy: number | string 21 @Prop titleShowPolicy: number | string
17 @State loadImg: boolean = false; 22 @State loadImg: boolean = false;
18 @State clicked: boolean = false; 23 @State clicked: boolean = false;
@@ -96,6 +101,7 @@ export struct Card5Component { @@ -96,6 +101,7 @@ export struct Card5Component {
96 bottom: $r('app.float.card_comp_pagePadding_tb') 101 bottom: $r('app.float.card_comp_pagePadding_tb')
97 }) 102 })
98 .onClick((event: ClickEvent) => { 103 .onClick((event: ClickEvent) => {
  104 + InfomationCardClick.track(this.compDTO, this.contentDTO, this.pageId, this.pageName)
99 this.clicked = true; 105 this.clicked = true;
100 persistentStorage(this.contentDTO.objectId); 106 persistentStorage(this.contentDTO.objectId);
101 ProcessUtils.processPage(this.contentDTO) 107 ProcessUtils.processPage(this.contentDTO)
@@ -7,6 +7,7 @@ import { Notes } from './notes'; @@ -7,6 +7,7 @@ import { Notes } from './notes';
7 import { onlyWifiLoadImg } from '../../utils/lazyloadImg'; 7 import { onlyWifiLoadImg } from '../../utils/lazyloadImg';
8 import { Logger } from 'wdKit/Index'; 8 import { Logger } from 'wdKit/Index';
9 import { persistentStorage, hasClicked } from '../../utils/persistentStorage'; 9 import { persistentStorage, hasClicked } from '../../utils/persistentStorage';
  10 +import { InfomationCardClick } from '../../utils/infomationCardClick'
10 11
11 const TAG: string = 'Card6Component-Card13Component'; 12 const TAG: string = 'Card6Component-Card13Component';
12 13
@@ -15,6 +16,8 @@ const TAG: string = 'Card6Component-Card13Component'; @@ -15,6 +16,8 @@ const TAG: string = 'Card6Component-Card13Component';
15 */ 16 */
16 @Component 17 @Component
17 export struct Card6Component { 18 export struct Card6Component {
  19 + @State pageId: string = '';
  20 + @State pageName: string = '';
18 @State loadImg: boolean = false; 21 @State loadImg: boolean = false;
19 @State clicked: boolean = false; 22 @State clicked: boolean = false;
20 @State titleMarked: boolean = false; 23 @State titleMarked: boolean = false;
@@ -104,6 +107,7 @@ export struct Card6Component { @@ -104,6 +107,7 @@ export struct Card6Component {
104 } 107 }
105 } 108 }
106 .onClick((event: ClickEvent) => { 109 .onClick((event: ClickEvent) => {
  110 + InfomationCardClick.track(this.compDTO, this.contentDTO, this.pageId, this.pageName)
107 this.clicked = true; 111 this.clicked = true;
108 persistentStorage(this.contentDTO.objectId); 112 persistentStorage(this.contentDTO.objectId);
109 ProcessUtils.processPage(this.contentDTO) 113 ProcessUtils.processPage(this.contentDTO)
1 -import { ContentDTO, slideShows } from 'wdBean'; 1 +import { ContentDTO, slideShows, CompDTO } from 'wdBean';
2 import { CommonConstants } from 'wdConstant'; 2 import { CommonConstants } from 'wdConstant';
3 import { DateTimeUtils } from 'wdKit'; 3 import { DateTimeUtils } from 'wdKit';
4 import { ProcessUtils } from 'wdRouter'; 4 import { ProcessUtils } from 'wdRouter';
5 import { Notes } from './notes'; 5 import { Notes } from './notes';
6 import { onlyWifiLoadImg } from '../../utils/lazyloadImg'; 6 import { onlyWifiLoadImg } from '../../utils/lazyloadImg';
7 import { persistentStorage, hasClicked } from '../../utils/persistentStorage'; 7 import { persistentStorage, hasClicked } from '../../utils/persistentStorage';
  8 +import { InfomationCardClick } from '../../utils/infomationCardClick'
8 9
9 /** 10 /**
10 * 时间链卡--CompStyle: 09 11 * 时间链卡--CompStyle: 09
@@ -13,6 +14,9 @@ const TAG: string = 'Card9Component'; @@ -13,6 +14,9 @@ const TAG: string = 'Card9Component';
13 14
14 @Component 15 @Component
15 export struct Card9Component { 16 export struct Card9Component {
  17 + @ObjectLink compDTO: CompDTO
  18 + @State pageId: string = '';
  19 + @State pageName: string = '';
16 @State contentDTO: ContentDTO = new ContentDTO(); 20 @State contentDTO: ContentDTO = new ContentDTO();
17 // @State loadImg: boolean = true; 21 // @State loadImg: boolean = true;
18 @State clicked: boolean = false; 22 @State clicked: boolean = false;
@@ -22,6 +26,7 @@ export struct Card9Component { @@ -22,6 +26,7 @@ export struct Card9Component {
22 @State str03: string = ''; 26 @State str03: string = '';
23 27
24 async aboutToAppear(): Promise<void> { 28 async aboutToAppear(): Promise<void> {
  29 + console.log('Card9Component', JSON.stringify(this.contentDTO))
25 this.titleInit(); 30 this.titleInit();
26 // this.loadImg = await onlyWifiLoadImg(); 31 // this.loadImg = await onlyWifiLoadImg();
27 this.clicked = hasClicked(this.contentDTO.objectId) 32 this.clicked = hasClicked(this.contentDTO.objectId)
@@ -112,6 +117,7 @@ export struct Card9Component { @@ -112,6 +117,7 @@ export struct Card9Component {
112 .backgroundColor($r("app.color.white")) 117 .backgroundColor($r("app.color.white"))
113 .margin({ bottom: 8 }) 118 .margin({ bottom: 8 })
114 .onClick((event: ClickEvent) => { 119 .onClick((event: ClickEvent) => {
  120 + InfomationCardClick.track(this.compDTO, this.contentDTO, this.pageId, this.pageName)
115 this.clicked = true; 121 this.clicked = true;
116 persistentStorage(this.contentDTO.objectId); 122 persistentStorage(this.contentDTO.objectId);
117 ProcessUtils.processPage(this.contentDTO) 123 ProcessUtils.processPage(this.contentDTO)
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 */ 3 */
4 import { ContentDTO } from 'wdBean/Index'; 4 import { ContentDTO } from 'wdBean/Index';
5 5
6 -const TAG: string = 'Card9Component'; 6 +const TAG: string = 'More_Comp';
7 7
8 @Entry 8 @Entry
9 @Component 9 @Component
@@ -4,6 +4,8 @@ import { ProcessUtils } from 'wdRouter'; @@ -4,6 +4,8 @@ import { ProcessUtils } from 'wdRouter';
4 import { CardSourceInfo } from '../cardCommon/CardSourceInfo' 4 import { CardSourceInfo } from '../cardCommon/CardSourceInfo'
5 import { CardMediaInfo } from '../cardCommon/CardMediaInfo' 5 import { CardMediaInfo } from '../cardCommon/CardMediaInfo'
6 import { onlyWifiLoadImg } from '../../utils/lazyloadImg'; 6 import { onlyWifiLoadImg } from '../../utils/lazyloadImg';
  7 +import { InfomationCardClick } from '../../utils/infomationCardClick'
  8 +
7 const TAG: string = 'Card4Component'; 9 const TAG: string = 'Card4Component';
8 10
9 /** 11 /**
@@ -11,6 +13,9 @@ const TAG: string = 'Card4Component'; @@ -11,6 +13,9 @@ const TAG: string = 'Card4Component';
11 */ 13 */
12 @Component 14 @Component
13 export struct SearchContentComponent { 15 export struct SearchContentComponent {
  16 + @ObjectLink compDTO: CompDTO
  17 + @State pageId: string = '';
  18 + @State pageName: string = '';
14 @State contentDTO: ContentDTO = new ContentDTO(); 19 @State contentDTO: ContentDTO = new ContentDTO();
15 @State loadImg: boolean = false; 20 @State loadImg: boolean = false;
16 @State clicked: boolean = false; 21 @State clicked: boolean = false;
@@ -57,6 +62,7 @@ export struct SearchContentComponent { @@ -57,6 +62,7 @@ export struct SearchContentComponent {
57 .justifyContent(FlexAlign.Start) 62 .justifyContent(FlexAlign.Start)
58 .alignItems(HorizontalAlign.Start) 63 .alignItems(HorizontalAlign.Start)
59 .onClick((event: ClickEvent) => { 64 .onClick((event: ClickEvent) => {
  65 + InfomationCardClick.track(this.compDTO, this.contentDTO, this.pageId, this.pageName)
60 this.clicked = true; 66 this.clicked = true;
61 ProcessUtils.processPage(this.contentDTO) 67 ProcessUtils.processPage(this.contentDTO)
62 }) 68 })
1 -import { DateTimeUtils, EmitterEventId, EmitterUtils, LazyDataSource, StringUtils } from 'wdKit/Index'; 1 +import { DateTimeUtils, EmitterEventId, EmitterUtils, LazyDataSource,
  2 + PublicDialogManager,
  3 + StringUtils } from 'wdKit/Index';
2 import { commentItemModel, WDPublicUserType } from '../model/CommentModel'; 4 import { commentItemModel, WDPublicUserType } from '../model/CommentModel';
3 import commentViewModel from '../viewmodel/CommentViewModel'; 5 import commentViewModel from '../viewmodel/CommentViewModel';
4 import { CommentText } from './CommentText'; 6 import { CommentText } from './CommentText';
@@ -21,6 +23,7 @@ const testString = '因为读书的人\n是低着头向上看的人\n身处一 @@ -21,6 +23,7 @@ const testString = '因为读书的人\n是低着头向上看的人\n身处一
21 export struct CommentComponent { 23 export struct CommentComponent {
22 private onCloseClick = () => { 24 private onCloseClick = () => {
23 } 25 }
  26 + showTitleComponent: boolean = true
24 @Prop showCloseIcon?: boolean = false 27 @Prop showCloseIcon?: boolean = false
25 @State hasMore: boolean = true; 28 @State hasMore: boolean = true;
26 @State currentPage: number = 1; 29 @State currentPage: number = 1;
@@ -40,6 +43,9 @@ export struct CommentComponent { @@ -40,6 +43,9 @@ export struct CommentComponent {
40 @Prop @Watch("parentOnReachEnd") reachEndIncreament: number = 0 43 @Prop @Watch("parentOnReachEnd") reachEndIncreament: number = 0
41 reachEndLoadMoreFinish?: () => void 44 reachEndLoadMoreFinish?: () => void
42 45
  46 + // 是否在弹框中
  47 + @Provide inDialog: boolean = false
  48 +
43 // 在自定义组件即将析构销毁时将dialogControlle置空 49 // 在自定义组件即将析构销毁时将dialogControlle置空
44 aboutToDisappear() { 50 aboutToDisappear() {
45 this.dialogController = null // 将dialogController置空 51 this.dialogController = null // 将dialogController置空
@@ -163,7 +169,9 @@ export struct CommentComponent { @@ -163,7 +169,9 @@ export struct CommentComponent {
163 build() { 169 build() {
164 Column() { 170 Column() {
165 List({ scroller: this.listScroller }) { 171 List({ scroller: this.listScroller }) {
  172 + if (this.showTitleComponent) {
166 ListItemGroup({ header: this.titleHeader() }) 173 ListItemGroup({ header: this.titleHeader() })
  174 + }
167 175
168 if (!this.isComments) { 176 if (!this.isComments) {
169 EmptyComponent({ emptyType: 17 }) 177 EmptyComponent({ emptyType: 17 })
@@ -259,7 +267,7 @@ export struct CommentComponent { @@ -259,7 +267,7 @@ export struct CommentComponent {
259 this.publishCommentModel.totalCommentNumer = commentListModel.totalCommentNum + '' 267 this.publishCommentModel.totalCommentNumer = commentListModel.totalCommentNum + ''
260 } 268 }
261 269
262 - if (commentListModel.list.length === 0) { 270 + if (commentListModel.list.length === 0 && this.allDatas.totalCount() == 0) {
263 this.isComments = false 271 this.isComments = false
264 } 272 }
265 273
@@ -299,6 +307,8 @@ struct ChildCommentItem { @@ -299,6 +307,8 @@ struct ChildCommentItem {
299 @ObjectLink item: commentItemModel 307 @ObjectLink item: commentItemModel
300 @Consume contentDetailData: ContentDetailDTO 308 @Consume contentDetailData: ContentDetailDTO
301 309
  310 + @Consume inDialog: boolean
  311 +
302 build() { 312 build() {
303 Column() { 313 Column() {
304 Row() { 314 Row() {
@@ -406,7 +416,12 @@ struct ChildCommentItem { @@ -406,7 +416,12 @@ struct ChildCommentItem {
406 .margin({ left: 47 }) 416 .margin({ left: 47 })
407 .alignContent(Alignment.Center) 417 .alignContent(Alignment.Center)
408 .onClick(() => { 418 .onClick(() => {
409 - commentViewModel.jumpToAccountPage(this.item) 419 +
  420 + commentViewModel.jumpToAccountPage(this.item, () => {
  421 + if (this.inDialog) {
  422 + PublicDialogManager.shareInstance().closeLastDialog()
  423 + }
  424 + })
410 }) 425 })
411 } 426 }
412 427
@@ -514,6 +529,8 @@ struct commentHeaderView { @@ -514,6 +529,8 @@ struct commentHeaderView {
514 @Link dialogController: CustomDialogController | null 529 @Link dialogController: CustomDialogController | null
515 @ObjectLink item: commentItemModel 530 @ObjectLink item: commentItemModel
516 531
  532 + @Consume inDialog: boolean
  533 +
517 build() { 534 build() {
518 Column() { 535 Column() {
519 Row() { 536 Row() {
@@ -607,7 +624,12 @@ struct commentHeaderView { @@ -607,7 +624,12 @@ struct commentHeaderView {
607 .margin({ left: 8 }) 624 .margin({ left: 8 })
608 .alignContent(Alignment.Center) 625 .alignContent(Alignment.Center)
609 .onClick(() => { 626 .onClick(() => {
610 - commentViewModel.jumpToAccountPage(this.item) 627 +
  628 + commentViewModel.jumpToAccountPage(this.item, () => {
  629 + if (this.inDialog) {
  630 + PublicDialogManager.shareInstance().closeLastDialog()
  631 + }
  632 + })
611 }) 633 })
612 } 634 }
613 635
@@ -640,6 +662,8 @@ struct commentFooterView { @@ -640,6 +662,8 @@ struct commentFooterView {
640 @Link dialogController: CustomDialogController | null 662 @Link dialogController: CustomDialogController | null
641 @ObjectLink item: commentItemModel 663 @ObjectLink item: commentItemModel
642 664
  665 + @Consume inDialog: boolean
  666 +
643 build() { 667 build() {
644 Row() { 668 Row() {
645 669
@@ -710,6 +734,9 @@ struct commentFooterView { @@ -710,6 +734,9 @@ struct commentFooterView {
710 // 未登录,跳转登录 734 // 未登录,跳转登录
711 const user_id = HttpUtils.getUserId() 735 const user_id = HttpUtils.getUserId()
712 if (!user_id) { 736 if (!user_id) {
  737 + if (this.inDialog) {
  738 + PublicDialogManager.shareInstance().closeLastDialog()
  739 + }
713 WDRouterRule.jumpWithPage(WDRouterPage.loginPage) 740 WDRouterRule.jumpWithPage(WDRouterPage.loginPage)
714 return 741 return
715 } 742 }
1 import { ContentDetailDTO, PageInfoDTO } from 'wdBean/Index' 1 import { ContentDetailDTO, PageInfoDTO } from 'wdBean/Index'
  2 +import { PublicDialogManager } from 'wdKit/Index'
  3 +import { TrackConstants } from 'wdTracking/Index'
2 import { OperRowListView } from '../../view/OperRowListView' 4 import { OperRowListView } from '../../view/OperRowListView'
3 import { publishCommentModel } from '../model/PublishCommentModel' 5 import { publishCommentModel } from '../model/PublishCommentModel'
4 import { CommentComponent } from './CommentComponent' 6 import { CommentComponent } from './CommentComponent'
5 7
6 /// 评论列表弹框 8 /// 评论列表弹框
  9 +@Component
  10 +export struct CommentListDialogView {
  11 + @Link @Watch('showCommentListChange') showCommentList: boolean
  12 + @Link contentDetailData: ContentDetailDTO // 详情页传
  13 + @Link pageInfo: PageInfoDTO // 专题页传
  14 + onClose?: () => void
  15 +
  16 + // @Consume pageId: TrackConstants.PageName
  17 + // @Consume pageName: TrackConstants.PageName
  18 +
  19 + private dialogController: CustomDialogController = new CustomDialogController({
  20 + builder: CommentListDialog({
  21 + contentDetailData: this.contentDetailData,
  22 + pageInfo: this.pageInfo,
  23 + onClose: this.onClose
  24 + }),
  25 + autoCancel: false,
  26 + customStyle: true,
  27 + alignment: DialogAlignment.Bottom,
  28 + })
  29 +
  30 + showCommentListChange(val: boolean) {
  31 + if (this.showCommentList) {
  32 + PublicDialogManager.shareInstance().openDialog(this.dialogController, this.closeAction.bind(this))
  33 + } else {
  34 + PublicDialogManager.shareInstance().closeDialog(this.dialogController)
  35 + }
  36 + }
  37 +
  38 + closeAction() {
  39 + this.showCommentList = false
  40 + }
  41 +
  42 + build() {
  43 + }
  44 +}
  45 +
7 @CustomDialog 46 @CustomDialog
8 -export struct CommentListDialog { 47 +struct CommentListDialog {
9 48
10 /// 内部使用 49 /// 内部使用
11 @State private publishCommentModel: publishCommentModel = new publishCommentModel() 50 @State private publishCommentModel: publishCommentModel = new publishCommentModel()
@@ -15,12 +54,12 @@ export struct CommentListDialog { @@ -15,12 +54,12 @@ export struct CommentListDialog {
15 @State windowHeight: number = AppStorage.get<number>('windowHeight') || 0 54 @State windowHeight: number = AppStorage.get<number>('windowHeight') || 0
16 55
17 /// 外部初始化 56 /// 外部初始化
18 - @Consume contentDetailData: ContentDetailDTO // 详情页传  
19 - @Consume pageInfo: PageInfoDTO // 专题页传 57 + @Link contentDetailData: ContentDetailDTO // 详情页传
  58 + @Link pageInfo: PageInfoDTO // 专题页传
20 onClose?: () => void 59 onClose?: () => void
21 60
22 aboutToAppear(): void { 61 aboutToAppear(): void {
23 - if (this.contentDetailData) { 62 + if (this.contentDetailData.newsId) {
24 if (this.contentDetailData?.openComment) { 63 if (this.contentDetailData?.openComment) {
25 this.publishCommentModel.targetId = String(this.contentDetailData?.newsId || '') 64 this.publishCommentModel.targetId = String(this.contentDetailData?.newsId || '')
26 this.publishCommentModel.targetRelId = String(this.contentDetailData?.reLInfo?.relId || '') 65 this.publishCommentModel.targetRelId = String(this.contentDetailData?.reLInfo?.relId || '')
@@ -33,40 +72,76 @@ export struct CommentListDialog { @@ -33,40 +72,76 @@ export struct CommentListDialog {
33 72
34 this.operationButtonList.push('comment') 73 this.operationButtonList.push('comment')
35 } 74 }
  75 + if (this.contentDetailData?.openLikes && this.contentDetailData?.likesStyle != 4) {
  76 + this.operationButtonList.push('like')
  77 + }
36 this.operationButtonList.push('collect') 78 this.operationButtonList.push('collect')
  79 +
37 this.operationButtonList.push('share') 80 this.operationButtonList.push('share')
38 } 81 }
39 82
40 if (this.pageInfo) { 83 if (this.pageInfo) {
  84 + //TODO: 专题的逻辑判断
  85 +
41 } 86 }
42 } 87 }
43 88
44 build() { 89 build() {
45 Column() { 90 Column() {
  91 + this.titleHeaderView()
  92 +
46 CommentComponent({ 93 CommentComponent({
47 publishCommentModel: this.publishCommentModel, 94 publishCommentModel: this.publishCommentModel,
48 - showCloseIcon: true,  
49 fixedHeightMode: true, 95 fixedHeightMode: true,
50 - onCloseClick: () => {  
51 - this.controller!.close()  
52 - if (this.onClose) {  
53 - this.onClose()  
54 - }  
55 - } 96 + inDialog: true,
  97 + showTitleComponent: false
56 }).layoutWeight(1) 98 }).layoutWeight(1)
57 99
58 OperRowListView({ 100 OperRowListView({
59 - componentType: 1, 101 + componentType: 4,
60 pageComponentType: 8, 102 pageComponentType: 8,
61 showBackIcon: false, 103 showBackIcon: false,
62 operationButtonList: this.operationButtonList, 104 operationButtonList: this.operationButtonList,
63 contentDetailData: this.contentDetailData, 105 contentDetailData: this.contentDetailData,
64 publishCommentModel: this.publishCommentModel, 106 publishCommentModel: this.publishCommentModel,
65 showCommentIcon: true, 107 showCommentIcon: true,
  108 + styleType: 1,
  109 + inDialog: true,
  110 + dialogBeforeJumpOtherPageAction: () => {
  111 + PublicDialogManager.shareInstance().closeLastDialog()
  112 + }
66 }) 113 })
67 } 114 }
68 .height(this.windowHeight - this.windowWidth * 9 / 16 + 'px') 115 .height(this.windowHeight - this.windowWidth * 9 / 16 + 'px')
69 - .zIndex(1000)  
70 .backgroundColor(Color.White) 116 .backgroundColor(Color.White)
71 } 117 }
  118 +
  119 + @Builder titleHeaderView() {
  120 + Row() {
  121 + Row() {
  122 + Image($r('app.media.redLine'))
  123 + .height(16)
  124 + .width(3)
  125 + Text('全部评论')
  126 + .fontSize(18)// .fontColor('#222222')
  127 + .fontColor($r('app.color.color_222222'))
  128 + .fontWeight(FontWeight.Medium)
  129 + .margin({ left: 5 })
  130 + }
  131 + .margin({ left: 16 })
  132 +
  133 + Image($r('app.media.close_button'))
  134 + .height(16)
  135 + .width(16)
  136 + .margin({ right: 16 })// .visibility(this.showCloseIcon ? Visibility.Visible : Visibility.Hidden)
  137 + .onClick(() => {
  138 + if (this.onClose) {
  139 + this.onClose()
  140 + }
  141 + })
  142 + }
  143 + .height(44)
  144 + .width('100%')
  145 + .justifyContent(FlexAlign.SpaceBetween)
  146 + }
72 } 147 }
@@ -483,7 +483,7 @@ class CommentViewModel { @@ -483,7 +483,7 @@ class CommentViewModel {
483 return false 483 return false
484 } 484 }
485 485
486 - jumpToAccountPage(commentItem: commentItemModel) { 486 + jumpToAccountPage(commentItem: commentItemModel, beforeJump: () => void = () => {}) {
487 let url = HttpUrlUtils.getOtherUserDetailDataUrl() 487 let url = HttpUrlUtils.getOtherUserDetailDataUrl()
488 let item : Record<string, string >= {} 488 let item : Record<string, string >= {}
489 489
@@ -504,6 +504,7 @@ class CommentViewModel { @@ -504,6 +504,7 @@ class CommentViewModel {
504 return 504 return
505 } 505 }
506 506
  507 + beforeJump()
507 if (result.data.userType === "1") { // 普通用户 508 if (result.data.userType === "1") { // 普通用户
508 let params: Record<string, string> = {'userId': result.data.userId}; 509 let params: Record<string, string> = {'userId': result.data.userId};
509 WDRouterRule.jumpWithPage(WDRouterPage.otherNormalUserHomePagePage,params) 510 WDRouterRule.jumpWithPage(WDRouterPage.otherNormalUserHomePagePage,params)
@@ -7,6 +7,7 @@ import { EmptyComponent } from '../view/EmptyComponent'; @@ -7,6 +7,7 @@ import { EmptyComponent } from '../view/EmptyComponent';
7 import { CardMediaInfo } from '../cardCommon/CardMediaInfo'; 7 import { CardMediaInfo } from '../cardCommon/CardMediaInfo';
8 import { onlyWifiLoadImg } from '../../utils/lazyloadImg'; 8 import { onlyWifiLoadImg } from '../../utils/lazyloadImg';
9 import { Notes } from '../cardview/notes'; 9 import { Notes } from '../cardview/notes';
  10 +import { InfomationCardClick } from '../../utils/infomationCardClick'
10 11
11 const TAG = 'Zh_Carousel_Layout-01'; 12 const TAG = 'Zh_Carousel_Layout-01';
12 13
@@ -41,6 +42,8 @@ class MyDataSource implements IDataSource { @@ -41,6 +42,8 @@ class MyDataSource implements IDataSource {
41 42
42 @Component 43 @Component
43 export struct ZhCarouselLayout01 { 44 export struct ZhCarouselLayout01 {
  45 + @State pageId: string = '';
  46 + @State pageName: string = '';
44 @StorageLink('currentBreakpoint') @Watch('watchCurrentBreakpoint') currentBreakpoint: string = 47 @StorageLink('currentBreakpoint') @Watch('watchCurrentBreakpoint') currentBreakpoint: string =
45 BreakpointConstants.BREAKPOINT_XS; 48 BreakpointConstants.BREAKPOINT_XS;
46 @State compDTO: CompDTO = {} as CompDTO 49 @State compDTO: CompDTO = {} as CompDTO
@@ -149,6 +152,7 @@ export struct ZhCarouselLayout01 { @@ -149,6 +152,7 @@ export struct ZhCarouselLayout01 {
149 bottom: $r('app.float.card_comp_pagePadding_tb') 152 bottom: $r('app.float.card_comp_pagePadding_tb')
150 }) 153 })
151 .onClick((event: ClickEvent) => { 154 .onClick((event: ClickEvent) => {
  155 + InfomationCardClick.track(this.compDTO, this.compDTO.operDataList[this.swiperIndex], this.pageId, this.pageName)
152 Logger.info(TAG, `ZhCarouselLayout01 onClick event index: ${this.swiperIndex}`); 156 Logger.info(TAG, `ZhCarouselLayout01 onClick event index: ${this.swiperIndex}`);
153 ProcessUtils.processPage(this.compDTO.operDataList[this.swiperIndex]) 157 ProcessUtils.processPage(this.compDTO.operDataList[this.swiperIndex])
154 }) 158 })
@@ -196,7 +200,7 @@ struct CarouselLayout01CardView { @@ -196,7 +200,7 @@ struct CarouselLayout01CardView {
196 Column() { 200 Column() {
197 // 这里用于展示轮播图右上角信息,这里只对直播类型的展示 201 // 这里用于展示轮播图右上角信息,这里只对直播类型的展示
198 if (this.item.objectType === '2' || this.item.objectType === '4') { 202 if (this.item.objectType === '2' || this.item.objectType === '4') {
199 - CardMediaInfo({ contentDTO: this.item }) 203 + CardMediaInfo({ contentDTO: this.item,livePeopleNum:false })
200 .width(CommonConstants.FULL_PARENT) 204 .width(CommonConstants.FULL_PARENT)
201 } 205 }
202 Blank() 206 Blank()
@@ -4,6 +4,7 @@ import { Logger } from 'wdKit/Index'; @@ -4,6 +4,7 @@ import { Logger } from 'wdKit/Index';
4 import { ProcessUtils } from 'wdRouter'; 4 import { ProcessUtils } from 'wdRouter';
5 import PageViewModel from '../../viewmodel/PageViewModel'; 5 import PageViewModel from '../../viewmodel/PageViewModel';
6 import { onlyWifiLoadImg } from '../../utils/lazyloadImg'; 6 import { onlyWifiLoadImg } from '../../utils/lazyloadImg';
  7 +import { InfomationCardClick } from '../../utils/infomationCardClick'
7 8
8 let listSize: number = 2; 9 let listSize: number = 2;
9 10
@@ -13,6 +14,8 @@ let listSize: number = 2; @@ -13,6 +14,8 @@ let listSize: number = 2;
13 */ 14 */
14 @Component 15 @Component
15 export struct ZhGridLayout02NewsContent { 16 export struct ZhGridLayout02NewsContent {
  17 + @State pageId: string = '';
  18 + @State pageName: string = '';
16 @ObjectLink compDTO: CompDTO 19 @ObjectLink compDTO: CompDTO
17 @State operDataList: ContentDTO[] = [] 20 @State operDataList: ContentDTO[] = []
18 @State loadImg: boolean = false; 21 @State loadImg: boolean = false;
@@ -42,7 +45,7 @@ export struct ZhGridLayout02NewsContent { @@ -42,7 +45,7 @@ export struct ZhGridLayout02NewsContent {
42 buildItemCard(item: ContentDTO, index: number) { 45 buildItemCard(item: ContentDTO, index: number) {
43 Column() { 46 Column() {
44 Stack({ alignContent: Alignment.BottomEnd }) { 47 Stack({ alignContent: Alignment.BottomEnd }) {
45 - Image(this.loadImg ? item.fullColumnImgUrls[0].url : '') 48 + Image(this.loadImg ? item == undefined ? '' : item.fullColumnImgUrls[0].url : '')
46 .backgroundColor(0xf5f5f5) 49 .backgroundColor(0xf5f5f5)
47 .width('100%') 50 .width('100%')
48 .height(95) 51 .height(95)
@@ -55,7 +58,12 @@ export struct ZhGridLayout02NewsContent { @@ -55,7 +58,12 @@ export struct ZhGridLayout02NewsContent {
55 .fontSize(12) 58 .fontSize(12)
56 .fontWeight(400) 59 .fontWeight(400)
57 .fontColor(Color.White) 60 .fontColor(Color.White)
58 - .textShadow({ radius: 2, color: 'rgba(0,0,0,0.3)', offsetX: 0, offsetY: 2 }) 61 + .textShadow({
  62 + radius: 2,
  63 + color: 'rgba(0,0,0,0.3)',
  64 + offsetX: 0,
  65 + offsetY: 2
  66 + })
59 .margin({ 67 .margin({
60 right: '5vp', 68 right: '5vp',
61 bottom: '5vp' 69 bottom: '5vp'
@@ -74,6 +82,7 @@ export struct ZhGridLayout02NewsContent { @@ -74,6 +82,7 @@ export struct ZhGridLayout02NewsContent {
74 } 82 }
75 .width('100%') 83 .width('100%')
76 .onClick(() => { 84 .onClick(() => {
  85 + InfomationCardClick.track(this.compDTO, item, this.pageId, this.pageName)
77 ProcessUtils.processPage(item) 86 ProcessUtils.processPage(item)
78 }) 87 })
79 } 88 }
@@ -4,6 +4,7 @@ import { Logger } from 'wdKit'; @@ -4,6 +4,7 @@ import { Logger } from 'wdKit';
4 import { WDRouterRule } from 'wdRouter'; 4 import { WDRouterRule } from 'wdRouter';
5 import { ProcessUtils } from 'wdRouter'; 5 import { ProcessUtils } from 'wdRouter';
6 import { onlyWifiLoadImg } from '../../utils/lazyloadImg'; 6 import { onlyWifiLoadImg } from '../../utils/lazyloadImg';
  7 +import { InfomationCardClick } from '../../utils/infomationCardClick'
7 8
8 const TAG = 'Zh_Grid_Layout-03'; 9 const TAG = 'Zh_Grid_Layout-03';
9 const FULL_PARENT: string = '100%'; 10 const FULL_PARENT: string = '100%';
@@ -18,6 +19,8 @@ let listSize: number = 4; @@ -18,6 +19,8 @@ let listSize: number = 4;
18 @Preview 19 @Preview
19 @Component 20 @Component
20 export struct ZhGridLayout03 { 21 export struct ZhGridLayout03 {
  22 + @State pageId: string = '';
  23 + @State pageName: string = '';
21 @State compDTO: CompDTO = {} as CompDTO 24 @State compDTO: CompDTO = {} as CompDTO
22 @State loadImg: boolean = false; 25 @State loadImg: boolean = false;
23 26
@@ -73,6 +76,7 @@ export struct ZhGridLayout03 { @@ -73,6 +76,7 @@ export struct ZhGridLayout03 {
73 } 76 }
74 .width('100%') 77 .width('100%')
75 .onClick((event: ClickEvent) => { 78 .onClick((event: ClickEvent) => {
  79 + InfomationCardClick.track(this.compDTO, item, this.pageId, this.pageName)
76 if (item.objectType === '11') { 80 if (item.objectType === '11') {
77 ProcessUtils.jumpChannelTab(item.objectId, item.pageId, item.newsTitle) 81 ProcessUtils.jumpChannelTab(item.objectId, item.pageId, item.newsTitle)
78 } else { 82 } else {
1 import { CompDTO, ContentDTO } from 'wdBean'; 1 import { CompDTO, ContentDTO } from 'wdBean';
2 import { CommonConstants } from 'wdConstant'; 2 import { CommonConstants } from 'wdConstant';
3 import { ProcessUtils } from 'wdRouter'; 3 import { ProcessUtils } from 'wdRouter';
  4 +import { InfomationCardClick } from '../../utils/infomationCardClick'
4 5
5 const TAG = 'Zh_Single_Column-04'; 6 const TAG = 'Zh_Single_Column-04';
6 7
@@ -10,6 +11,8 @@ const TAG = 'Zh_Single_Column-04'; @@ -10,6 +11,8 @@ const TAG = 'Zh_Single_Column-04';
10 */ 11 */
11 @Component 12 @Component
12 export struct ZhSingleColumn04 { 13 export struct ZhSingleColumn04 {
  14 + @State pageId: string = '';
  15 + @State pageName: string = '';
13 @State compDTO: CompDTO = {} as CompDTO 16 @State compDTO: CompDTO = {} as CompDTO
14 operDataList: ContentDTO[] = [ 17 operDataList: ContentDTO[] = [
15 // {newsTitle: "民检普法课堂:正当防卫是什么正当防卫是什么正当防卫是什么正当防卫是什么?", tagWord: 1} as ContentDTO, 18 // {newsTitle: "民检普法课堂:正当防卫是什么正当防卫是什么正当防卫是什么正当防卫是什么?", tagWord: 1} as ContentDTO,
@@ -83,6 +86,7 @@ export struct ZhSingleColumn04 { @@ -83,6 +86,7 @@ export struct ZhSingleColumn04 {
83 .backgroundImage($r('app.media.rmh_theme_bg')) 86 .backgroundImage($r('app.media.rmh_theme_bg'))
84 .backgroundImageSize({ width: CommonConstants.FULL_WIDTH, height: CommonConstants.FULL_WIDTH }) 87 .backgroundImageSize({ width: CommonConstants.FULL_WIDTH, height: CommonConstants.FULL_WIDTH })
85 .onClick(() => { 88 .onClick(() => {
  89 + InfomationCardClick.track(this.compDTO, item, this.pageId, this.pageName)
86 ProcessUtils.processPage(item) 90 ProcessUtils.processPage(item)
87 }) 91 })
88 } 92 }
1 import { CommonConstants } from 'wdConstant'; 1 import { CommonConstants } from 'wdConstant';
2 import { Action, CompDTO, Params } from 'wdBean'; 2 import { Action, CompDTO, Params } from 'wdBean';
3 import { WDRouterRule } from 'wdRouter'; 3 import { WDRouterRule } from 'wdRouter';
  4 +import { InfomationCardClick } from '../../utils/infomationCardClick'
4 5
5 const TAG = 'Zh_Single_Column-05'; 6 const TAG = 'Zh_Single_Column-05';
6 7
@@ -10,6 +11,8 @@ const TAG = 'Zh_Single_Column-05'; @@ -10,6 +11,8 @@ const TAG = 'Zh_Single_Column-05';
10 */ 11 */
11 @Component 12 @Component
12 export struct ZhSingleColumn05 { 13 export struct ZhSingleColumn05 {
  14 + @State pageId: string = '';
  15 + @State pageName: string = '';
13 @State compDTO: CompDTO = {} as CompDTO 16 @State compDTO: CompDTO = {} as CompDTO
14 17
15 build() { 18 build() {
@@ -29,6 +32,7 @@ export struct ZhSingleColumn05 { @@ -29,6 +32,7 @@ export struct ZhSingleColumn05 {
29 .justifyContent(FlexAlign.Center) 32 .justifyContent(FlexAlign.Center)
30 .borderRadius($r('app.float.button_border_radius')) 33 .borderRadius($r('app.float.button_border_radius'))
31 .onClick(() => { 34 .onClick(() => {
  35 + // InfomationCardClick.track(this.compDTO, this.contentDTO, this.pageId, this.pageName)
32 let taskAction: Action = { 36 let taskAction: Action = {
33 type: 'JUMP_H5_BY_WEB_VIEW', 37 type: 'JUMP_H5_BY_WEB_VIEW',
34 params: { 38 params: {
@@ -5,6 +5,8 @@ import { postInteractAccentionOperateParams } from 'wdBean'; @@ -5,6 +5,8 @@ import { postInteractAccentionOperateParams } from 'wdBean';
5 import { PageRepository } from '../../repository/PageRepository'; 5 import { PageRepository } from '../../repository/PageRepository';
6 import { CommonConstants } from 'wdConstant/Index'; 6 import { CommonConstants } from 'wdConstant/Index';
7 import { onlyWifiLoadImg } from '../../utils/lazyloadImg'; 7 import { onlyWifiLoadImg } from '../../utils/lazyloadImg';
  8 +import { Tracking, TrackingContent, TrackConstants, ParamType } from 'wdTracking';
  9 +import { TrackingUtils } from 'wdTracking/src/main/ets/common/TrackingUtils'
8 /** 10 /**
9 * 兴趣卡 11 * 兴趣卡
10 * Zh_Single_Column-09 12 * Zh_Single_Column-09
@@ -14,6 +16,8 @@ const TAG = 'Zh_Single_Column-09' @@ -14,6 +16,8 @@ const TAG = 'Zh_Single_Column-09'
14 @Entry 16 @Entry
15 @Component 17 @Component
16 export struct ZhSingleColumn09 { 18 export struct ZhSingleColumn09 {
  19 + @State pageId: string = '';
  20 + @State pageName: string = '';
17 @State compDTO: CompDTO = {} as CompDTO 21 @State compDTO: CompDTO = {} as CompDTO
18 @State activeIndexs: Array<number> = [] 22 @State activeIndexs: Array<number> = []
19 @State operDataList: ContentDTO[] = this.compDTO?.operDataList || [] 23 @State operDataList: ContentDTO[] = this.compDTO?.operDataList || []
@@ -25,6 +29,43 @@ export struct ZhSingleColumn09 { @@ -25,6 +29,43 @@ export struct ZhSingleColumn09 {
25 this.operDataList = this.shuffleArray(this.compDTO?.operDataList) 29 this.operDataList = this.shuffleArray(this.compDTO?.operDataList)
26 } 30 }
27 31
  32 + trackClick(type: 'close_interest_card_click' | 'interest_card_selecting_click') {
  33 + try {
  34 + const contentDTO = this.compDTO.operDataList[0];
  35 + const extParams: ParamType = {
  36 + 'value': type === 'close_interest_card_click' ? 'closeInterestCard' : 'selectInterestCard',
  37 + 'duration': 0,
  38 + 'action': 'detailPageShow',
  39 + 'shareChannel': '',
  40 + 'contentName': '兴趣选项卡',
  41 + 'contentType': this.compDTO.objectType || '',
  42 + 'contentId': this.compDTO.objectId,
  43 + // 'channelSourceId': this.compDTO.channelId,
  44 + // 'contentShowChannelId': this.compDTO.channelId,
  45 + 'regionName': 2, // 信息流:2
  46 + 'componentType': this.compDTO.compStyle,
  47 + 'sceneId': contentDTO.sceneId,
  48 + 'subSceneId': contentDTO.subSceneId,
  49 + 'cnsTraceId': contentDTO.cnsTraceId,
  50 + 'cardItemId': this.compDTO.cardItemId,
  51 + 'itemId': this.compDTO.itemId || contentDTO.itemId,
  52 + 'expIds': this.compDTO.expIds || contentDTO.expIds,
  53 + }
  54 + if (type === 'interest_card_selecting_click') {
  55 + // extParams['interestOptions'] = this.operDataList.map(item => {
  56 + // return item.
  57 + // })
  58 + }
  59 + let params = TrackingUtils.generateParams(extParams);
  60 + params['pageId'] = this.pageId;
  61 + params['pageName'] = this.pageName;
  62 + TrackingUtils.fillPositionWith(params)
  63 + Tracking.event(type, params)
  64 + } catch (e) {
  65 + console.log('Zh_Single_Column-09', JSON.stringify(e))
  66 + }
  67 + }
  68 +
28 getItemWidth(index: number) { 69 getItemWidth(index: number) {
29 if (index % 4 === 0 || index % 4 === 3) { 70 if (index % 4 === 0 || index % 4 === 3) {
30 return 80 71 return 80
@@ -73,6 +114,7 @@ export struct ZhSingleColumn09 { @@ -73,6 +114,7 @@ export struct ZhSingleColumn09 {
73 .margin({top: -10}) 114 .margin({top: -10})
74 .padding({top: 0, bottom: 0, left: 0, right: 0}) 115 .padding({top: 0, bottom: 0, left: 0, right: 0})
75 .onClick(() => { 116 .onClick(() => {
  117 + this.trackClick('interest_card_selecting_click')
76 if (this.activeIndexs.length > 0) { 118 if (this.activeIndexs.length > 0) {
77 this.selfClosed = true; 119 this.selfClosed = true;
78 } 120 }
@@ -142,6 +184,7 @@ export struct ZhSingleColumn09 { @@ -142,6 +184,7 @@ export struct ZhSingleColumn09 {
142 .width(14) 184 .width(14)
143 .height(14) 185 .height(14)
144 .onClick(() => { 186 .onClick(() => {
  187 + this.trackClick('close_interest_card_click')
145 this.selfClosed = true; 188 this.selfClosed = true;
146 }) 189 })
147 } 190 }
@@ -6,6 +6,7 @@ import { CommonConstants } from 'wdConstant/Index'; @@ -6,6 +6,7 @@ import { CommonConstants } from 'wdConstant/Index';
6 import { ProcessUtils } from 'wdRouter'; 6 import { ProcessUtils } from 'wdRouter';
7 import { HttpUtils } from 'wdNetwork/Index'; 7 import { HttpUtils } from 'wdNetwork/Index';
8 import { onlyWifiLoadImg } from '../../utils/lazyloadImg'; 8 import { onlyWifiLoadImg } from '../../utils/lazyloadImg';
  9 +import { InfomationCardClick } from '../../utils/infomationCardClick'
9 10
10 /** 11 /**
11 * 小视频横划卡 12 * 小视频横划卡
@@ -15,6 +16,8 @@ const TAG = 'Zh_Single_Row-02' @@ -15,6 +16,8 @@ const TAG = 'Zh_Single_Row-02'
15 16
16 @Component 17 @Component
17 export struct ZhSingleRow02 { 18 export struct ZhSingleRow02 {
  19 + @State pageId: string = '';
  20 + @State pageName: string = '';
18 @State compDTO: CompDTO = {} as CompDTO 21 @State compDTO: CompDTO = {} as CompDTO
19 22
20 build() { 23 build() {
@@ -26,7 +29,11 @@ export struct ZhSingleRow02 { @@ -26,7 +29,11 @@ export struct ZhSingleRow02 {
26 List() { 29 List() {
27 ForEach(this.compDTO.operDataList, (item: ContentDTO, index: number) => { 30 ForEach(this.compDTO.operDataList, (item: ContentDTO, index: number) => {
28 CreatorItem({ 31 CreatorItem({
29 - item 32 + item,
  33 + index,
  34 + compDTO: this.compDTO,
  35 + pageId: this.pageId,
  36 + pageName: this.pageName
30 }) 37 })
31 .margin({right: index === this.compDTO.operDataList.length - 1 ? $r('app.float.card_comp_pagePadding_lf') : 0}) 38 .margin({right: index === this.compDTO.operDataList.length - 1 ? $r('app.float.card_comp_pagePadding_lf') : 0})
32 }) 39 })
@@ -69,11 +76,6 @@ export struct ZhSingleRow02 { @@ -69,11 +76,6 @@ export struct ZhSingleRow02 {
69 Image($r("app.media.more")) 76 Image($r("app.media.more"))
70 .width(14) 77 .width(14)
71 .height(14) 78 .height(14)
72 - .onClick(() => {  
73 - // TODO 跳转的页面,定义的入参可能不合理。推荐id: 41  
74 - let params = {'index': "1"} as Record<string, string>  
75 - WDRouterRule.jumpWithPage(WDRouterPage.followListPage, params)  
76 - })  
77 } 79 }
78 .padding({ 80 .padding({
79 right: $r('app.float.card_comp_pagePadding_lf'), 81 right: $r('app.float.card_comp_pagePadding_lf'),
@@ -103,7 +105,11 @@ function textOverflowStyle(maxLine: number) { @@ -103,7 +105,11 @@ function textOverflowStyle(maxLine: number) {
103 105
104 @Component 106 @Component
105 struct CreatorItem { 107 struct CreatorItem {
  108 + @Prop pageId: string = '';
  109 + @Prop pageName: string = '';
  110 + @Prop compDTO: CompDTO
106 @Prop item: ContentDTO 111 @Prop item: ContentDTO
  112 + @Prop index: number
107 @State rmhIsAttention: number = 0 113 @State rmhIsAttention: number = 0
108 @State loadImg: boolean = false; 114 @State loadImg: boolean = false;
109 115
@@ -143,6 +149,7 @@ struct CreatorItem { @@ -143,6 +149,7 @@ struct CreatorItem {
143 .borderRadius($r('app.float.image_border_radius')) 149 .borderRadius($r('app.float.image_border_radius'))
144 } 150 }
145 .onClick((event: ClickEvent) => { 151 .onClick((event: ClickEvent) => {
  152 + InfomationCardClick.track(this.compDTO, this.item, this.pageId, this.pageName)
146 ProcessUtils.processPage(this.item) 153 ProcessUtils.processPage(this.item)
147 }) 154 })
148 } 155 }
@@ -9,6 +9,7 @@ import { LiveModel } from '../../viewmodel/LiveModel' @@ -9,6 +9,7 @@ import { LiveModel } from '../../viewmodel/LiveModel'
9 import { Logger, ToastUtils } from 'wdKit'; 9 import { Logger, ToastUtils } from 'wdKit';
10 import { onlyWifiLoadImg } from '../../utils/lazyloadImg'; 10 import { onlyWifiLoadImg } from '../../utils/lazyloadImg';
11 import { SpConstants } from 'wdConstant/Index' 11 import { SpConstants } from 'wdConstant/Index'
  12 +import { InfomationCardClick } from '../../utils/infomationCardClick';
12 13
13 /** 14 /**
14 * 直播预约卡 15 * 直播预约卡
@@ -25,6 +26,8 @@ interface reserveReqItem { @@ -25,6 +26,8 @@ interface reserveReqItem {
25 @Entry 26 @Entry
26 @Component 27 @Component
27 export struct ZhSingleRow03 { 28 export struct ZhSingleRow03 {
  29 + @State pageId: string = '';
  30 + @State pageName: string = '';
28 @State compDTO: CompDTO = {} as CompDTO 31 @State compDTO: CompDTO = {} as CompDTO
29 @State isEndEdge: boolean = false; 32 @State isEndEdge: boolean = false;
30 // @State reserveStatus: reserveItem[] = [] 33 // @State reserveStatus: reserveItem[] = []
@@ -197,6 +200,7 @@ export struct ZhSingleRow03 { @@ -197,6 +200,7 @@ export struct ZhSingleRow03 {
197 .backgroundColor(0xf9f9f9) 200 .backgroundColor(0xf9f9f9)
198 .margin({right: 8}) 201 .margin({right: 8})
199 .onClick(() => { 202 .onClick(() => {
  203 + InfomationCardClick.track(this.compDTO, item, this.pageId, this.pageName)
200 ProcessUtils.processPage(item) 204 ProcessUtils.processPage(item)
201 }) 205 })
202 } 206 }
@@ -2,6 +2,7 @@ import { CompDTO, ContentDTO } from 'wdBean'; @@ -2,6 +2,7 @@ import { CompDTO, ContentDTO } from 'wdBean';
2 import { CommonConstants } from 'wdConstant'; 2 import { CommonConstants } from 'wdConstant';
3 import { DateTimeUtils } from 'wdKit'; 3 import { DateTimeUtils } from 'wdKit';
4 import { ProcessUtils } from 'wdRouter'; 4 import { ProcessUtils } from 'wdRouter';
  5 +import { InfomationCardClick } from '../../utils/infomationCardClick';
5 6
6 /** 7 /**
7 * 本地精选卡 8 * 本地精选卡
@@ -10,6 +11,8 @@ import { ProcessUtils } from 'wdRouter'; @@ -10,6 +11,8 @@ import { ProcessUtils } from 'wdRouter';
10 11
11 @Component 12 @Component
12 export struct ZhSingleRow04 { 13 export struct ZhSingleRow04 {
  14 + @State pageId: string = '';
  15 + @State pageName: string = '';
13 @State compDTO: CompDTO = {} as CompDTO 16 @State compDTO: CompDTO = {} as CompDTO
14 17
15 build() { 18 build() {
@@ -71,6 +74,7 @@ export struct ZhSingleRow04 { @@ -71,6 +74,7 @@ export struct ZhSingleRow04 {
71 top: 6 74 top: 6
72 }) 75 })
73 .onClick(() => { 76 .onClick(() => {
  77 + InfomationCardClick.track(this.compDTO, item, this.pageId, this.pageName)
74 ProcessUtils.processPage(item) 78 ProcessUtils.processPage(item)
75 }) 79 })
76 } 80 }
@@ -4,6 +4,7 @@ import { postInteractAccentionOperateParams } from 'wdBean'; @@ -4,6 +4,7 @@ import { postInteractAccentionOperateParams } from 'wdBean';
4 import { PageRepository } from '../../repository/PageRepository'; 4 import { PageRepository } from '../../repository/PageRepository';
5 import { CommonConstants } from 'wdConstant/Index'; 5 import { CommonConstants } from 'wdConstant/Index';
6 import { HttpUtils } from 'wdNetwork/Index'; 6 import { HttpUtils } from 'wdNetwork/Index';
  7 +import { InfomationCardClick } from '../../utils/infomationCardClick';
7 8
8 /** 9 /**
9 * 人民号横划卡 10 * 人民号横划卡
@@ -14,6 +15,8 @@ const TAG = 'Zh_Single_Row-05' @@ -14,6 +15,8 @@ const TAG = 'Zh_Single_Row-05'
14 @Entry 15 @Entry
15 @Component 16 @Component
16 export struct ZhSingleRow05 { 17 export struct ZhSingleRow05 {
  18 + @State pageId: string = '';
  19 + @State pageName: string = '';
17 @State compDTO: CompDTO = { 20 @State compDTO: CompDTO = {
18 // objectTitle: '创作者推荐', 21 // objectTitle: '创作者推荐',
19 // operDataList: [ 22 // operDataList: [
@@ -83,8 +86,8 @@ export struct ZhSingleRow05 { @@ -83,8 +86,8 @@ export struct ZhSingleRow05 {
83 .height(14) 86 .height(14)
84 .onClick(() => { 87 .onClick(() => {
85 // TODO 跳转的页面,定义的入参可能不合理。推荐id: 41 88 // TODO 跳转的页面,定义的入参可能不合理。推荐id: 41
86 - let params = {'index': "1"} as Record<string, string>;  
87 - WDRouterRule.jumpWithPage(WDRouterPage.followListPage, params) 89 + // let params = {'index': "1"} as Record<string, string>;
  90 + // WDRouterRule.jumpWithPage(WDRouterPage.followListPage, params)
88 }) 91 })
89 } 92 }
90 .padding({ 93 .padding({
@@ -10,6 +10,7 @@ import { MultiPictureDetailViewModel } from '../../viewmodel/MultiPictureDetailV @@ -10,6 +10,7 @@ import { MultiPictureDetailViewModel } from '../../viewmodel/MultiPictureDetailV
10 import commentViewModel from '../../components/comment/viewmodel/CommentViewModel'; 10 import commentViewModel from '../../components/comment/viewmodel/CommentViewModel';
11 import { commentItemModel } from '../../components/comment/model/CommentModel' 11 import { commentItemModel } from '../../components/comment/model/CommentModel'
12 import { onlyWifiLoadImg } from '../../utils/lazyloadImg'; 12 import { onlyWifiLoadImg } from '../../utils/lazyloadImg';
  13 +import { InfomationCardClick } from '../../utils/infomationCardClick';
13 14
14 /** 15 /**
15 * 精选评论卡 16 * 精选评论卡
@@ -19,6 +20,8 @@ const TAG = 'Zh_Single_Row-06' @@ -19,6 +20,8 @@ const TAG = 'Zh_Single_Row-06'
19 @Entry 20 @Entry
20 @Component 21 @Component
21 export struct ZhSingleRow06 { 22 export struct ZhSingleRow06 {
  23 + @State pageId: string = '';
  24 + @State pageName: string = '';
22 @State compDTO: CompDTO = {} as CompDTO 25 @State compDTO: CompDTO = {} as CompDTO
23 @State newsStatusOfUser: batchLikeAndCollectResult = { 26 @State newsStatusOfUser: batchLikeAndCollectResult = {
24 likeStatus: '0' 27 likeStatus: '0'
@@ -143,8 +146,6 @@ export struct ZhSingleRow06 { @@ -143,8 +146,6 @@ export struct ZhSingleRow06 {
143 Text(Number(this.newsStatusOfUser?.likeStatus) == 1 ? '已赞' : '点赞') 146 Text(Number(this.newsStatusOfUser?.likeStatus) == 1 ? '已赞' : '点赞')
144 .fontSize(15) 147 .fontSize(15)
145 .fontColor(0x999999) 148 .fontColor(0x999999)
146 - .onClick(() => {  
147 - })  
148 } 149 }
149 .onClick(() => { 150 .onClick(() => {
150 this.toggleLikeStatus() 151 this.toggleLikeStatus()
@@ -160,6 +161,9 @@ export struct ZhSingleRow06 { @@ -160,6 +161,9 @@ export struct ZhSingleRow06 {
160 bottom: $r('app.float.card_comp_pagePadding_tb') 161 bottom: $r('app.float.card_comp_pagePadding_tb')
161 }) 162 })
162 .backgroundColor($r('app.color.white')) 163 .backgroundColor($r('app.color.white'))
  164 + .onClick(() => {
  165 + InfomationCardClick.track(this.compDTO, this.compDTO.operDataList[0], this.pageId, this.pageName)
  166 + })
163 } 167 }
164 168
165 @Builder 169 @Builder
1 import MinePageMoreFunctionModel from '../../viewmodel/MinePageMoreFunctionModel' 1 import MinePageMoreFunctionModel from '../../viewmodel/MinePageMoreFunctionModel'
2 import { WDRouterRule, WDRouterPage, ProcessUtils } from 'wdRouter' 2 import { WDRouterRule, WDRouterPage, ProcessUtils } from 'wdRouter'
3 import { Params } from 'wdBean'; 3 import { Params } from 'wdBean';
4 -import { ToastUtils } from 'wdKit/Index';  
5 import { TrackingButton, TrackConstants } from 'wdTracking/Index'; 4 import { TrackingButton, TrackConstants } from 'wdTracking/Index';
6 5
7 @Component 6 @Component
  1 +import { TrackConstants, TrackingButton } from 'wdTracking/Index'
1 import MinePageDatasModel from '../../../model/MinePageDatasModel' 2 import MinePageDatasModel from '../../../model/MinePageDatasModel'
2 import { onlyWifiLoadImg } from '../../../utils/lazyloadImg' 3 import { onlyWifiLoadImg } from '../../../utils/lazyloadImg'
3 import { AppointmentOperationRequestItem } from '../../../viewmodel/AppointmentOperationRequestItem' 4 import { AppointmentOperationRequestItem } from '../../../viewmodel/AppointmentOperationRequestItem'
@@ -38,25 +39,32 @@ export struct AppointmentListChildComponent { @@ -38,25 +39,32 @@ export struct AppointmentListChildComponent {
38 .interpolation(ImageInterpolation.High) 39 .interpolation(ImageInterpolation.High)
39 40
40 41
41 - if (this.item.relType === 1) { 42 + if (this.item.status == "wait") {
42 Row() { 43 Row() {
43 Row() { 44 Row() {
44 Image($r('app.media.reserve_icon')) 45 Image($r('app.media.reserve_icon'))
45 - .width('42lpx')  
46 - .height('35lpx') 46 + .width('27lpx')
  47 + .height('27lpx')
47 .objectFit(ImageFit.Auto) 48 .objectFit(ImageFit.Auto)
48 .interpolation(ImageInterpolation.High) 49 .interpolation(ImageInterpolation.High)
  50 + .margin({right:"6lpx"})
49 51
50 Text("预约") 52 Text("预约")
51 .fontWeight(400) 53 .fontWeight(400)
52 - .fontSize('21lpx')  
53 - .backgroundColor($r('app.color.color_4D000000')) 54 + .fontSize('23lpx')
  55 + .textShadow({
  56 + radius: 2,
  57 + color: `rgba(0,0,0,0.3)`,
  58 + offsetY:2,
  59 + offsetX:0
  60 + })
54 .fontColor($r('app.color.white')) 61 .fontColor($r('app.color.white'))
55 .lineHeight('31lpx') 62 .lineHeight('31lpx')
56 .layoutWeight(1) 63 .layoutWeight(1)
57 - .textAlign(TextAlign.Center) 64 + .textAlign(TextAlign.Start)
58 }.width('94lpx') 65 }.width('94lpx')
59 .margin({ bottom: '15lpx', right: '15lpx' }) 66 .margin({ bottom: '15lpx', right: '15lpx' })
  67 + .alignItems(VerticalAlign.Center)
60 }.width('100%') 68 }.width('100%')
61 .height('100%') 69 .height('100%')
62 .alignItems(VerticalAlign.Bottom) 70 .alignItems(VerticalAlign.Bottom)
@@ -78,7 +86,7 @@ export struct AppointmentListChildComponent { @@ -78,7 +86,7 @@ export struct AppointmentListChildComponent {
78 .width('100%') 86 .width('100%')
79 Row() { 87 Row() {
80 Row() { 88 Row() {
81 - if (this.item.relType === 2) { 89 + if (this.item.status == "end") {
82 Image($r('app.media.play_status_history_icon')) 90 Image($r('app.media.play_status_history_icon'))
83 .objectFit(ImageFit.Auto) 91 .objectFit(ImageFit.Auto)
84 .interpolation(ImageInterpolation.High) 92 .interpolation(ImageInterpolation.High)
@@ -88,6 +96,16 @@ export struct AppointmentListChildComponent { @@ -88,6 +96,16 @@ export struct AppointmentListChildComponent {
88 Text('已结束').fontColor($r('app.color.color_999999')) 96 Text('已结束').fontColor($r('app.color.color_999999'))
89 .fontWeight('500lpx') 97 .fontWeight('500lpx')
90 .fontSize('23lpx') 98 .fontSize('23lpx')
  99 + }else if(this.item.status == "running"){
  100 + Image($r('app.media.play_status_icon'))
  101 + .objectFit(ImageFit.Auto)
  102 + .interpolation(ImageInterpolation.High)
  103 + .width('38lpx')
  104 + .height('38lpx')
  105 + .margin({ right: '12lpx' })
  106 + Text('已开始').fontColor($r('app.color.color_999999'))
  107 + .fontWeight('500lpx')
  108 + .fontSize('23lpx')
91 } else { 109 } else {
92 Image($r('app.media.play_status_icon')) 110 Image($r('app.media.play_status_icon'))
93 .objectFit(ImageFit.Auto) 111 .objectFit(ImageFit.Auto)
@@ -118,7 +136,7 @@ export struct AppointmentListChildComponent { @@ -118,7 +136,7 @@ export struct AppointmentListChildComponent {
118 136
119 Blank() 137 Blank()
120 .layoutWeight(1) 138 .layoutWeight(1)
121 - if (this.item.relType === 1) { 139 + if (this.item.status === "wait") {
122 Text(this.item.isAppointment ? "已预约" : "预约") 140 Text(this.item.isAppointment ? "已预约" : "预约")
123 .fontWeight(400) 141 .fontWeight(400)
124 .fontSize('23lpx') 142 .fontSize('23lpx')
@@ -132,8 +150,19 @@ export struct AppointmentListChildComponent { @@ -132,8 +150,19 @@ export struct AppointmentListChildComponent {
132 .onClick(() => { 150 .onClick(() => {
133 this.dialogController.open() 151 this.dialogController.open()
134 }) 152 })
  153 + }else if(this.item.status == "running"){
  154 + Text("去观看" )
  155 + .fontWeight(400)
  156 + .fontSize('23lpx')
  157 + .backgroundColor($r('app.color.color_ED2800'))
  158 + .fontColor($r('app.color.white'))
  159 + .lineHeight('31lpx')
  160 + .textAlign(TextAlign.Center)
  161 + .width('100lpx')
  162 + .height('46lpx')
  163 + .borderRadius('6lpx')
135 } else { 164 } else {
136 - Text(this.item.relType === 2 ? "去观看" : "看回放") 165 + Text("看回放")
137 .fontWeight(400) 166 .fontWeight(400)
138 .fontSize('23lpx') 167 .fontSize('23lpx')
139 .backgroundColor($r('app.color.color_ED2800')) 168 .backgroundColor($r('app.color.color_ED2800'))
@@ -172,6 +201,10 @@ export struct AppointmentListChildComponent { @@ -172,6 +201,10 @@ export struct AppointmentListChildComponent {
172 if (value != null) { 201 if (value != null) {
173 if (value.code === 0 || value.code.toString() === "0") { 202 if (value.code === 0 || value.code.toString() === "0") {
174 this.item.isAppointment = !this.item.isAppointment 203 this.item.isAppointment = !this.item.isAppointment
  204 +
  205 + if(!this.item.isAppointment){
  206 + TrackingButton.click("mySavedLivePageUnSubscribe",TrackConstants.PageName.My_Saved_Live,TrackConstants.PageName.My_Saved_Live)
  207 + }
175 } 208 }
176 } 209 }
177 }) 210 })
@@ -7,17 +7,20 @@ import MinePageDatasModel from '../../../model/MinePageDatasModel'; @@ -7,17 +7,20 @@ import MinePageDatasModel from '../../../model/MinePageDatasModel';
7 import { EmptyComponent } from '../../view/EmptyComponent'; 7 import { EmptyComponent } from '../../view/EmptyComponent';
8 import { Action } from 'wdBean/Index'; 8 import { Action } from 'wdBean/Index';
9 import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'; 9 import { WDRouterPage, WDRouterRule } from 'wdRouter/Index';
  10 +import { CustomPullToRefresh } from '../../reusable/CustomPullToRefresh';
10 11
11 const TAG = "AppointmentListUI" 12 const TAG = "AppointmentListUI"
12 13
13 @Component 14 @Component
14 export struct AppointmentListUI { 15 export struct AppointmentListUI {
15 @State data: LazyDataSource<MineAppointmentItem> = new LazyDataSource(); 16 @State data: LazyDataSource<MineAppointmentItem> = new LazyDataSource();
  17 + @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
16 @State count: number = 0; 18 @State count: number = 0;
17 @State isLoading: boolean = false 19 @State isLoading: boolean = false
18 @State hasMore: boolean = true 20 @State hasMore: boolean = true
19 curPageNum: number = 1; 21 curPageNum: number = 1;
20 @State isGetRequest: boolean = false 22 @State isGetRequest: boolean = false
  23 + private scroller: Scroller = new Scroller();
21 24
22 aboutToAppear() { 25 aboutToAppear() {
23 this.getNewPageData() 26 this.getNewPageData()
@@ -26,7 +29,7 @@ export struct AppointmentListUI { @@ -26,7 +29,7 @@ export struct AppointmentListUI {
26 build() { 29 build() {
27 Column() { 30 Column() {
28 //标题栏目 31 //标题栏目
29 - CustomTitleUI({ titleName: "预约列表" }) 32 + CustomTitleUI({ titleName: "我的预约" })
30 if (this.count == 0) { 33 if (this.count == 0) {
31 if (this.isGetRequest == true) { 34 if (this.isGetRequest == true) {
32 EmptyComponent({ emptyType: 10 }) 35 EmptyComponent({ emptyType: 10 })
@@ -35,9 +38,40 @@ export struct AppointmentListUI { @@ -35,9 +38,40 @@ export struct AppointmentListUI {
35 } 38 }
36 39
37 } else { 40 } else {
38 - //刷新控件 TODO  
39 - //List  
40 - List({ space: '6lpx' }) { 41 +
  42 + CustomPullToRefresh({
  43 + alldata:this.data,
  44 + scroller:this.scroller,
  45 + customList:()=>{
  46 + this.ListLayout()
  47 + },
  48 + onRefresh:(resolve)=>{
  49 + this.curPageNum = 1;
  50 + this.hasMore = true
  51 + this.isGetRequest = false
  52 + this.data.clear()
  53 +
  54 + if (!this.isLoading){
  55 + this.getNewPageData()
  56 + if(resolve) resolve('刷新成功')
  57 + }
  58 + },
  59 + onLoadMore:(resolve)=> {
  60 + if (!this.isLoading) {
  61 + this.isLoading = true
  62 + this.getNewPageData()
  63 + }
  64 + }
  65 + })
  66 + }
  67 + }
  68 + .backgroundColor($r('app.color.color_F9F9F9'))
  69 + .height('100%')
  70 + .width('100%')
  71 + }
  72 +
  73 + @Builder ListLayout(){
  74 + List({ space:6,scroller: this.scroller }) {
41 LazyForEach(this.data, (item: MineAppointmentItem, index: number) => { 75 LazyForEach(this.data, (item: MineAppointmentItem, index: number) => {
42 ListItem() { 76 ListItem() {
43 AppointmentListChildComponent({ item: item }) 77 AppointmentListChildComponent({ item: item })
@@ -62,25 +96,14 @@ export struct AppointmentListUI { @@ -62,25 +96,14 @@ export struct AppointmentListUI {
62 if (!this.hasMore) { 96 if (!this.hasMore) {
63 ListItem() { 97 ListItem() {
64 ListHasNoMoreDataUI() 98 ListHasNoMoreDataUI()
65 - } 99 + }.padding({bottom:px2vp(this.bottomSafeHeight) + 20})
66 } 100 }
67 } 101 }
68 .cachedCount(4) 102 .cachedCount(4)
69 .scrollBar(BarState.Off) 103 .scrollBar(BarState.Off)
70 - .margin({ top: '23lpx', left: '23lpx', right: '23lpx' }) 104 + .edgeEffect(EdgeEffect.None)
  105 + .margin({ top: '23lpx', left: '23lpx', right: '23lpx'})
71 .layoutWeight(1) 106 .layoutWeight(1)
72 - .onReachEnd(() => {  
73 - console.log(TAG, "触底了");  
74 - if (!this.isLoading) {  
75 - //加载分页数据  
76 - this.getNewPageData()  
77 - }  
78 - })  
79 - }  
80 - }  
81 - .backgroundColor($r('app.color.color_F9F9F9'))  
82 - .height('100%')  
83 - .width('100%')  
84 } 107 }
85 108
86 getNewPageData() { 109 getNewPageData() {
@@ -2,6 +2,7 @@ import { SpConstants } from 'wdConstant/Index' @@ -2,6 +2,7 @@ import { SpConstants } from 'wdConstant/Index'
2 import { SPHelper, StringUtils, ToastUtils, UserDataLocal } from 'wdKit/Index' 2 import { SPHelper, StringUtils, ToastUtils, UserDataLocal } from 'wdKit/Index'
3 import { HttpUtils } from 'wdNetwork/Index' 3 import { HttpUtils } from 'wdNetwork/Index'
4 import { WDRouterRule, WDRouterPage } from 'wdRouter/Index' 4 import { WDRouterRule, WDRouterPage } from 'wdRouter/Index'
  5 +import { TrackConstants, TrackingContent } from 'wdTracking/Index'
5 import MinePageDatasModel from '../../../model/MinePageDatasModel' 6 import MinePageDatasModel from '../../../model/MinePageDatasModel'
6 import { FollowListDetailItem } from '../../../viewmodel/FollowListDetailItem' 7 import { FollowListDetailItem } from '../../../viewmodel/FollowListDetailItem'
7 import { FollowOperationRequestItem } from '../../../viewmodel/FollowOperationRequestItem' 8 import { FollowOperationRequestItem } from '../../../viewmodel/FollowOperationRequestItem'
@@ -266,6 +267,12 @@ export struct FollowChildComponent{ @@ -266,6 +267,12 @@ export struct FollowChildComponent{
266 this.data.status = this.data.status ==="0"?"1":"0" 267 this.data.status = this.data.status ==="0"?"1":"0"
267 268
268 UserDataLocal.setUserFollowOperation(this.data.creatorId+","+this.data.status) 269 UserDataLocal.setUserFollowOperation(this.data.creatorId+","+this.data.status)
  270 +
  271 + if(this.data.status == "1"){//关注
  272 + TrackingContent.follow(true,this.data.cnUserName,this.data.cnUserId,TrackConstants.PageName.My_Follow,TrackConstants.PageName.My_Follow)
  273 + }else {//取消关注
  274 + TrackingContent.follow(false,this.data.cnUserName,this.data.cnUserId,TrackConstants.PageName.My_Follow,TrackConstants.PageName.My_Follow)
  275 + }
269 } 276 }
270 } 277 }
271 }) 278 })
1 import { EmitterUtils, EmitterEventId, Logger, NetworkUtil } from 'wdKit/Index' 1 import { EmitterUtils, EmitterEventId, Logger, NetworkUtil } from 'wdKit/Index'
  2 +import { ParamType, TrackConstants, Tracking } from 'wdTracking/Index'
2 import MinePageDatasModel from '../../../model/MinePageDatasModel' 3 import MinePageDatasModel from '../../../model/MinePageDatasModel'
3 import { FollowListItem } from '../../../viewmodel/FollowListItem' 4 import { FollowListItem } from '../../../viewmodel/FollowListItem'
4 import { CustomTitleUI } from '../../reusable/CustomTitleUI' 5 import { CustomTitleUI } from '../../reusable/CustomTitleUI'
@@ -70,6 +71,7 @@ export struct FollowFirstTabsComponent{ @@ -70,6 +71,7 @@ export struct FollowFirstTabsComponent{
70 }.onClick(()=>{ 71 }.onClick(()=>{
71 this.currentIndex = index 72 this.currentIndex = index
72 this.controller.changeIndex(this.currentIndex) 73 this.controller.changeIndex(this.currentIndex)
  74 + trackTabFirstClick(item.directoryName)
73 }) 75 })
74 .height('100%') 76 .height('100%')
75 .margin({right:'9lpx'}) 77 .margin({right:'9lpx'})
@@ -103,6 +105,7 @@ export struct FollowFirstTabsComponent{ @@ -103,6 +105,7 @@ export struct FollowFirstTabsComponent{
103 .animationDuration(0) 105 .animationDuration(0)
104 .onChange((index: number) => { 106 .onChange((index: number) => {
105 this.currentIndex = index 107 this.currentIndex = index
  108 + trackTabFirstClick(this.data[index].directoryName)
106 }) 109 })
107 .width('100%') 110 .width('100%')
108 .layoutWeight(1) 111 .layoutWeight(1)
@@ -118,3 +121,12 @@ export struct FollowFirstTabsComponent{ @@ -118,3 +121,12 @@ export struct FollowFirstTabsComponent{
118 } 121 }
119 } 122 }
120 } 123 }
  124 +
  125 + function trackTabFirstClick(firstLevelTabName: string){
  126 + let params: ParamType = {}
  127 + params["firstLevelTabName"] = firstLevelTabName
  128 + params["pageName"] = TrackConstants.PageName.My_Follow
  129 + params["pageId"] = TrackConstants.PageName.My_Follow
  130 +
  131 + Tracking.event("my_follow_page_tab_click", params)
  132 + }
@@ -411,7 +411,9 @@ export struct PaperSingleColumn999CardView { @@ -411,7 +411,9 @@ export struct PaperSingleColumn999CardView {
411 result = `${minutes}分钟前`; 411 result = `${minutes}分钟前`;
412 } else if (hours < 24) { 412 } else if (hours < 24) {
413 result = `${hours}小时前`; 413 result = `${hours}小时前`;
414 - } else { 414 + } else if(hours > 24 && hours <48){
  415 + result = '1天前';
  416 + }else {
415 result = ''; 417 result = '';
416 } 418 }
417 419
@@ -483,11 +485,15 @@ export struct PaperSingleColumn999CardView { @@ -483,11 +485,15 @@ export struct PaperSingleColumn999CardView {
483 .fontSize(12) 485 .fontSize(12)
484 .fontColor('#B0B0B0') 486 .fontColor('#B0B0B0')
485 .margin({ left: 16 }) 487 .margin({ left: 16 })
  488 +
  489 + ///不显示时间或者不显示评论
  490 + if (this.getPublishTime().length > 0 || this.item.objectType != '2' && this.interactData && this.interactData.commentNum && Number(this.interactData.collectNum) > 0) {
486 Image($r('app.media.point')) 491 Image($r('app.media.point'))
487 .width(16) 492 .width(16)
488 .height(16) 493 .height(16)
489 .margin({ top: 10, bottom: 10 }) 494 .margin({ top: 10, bottom: 10 })
490 } 495 }
  496 + }
491 497
492 Text(this.getPublishTime()) 498 Text(this.getPublishTime())
493 .fontSize(12) 499 .fontSize(12)
@@ -497,7 +503,7 @@ export struct PaperSingleColumn999CardView { @@ -497,7 +503,7 @@ export struct PaperSingleColumn999CardView {
497 Text(this.interactData.commentNum + "评") 503 Text(this.interactData.commentNum + "评")
498 .fontSize(12) 504 .fontSize(12)
499 .fontColor('#B0B0B0') 505 .fontColor('#B0B0B0')
500 - .margin({ left: 6 }) 506 + .margin({ left: this.getPublishTime().length >0? 6:0 })
501 } 507 }
502 } 508 }
503 .justifyContent(FlexAlign.Start) 509 .justifyContent(FlexAlign.Start)
@@ -265,19 +265,24 @@ struct LiveMorePage { @@ -265,19 +265,24 @@ struct LiveMorePage {
265 .fontSize('12vp') 265 .fontSize('12vp')
266 .fontWeight(400) 266 .fontWeight(400)
267 .fontColor(Color.White) 267 .fontColor(Color.White)
  268 + .textShadow({ radius: 2, color: 'rgba(0,0,0,0.3)', offsetX: 0, offsetY: 2 })
268 .margin({ 269 .margin({
269 right: '5vp' 270 right: '5vp'
270 }) 271 })
271 - Divider()  
272 - .vertical(true)  
273 - .strokeWidth(1)  
274 - .height('12vp')  
275 - .margin({ top: 2, bottom: 2 })  
276 - .color(Color.White) 272 + // Divider()
  273 + // .vertical(true)
  274 + // .strokeWidth(1)
  275 + // .height('12vp')
  276 + // .margin({ top: 2, bottom: 2 })
  277 + // .color(Color.White)
  278 +
  279 + Image($r('app.media.icon_comp_line_live')).height('11vp').width('1.5vp')
  280 +
277 if (this.getLiveRoomNumber(item).length > 0) { 281 if (this.getLiveRoomNumber(item).length > 0) {
278 Text(this.getLiveRoomNumber(item)) 282 Text(this.getLiveRoomNumber(item))
279 .fontSize('12vp') 283 .fontSize('12vp')
280 .fontWeight(400) 284 .fontWeight(400)
  285 + .textShadow({ radius: 2, color: 'rgba(0,0,0,0.3)', offsetX: 0, offsetY: 2 })
281 .fontColor(Color.White) 286 .fontColor(Color.White)
282 .margin({ 287 .margin({
283 left: '5vp' 288 left: '5vp'
@@ -2,7 +2,7 @@ import { CommonConstants, ViewType } from 'wdConstant'; @@ -2,7 +2,7 @@ import { CommonConstants, ViewType } from 'wdConstant';
2 import { Logger } from 'wdKit'; 2 import { Logger } from 'wdKit';
3 import { EmptyComponent } from '../view/EmptyComponent'; 3 import { EmptyComponent } from '../view/EmptyComponent';
4 import PageModel from '../../viewmodel/PageModel'; 4 import PageModel from '../../viewmodel/PageModel';
5 -import { autoRefresh, listTouchEvent } from '../../utils/PullDownRefresh'; 5 +import { autoRefresh, onActionEnd, onActionStart, onActionUpdate } from '../../utils/PullDownRefresh';
6 import LoadMoreLayout from './LoadMoreLayout'; 6 import LoadMoreLayout from './LoadMoreLayout';
7 import { CompParser } from '../CompParser'; 7 import { CompParser } from '../CompParser';
8 import { CompDTO } from 'wdBean'; 8 import { CompDTO } from 'wdBean';
@@ -14,9 +14,6 @@ import PageNoMoreLayout from './PageNoMoreLayout'; @@ -14,9 +14,6 @@ import PageNoMoreLayout from './PageNoMoreLayout';
14 import { NoMoreBean } from './NoMoreBean'; 14 import { NoMoreBean } from './NoMoreBean';
15 import { RefreshLayoutBean } from '../refresh/RefreshLayoutBean'; 15 import { RefreshLayoutBean } from '../refresh/RefreshLayoutBean';
16 import RefreshLayout from '../refresh/RefreshLayout'; 16 import RefreshLayout from '../refresh/RefreshLayout';
17 -import json from '@ohos.util.json';  
18 -import { viewBlogInsightIntentShare, ActionMode } from '../../utils/InsightIntentShare'  
19 -import { common } from '@kit.AbilityKit';  
20 const TAG = 'PageComponent'; 17 const TAG = 'PageComponent';
21 18
22 @Component 19 @Component
@@ -31,6 +28,7 @@ export struct PageComponent { @@ -31,6 +28,7 @@ export struct PageComponent {
31 // 自动刷新通知 28 // 自动刷新通知
32 @Prop @Watch('onAutoRefresh') autoRefresh: number = 0 29 @Prop @Watch('onAutoRefresh') autoRefresh: number = 0
33 private listScroller: Scroller = new Scroller(); 30 private listScroller: Scroller = new Scroller();
  31 + private panOption: PanGestureOptions = new PanGestureOptions({ direction: PanDirection.Up | PanDirection.Down })
34 needload: boolean = true; 32 needload: boolean = true;
35 build() { 33 build() {
36 Column() { 34 Column() {
@@ -51,13 +49,26 @@ export struct PageComponent { @@ -51,13 +49,26 @@ export struct PageComponent {
51 } 49 }
52 .width(CommonConstants.FULL_PARENT) 50 .width(CommonConstants.FULL_PARENT)
53 .height(CommonConstants.FULL_PARENT) 51 .height(CommonConstants.FULL_PARENT)
54 - .onTouch((event: TouchEvent | undefined) => {  
55 - if (event) {  
56 - if (this.pageModel.viewType === ViewType.LOADED) {  
57 - listTouchEvent(this.pageModel, this.pageAdvModel, event);  
58 - }  
59 - } 52 + // .onTouch((event: TouchEvent | undefined) => {
  53 + // if (event) {
  54 + // if (this.pageModel.viewType === ViewType.LOADED) {
  55 + // listTouchEvent(this.pageModel, this.pageAdvModel, event);
  56 + // }
  57 + // }
  58 + // })
  59 + // 对接新的下拉刷新手势,替换touch事件
  60 + .parallelGesture(
  61 + PanGesture(this.panOption)
  62 + .onActionStart((event?: GestureEvent) => {
  63 + onActionStart(this.pageModel, this.pageAdvModel, event)
  64 + })
  65 + .onActionUpdate((event?: GestureEvent) => {
  66 + onActionUpdate(this.pageModel, this.pageAdvModel, event)
  67 + })
  68 + .onActionEnd(() => {
  69 + onActionEnd(this.pageModel, this.pageAdvModel)
60 }) 70 })
  71 + )
61 72
62 } 73 }
63 74
@@ -460,9 +460,19 @@ export struct TopNavigationComponent { @@ -460,9 +460,19 @@ export struct TopNavigationComponent {
460 } 460 }
461 461
462 /** 462 /**
  463 + * 判断是否当前页面处理逻辑,如消息通知,只需要切换到当前底导的处理,过滤掉非当前。
  464 + */
  465 + private isCurrentPage(): boolean {
  466 + return this._currentNavIndex === this.navIndex
  467 + }
  468 +
  469 + /**
463 * 频道id变化,即指定频道跳转场景 470 * 频道id变化,即指定频道跳转场景
464 */ 471 */
465 onAssignChannelChange() { 472 onAssignChannelChange() {
  473 + if (!this.isCurrentPage()) {
  474 + return
  475 + }
466 let channelId = this.assignChannel.channelId 476 let channelId = this.assignChannel.channelId
467 let index = -1 477 let index = -1
468 if (this._currentNavIndex === 0) { 478 if (this._currentNavIndex === 0) {
@@ -536,45 +546,45 @@ export struct TopNavigationComponent { @@ -536,45 +546,45 @@ export struct TopNavigationComponent {
536 return null 546 return null
537 } 547 }
538 548
539 - private getTextInfo(index: number): Record<string, number> {  
540 - let strJson = getInspectorByKey(index.toString())  
541 - try {  
542 - let obj: Record<string, string> = JSON.parse(strJson)  
543 - let rectInfo: number[][] = JSON.parse('[' + obj.$rect + ']')  
544 - return { 'left': px2vp(rectInfo[0][0]), 'width': px2vp(rectInfo[1][0] - rectInfo[0][0]) }  
545 - } catch (error) {  
546 - return { 'left': 0, 'width': 0 }  
547 - }  
548 - }  
549 -  
550 - private getCurrentIndicatorInfo(index: number, event: TabsAnimationEvent): Record<string, number> {  
551 - let nextIndex = index  
552 - if (index > 0 && event.currentOffset > 0) {  
553 - nextIndex--  
554 - } else if (index < 3 && event.currentOffset < 0) {  
555 - nextIndex++  
556 - }  
557 - let indexInfo = this.getTextInfo(index)  
558 - let nextIndexInfo = this.getTextInfo(nextIndex)  
559 - let swipeRatio = Math.abs(event.currentOffset / this.tabsWidth)  
560 - let currentIndex = swipeRatio > 0.5 ? nextIndex : index // 页面滑动超过一半,tabBar切换到下一页。  
561 - let currentLeft = indexInfo.left + (nextIndexInfo.left - indexInfo.left) * swipeRatio  
562 - let currentWidth = indexInfo.width + (nextIndexInfo.width - indexInfo.width) * swipeRatio  
563 - return { 'index': currentIndex, 'left': currentLeft, 'width': currentWidth }  
564 - }  
565 -  
566 - private startAnimateTo(duration: number, leftMargin: number, width: number) {  
567 - animateTo({  
568 - duration: duration, // 动画时长  
569 - curve: Curve.Linear, // 动画曲线  
570 - iterations: 1, // 播放次数  
571 - playMode: PlayMode.Normal, // 动画模式  
572 - onFinish: () => {  
573 - console.info('play end')  
574 - }  
575 - }, () => {  
576 - this.indicatorLeftMargin = leftMargin  
577 - this.indicatorWidth = width  
578 - })  
579 - } 549 + // private getTextInfo(index: number): Record<string, number> {
  550 + // let strJson = getInspectorByKey(index.toString())
  551 + // try {
  552 + // let obj: Record<string, string> = JSON.parse(strJson)
  553 + // let rectInfo: number[][] = JSON.parse('[' + obj.$rect + ']')
  554 + // return { 'left': px2vp(rectInfo[0][0]), 'width': px2vp(rectInfo[1][0] - rectInfo[0][0]) }
  555 + // } catch (error) {
  556 + // return { 'left': 0, 'width': 0 }
  557 + // }
  558 + // }
  559 + //
  560 + // private getCurrentIndicatorInfo(index: number, event: TabsAnimationEvent): Record<string, number> {
  561 + // let nextIndex = index
  562 + // if (index > 0 && event.currentOffset > 0) {
  563 + // nextIndex--
  564 + // } else if (index < 3 && event.currentOffset < 0) {
  565 + // nextIndex++
  566 + // }
  567 + // let indexInfo = this.getTextInfo(index)
  568 + // let nextIndexInfo = this.getTextInfo(nextIndex)
  569 + // let swipeRatio = Math.abs(event.currentOffset / this.tabsWidth)
  570 + // let currentIndex = swipeRatio > 0.5 ? nextIndex : index // 页面滑动超过一半,tabBar切换到下一页。
  571 + // let currentLeft = indexInfo.left + (nextIndexInfo.left - indexInfo.left) * swipeRatio
  572 + // let currentWidth = indexInfo.width + (nextIndexInfo.width - indexInfo.width) * swipeRatio
  573 + // return { 'index': currentIndex, 'left': currentLeft, 'width': currentWidth }
  574 + // }
  575 +
  576 + // private startAnimateTo(duration: number, leftMargin: number, width: number) {
  577 + // animateTo({
  578 + // duration: duration, // 动画时长
  579 + // curve: Curve.Linear, // 动画曲线
  580 + // iterations: 1, // 播放次数
  581 + // playMode: PlayMode.Normal, // 动画模式
  582 + // onFinish: () => {
  583 + // console.info('play end')
  584 + // }
  585 + // }, () => {
  586 + // this.indicatorLeftMargin = leftMargin
  587 + // this.indicatorWidth = width
  588 + // })
  589 + // }
580 } 590 }
@@ -72,6 +72,7 @@ export struct TopNavigationComponentNew { @@ -72,6 +72,7 @@ export struct TopNavigationComponentNew {
72 private tabsWidth: number = 0 72 private tabsWidth: number = 0
73 73
74 build() { 74 build() {
  75 + Column() {
75 // 频道分类list 76 // 频道分类list
76 RelativeContainer() { 77 RelativeContainer() {
77 this.tabBar() 78 this.tabBar()
@@ -135,6 +136,7 @@ export struct TopNavigationComponentNew { @@ -135,6 +136,7 @@ export struct TopNavigationComponentNew {
135 .width('100%') 136 .width('100%')
136 .height('100%') 137 .height('100%')
137 } 138 }
  139 + }
138 140
139 @Builder 141 @Builder
140 topBar() { 142 topBar() {
@@ -316,7 +318,7 @@ export struct TopNavigationComponentNew { @@ -316,7 +318,7 @@ export struct TopNavigationComponentNew {
316 bottom: 2, 318 bottom: 2,
317 }) 319 })
318 .id(`col_tabBar${index}`) 320 .id(`col_tabBar${index}`)
319 - .margin({ right: this.myChannelList.length === index + 1 ? 36 : 0 }) 321 + // .margin({ right: this.myChannelList.length === index + 1 ? 36 : 0 })
320 .onClick(() => { 322 .onClick(() => {
321 Logger.debug(TAG, `onClick, index: ${index}`); 323 Logger.debug(TAG, `onClick, index: ${index}`);
322 if (this.currentTopNavSelectedIndex === index) { 324 if (this.currentTopNavSelectedIndex === index) {
@@ -487,9 +489,19 @@ export struct TopNavigationComponentNew { @@ -487,9 +489,19 @@ export struct TopNavigationComponentNew {
487 } 489 }
488 490
489 /** 491 /**
  492 + * 判断是否当前页面处理逻辑,如消息通知,只需要切换到当前底导的处理,过滤掉非当前。
  493 + */
  494 + private isCurrentPage(): boolean {
  495 + return this._currentNavIndex === this.bottomNavIndex
  496 + }
  497 +
  498 + /**
490 * 频道id变化,即指定频道跳转场景 499 * 频道id变化,即指定频道跳转场景
491 */ 500 */
492 onAssignChannelChange() { 501 onAssignChannelChange() {
  502 + if (!this.isCurrentPage()) {
  503 + return
  504 + }
493 let channelId = this.assignChannel.channelId 505 let channelId = this.assignChannel.channelId
494 let index = -1 506 let index = -1
495 if (this._currentNavIndex === 0) { 507 if (this._currentNavIndex === 0) {
@@ -537,7 +549,7 @@ export struct TopNavigationComponentNew { @@ -537,7 +549,7 @@ export struct TopNavigationComponentNew {
537 private getChannelByMine(channelId: string) { 549 private getChannelByMine(channelId: string) {
538 for (let i = 0; i < this.myChannelList.length; i++) { 550 for (let i = 0; i < this.myChannelList.length; i++) {
539 let topNavDTO: TopNavDTO = this.myChannelList[i] 551 let topNavDTO: TopNavDTO = this.myChannelList[i]
540 - if (topNavDTO.channelId?.toString() === channelId) { 552 + if (topNavDTO?.channelId?.toString() === channelId) {
541 return i 553 return i
542 } 554 }
543 } 555 }
@@ -26,7 +26,6 @@ export struct CustomTitleUI { @@ -26,7 +26,6 @@ export struct CustomTitleUI {
26 } 26 }
27 27
28 Text(this.titleName) 28 Text(this.titleName)
29 - .height('42lpx')  
30 .maxLines(1) 29 .maxLines(1)
31 .id("title") 30 .id("title")
32 .fontSize('35lpx') 31 .fontSize('35lpx')
1 import { CommonConstants } from 'wdConstant' 1 import { CommonConstants } from 'wdConstant'
2 import { ContentDTO, CompDTO, Action, Params } from 'wdBean' 2 import { ContentDTO, CompDTO, Action, Params } from 'wdBean'
3 import { ProcessUtils, WDRouterRule, WDRouterPage } from 'wdRouter'; 3 import { ProcessUtils, WDRouterRule, WDRouterPage } from 'wdRouter';
  4 +import { InfomationCardClick } from '../../utils/infomationCardClick';
4 5
5 @Component 6 @Component
6 export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent { 7 export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent {
7 @State compDTO: CompDTO = {} as CompDTO 8 @State compDTO: CompDTO = {} as CompDTO
  9 + @State pageId: string = '';
  10 + @State pageName: string = '';
8 11
9 build() { 12 build() {
10 Column() { 13 Column() {
@@ -76,6 +79,7 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent { @@ -76,6 +79,7 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent {
76 .padding({ left: (index == 0) ? 16 : 0, right: (index == this.compDTO.operDataList.length - 1) ? 16 : 0 }) 79 .padding({ left: (index == 0) ? 16 : 0, right: (index == this.compDTO.operDataList.length - 1) ? 16 : 0 })
77 // .offset({x:16}) 80 // .offset({x:16})
78 .onClick(() => { 81 .onClick(() => {
  82 + InfomationCardClick.track(this.compDTO, item, this.pageId, this.pageName)
79 ProcessUtils.processPage(item) 83 ProcessUtils.processPage(item)
80 }) 84 })
81 }) 85 })
@@ -3,9 +3,12 @@ import { WDRouterRule } from 'wdRouter/Index' @@ -3,9 +3,12 @@ import { WDRouterRule } from 'wdRouter/Index'
3 import { Logger } from 'wdKit/Index' 3 import { Logger } from 'wdKit/Index'
4 import { ExtraDTO } from 'wdBean/src/main/ets/bean/component/extra/ExtraDTO' 4 import { ExtraDTO } from 'wdBean/src/main/ets/bean/component/extra/ExtraDTO'
5 import { LiveModel } from '../../viewmodel/LiveModel' 5 import { LiveModel } from '../../viewmodel/LiveModel'
  6 +import { InfomationCardClick } from '../../utils/infomationCardClick';
6 7
7 @Component 8 @Component
8 export struct HorizontalStrokeCardThreeTwoRadioForOneComponent { 9 export struct HorizontalStrokeCardThreeTwoRadioForOneComponent {
  10 + @State pageId: string = '';
  11 + @State pageName: string = '';
9 @State compDTO: CompDTO = {} as CompDTO 12 @State compDTO: CompDTO = {} as CompDTO
10 @State clicked: boolean = false; 13 @State clicked: boolean = false;
11 14
@@ -64,6 +67,7 @@ export struct HorizontalStrokeCardThreeTwoRadioForOneComponent { @@ -64,6 +67,7 @@ export struct HorizontalStrokeCardThreeTwoRadioForOneComponent {
64 .backgroundColor($r("app.color.white")) 67 .backgroundColor($r("app.color.white"))
65 .margin({ bottom: 8 }) 68 .margin({ bottom: 8 })
66 .onClick(() => { 69 .onClick(() => {
  70 + InfomationCardClick.track(this.compDTO, this.compDTO.operDataList[0], this.pageId, this.pageName)
67 this.clicked = true; 71 this.clicked = true;
68 this.gotoLive(this.compDTO?.operDataList[0]) 72 this.gotoLive(this.compDTO?.operDataList[0])
69 }) 73 })
@@ -9,10 +9,13 @@ import { LiveModel } from '../../viewmodel/LiveModel' @@ -9,10 +9,13 @@ import { LiveModel } from '../../viewmodel/LiveModel'
9 import { ContentConstants } from '../../constants/ContentConstants' 9 import { ContentConstants } from '../../constants/ContentConstants'
10 import { ProcessUtils } from 'wdRouter'; 10 import { ProcessUtils } from 'wdRouter';
11 import { onlyWifiLoadImg } from '../../utils/lazyloadImg'; 11 import { onlyWifiLoadImg } from '../../utils/lazyloadImg';
  12 +import { InfomationCardClick } from '../../utils/infomationCardClick';
12 13
13 14
14 @Component 15 @Component
15 export struct LiveHorizontalCardComponent { 16 export struct LiveHorizontalCardComponent {
  17 + @State pageId: string = '';
  18 + @State pageName: string = '';
16 @State compDTO: CompDTO = {} as CompDTO 19 @State compDTO: CompDTO = {} as CompDTO
17 @State loadImg: boolean = false; 20 @State loadImg: boolean = false;
18 21
@@ -78,6 +81,7 @@ export struct LiveHorizontalCardComponent { @@ -78,6 +81,7 @@ export struct LiveHorizontalCardComponent {
78 .borderRadius(4) 81 .borderRadius(4)
79 .objectFit(ImageFit.Cover) 82 .objectFit(ImageFit.Cover)
80 CardMediaInfo({ 83 CardMediaInfo({
  84 + livePeopleNum:false,
81 contentDTO: item 85 contentDTO: item
82 }) 86 })
83 } 87 }
@@ -95,6 +99,7 @@ export struct LiveHorizontalCardComponent { @@ -95,6 +99,7 @@ export struct LiveHorizontalCardComponent {
95 } 99 }
96 .padding({ left: (index == 0) ? 16 : 0, right: (index == this.compDTO.operDataList.length - 1) ? 16 : 0 }) 100 .padding({ left: (index == 0) ? 16 : 0, right: (index == this.compDTO.operDataList.length - 1) ? 16 : 0 })
97 .onClick(() => { 101 .onClick(() => {
  102 + InfomationCardClick.track(this.compDTO, item, this.pageId, this.pageName)
98 if (item.objectType != '0') { 103 if (item.objectType != '0') {
99 console.log(item.objectId) 104 console.log(item.objectId)
100 this.gotoLive(item) 105 this.gotoLive(item)
@@ -15,7 +15,7 @@ export struct LiveHorizontalCardForOneComponent { @@ -15,7 +15,7 @@ export struct LiveHorizontalCardForOneComponent {
15 .borderRadius(4) 15 .borderRadius(4)
16 .objectFit(ImageFit.Cover) 16 .objectFit(ImageFit.Cover)
17 CardMediaInfo({ 17 CardMediaInfo({
18 - contentDTO: this.contentDTO 18 + contentDTO: this.contentDTO, livePeopleNum:false,
19 }) 19 })
20 } 20 }
21 21
@@ -57,7 +57,7 @@ export struct LiveHorizontalReservationComponent { @@ -57,7 +57,7 @@ export struct LiveHorizontalReservationComponent {
57 .borderRadius(4) 57 .borderRadius(4)
58 .objectFit(ImageFit.Cover) 58 .objectFit(ImageFit.Cover)
59 CardMediaInfo({ 59 CardMediaInfo({
60 - contentDTO: item 60 + contentDTO: item, livePeopleNum:false,
61 }) 61 })
62 } 62 }
63 63
@@ -50,6 +50,10 @@ export struct OperRowListView { @@ -50,6 +50,10 @@ export struct OperRowListView {
50 } 50 }
51 private onCommentIconClick: () => void = () => { 51 private onCommentIconClick: () => void = () => {
52 } 52 }
  53 +
  54 + @Provide inDialog: boolean = false
  55 + private dialogBeforeJumpOtherPageAction: () => void = () => {}
  56 +
53 @Prop @Watch('onDetailUpdated') contentDetailData: ContentDetailDTO // 稿件详情 57 @Prop @Watch('onDetailUpdated') contentDetailData: ContentDetailDTO // 稿件详情
54 /** 58 /**
55 * 组件样式类型,根据详情页类型传值,组件内部根据样式展现类型做判断 59 * 组件样式类型,根据详情页类型传值,组件内部根据样式展现类型做判断
@@ -88,8 +92,7 @@ export struct OperRowListView { @@ -88,8 +92,7 @@ export struct OperRowListView {
88 @State dialogController: CustomDialogController | null = null; 92 @State dialogController: CustomDialogController | null = null;
89 93
90 async aboutToAppear() { 94 async aboutToAppear() {
91 - console.info(TAG, '22222----', this.styleType)  
92 - console.info(TAG, '3333----', this.needLike) 95 + console.info(TAG, 'this.needLike', this.needLike)
93 this.handleStyle() 96 this.handleStyle()
94 this.onDetailUpdated() 97 this.onDetailUpdated()
95 EmitterUtils.receiveEvent(EmitterEventId.AUDIO_CHANGE_STATUS, (val: number | string | undefined) => { 98 EmitterUtils.receiveEvent(EmitterEventId.AUDIO_CHANGE_STATUS, (val: number | string | undefined) => {
@@ -108,7 +111,7 @@ export struct OperRowListView { @@ -108,7 +111,7 @@ export struct OperRowListView {
108 } 111 }
109 112
110 async onDetailUpdated() { 113 async onDetailUpdated() {
111 - console.info(TAG, '111111----', this.styleType) 114 + console.info(TAG, 'this.styleType', this.styleType)
112 this.handleStyle() 115 this.handleStyle()
113 if (!this.contentDetailData) { 116 if (!this.contentDetailData) {
114 return 117 return
@@ -199,7 +202,7 @@ export struct OperRowListView { @@ -199,7 +202,7 @@ export struct OperRowListView {
199 .padding({ 202 .padding({
200 top: 10, 203 top: 10,
201 // bottom: 10 204 // bottom: 10
202 - bottom: `${this.bottomSafeHeight}px` 205 + bottom: px2vp(this.bottomSafeHeight)
203 // bottom: 50 206 // bottom: 50
204 }) 207 })
205 } 208 }
@@ -234,9 +237,10 @@ export struct OperRowListView { @@ -234,9 +237,10 @@ export struct OperRowListView {
234 left: 16 237 left: 16
235 }) 238 })
236 239
237 - if (this.showCommentIcon) { 240 + if (this.showCommentIcon // 页面控制开关,直播传false
  241 + && this.contentDetailData.openComment == 1 // 内容开关
  242 + && this.publishCommentModel?.targetId) {
238 Column() { 243 Column() {
239 - if (this.publishCommentModel?.targetId) {  
240 CommentIconComponent({ 244 CommentIconComponent({
241 publishCommentModel: this.publishCommentModel, 245 publishCommentModel: this.publishCommentModel,
242 styleType: this.styleType, 246 styleType: this.styleType,
@@ -251,7 +255,6 @@ export struct OperRowListView { @@ -251,7 +255,6 @@ export struct OperRowListView {
251 !this.showBackIcon && this.dialogController?.open() 255 !this.showBackIcon && this.dialogController?.open()
252 }) 256 })
253 } 257 }
254 - }  
255 .width(48) 258 .width(48)
256 } 259 }
257 260
@@ -380,7 +383,7 @@ export struct OperRowListView { @@ -380,7 +383,7 @@ export struct OperRowListView {
380 { 383 {
381 contentId: this.contentDetailData?.newsId + '', 384 contentId: this.contentDetailData?.newsId + '',
382 contentType: this.contentDetailData?.newsType + '', 385 contentType: this.contentDetailData?.newsType + '',
383 - contentRelId: this.contentDetailData?.reLInfo?.relId + '', 386 + contentRelId: this.contentDetailData?.reLInfo?.relId || '' + '',
384 } 387 }
385 ] 388 ]
386 } 389 }
@@ -397,7 +400,6 @@ export struct OperRowListView { @@ -397,7 +400,6 @@ export struct OperRowListView {
397 * 收藏、取消收藏 400 * 收藏、取消收藏
398 */ 401 */
399 async toggleCollectStatus() { 402 async toggleCollectStatus() {
400 - console.log(TAG, '收藏点击')  
401 // 未登录,跳转登录 403 // 未登录,跳转登录
402 const user_id = await SPHelper.default.get(SpConstants.USER_ID, '') 404 const user_id = await SPHelper.default.get(SpConstants.USER_ID, '')
403 console.log(TAG, '收藏点击,登录', user_id) 405 console.log(TAG, '收藏点击,登录', user_id)
@@ -411,15 +413,13 @@ export struct OperRowListView { @@ -411,15 +413,13 @@ export struct OperRowListView {
411 contentList: [{ 413 contentList: [{
412 contentId: this.contentDetailData?.newsId + '', 414 contentId: this.contentDetailData?.newsId + '',
413 contentType: this.contentDetailData?.newsType + '', 415 contentType: this.contentDetailData?.newsType + '',
414 - relType: this.contentDetailData?.reLInfo?.relType + '',  
415 - contentRelId: this.contentDetailData?.reLInfo?.relId + '', 416 + relType: this.contentDetailData?.reLInfo?.relType || '' + '',
  417 + contentRelId: this.contentDetailData?.reLInfo?.relId || '' + '',
416 }], 418 }],
417 419
418 } 420 }
419 - // console.log(TAG, '收藏点击', JSON.stringify(params)) 421 + console.log(TAG, '收藏点击', JSON.stringify(params))
420 PageRepository.postExecuteCollectRecord(params).then(res => { 422 PageRepository.postExecuteCollectRecord(params).then(res => {
421 - console.log(TAG, '收藏点击 res', JSON.stringify(res))  
422 - console.log(TAG, '收藏点击 this.newsStatusOfUser', JSON.stringify(this.newsStatusOfUser))  
423 if (this.newsStatusOfUser) { 423 if (this.newsStatusOfUser) {
424 this.newsStatusOfUser.collectStatus = this.newsStatusOfUser?.collectStatus === 1 ? 0 : 1 424 this.newsStatusOfUser.collectStatus = this.newsStatusOfUser?.collectStatus === 1 ? 0 : 1
425 if (this.newsStatusOfUser.collectStatus === 1) { 425 if (this.newsStatusOfUser.collectStatus === 1) {
@@ -427,6 +427,7 @@ export struct OperRowListView { @@ -427,6 +427,7 @@ export struct OperRowListView {
427 } 427 }
428 this.queryContentInteractCount() 428 this.queryContentInteractCount()
429 } 429 }
  430 + console.log(TAG, '收藏点击 this.newsStatusOfUser', JSON.stringify(this.newsStatusOfUser))
430 }) 431 })
431 432
432 } 433 }
@@ -31,6 +31,7 @@ export struct PermissionDesComponent { @@ -31,6 +31,7 @@ export struct PermissionDesComponent {
31 .border({ radius: 5 }) 31 .border({ radius: 5 })
32 .margin({ top: 12 }) 32 .margin({ top: 12 })
33 .padding(12) 33 .padding(12)
  34 + .zIndex(20)
34 } 35 }
35 36
36 startDismiss() { 37 startDismiss() {
@@ -96,7 +96,7 @@ class MinePageDatasModel{ @@ -96,7 +96,7 @@ class MinePageDatasModel{
96 * 包含名字和图标 96 * 包含名字和图标
97 */ 97 */
98 getMoreFunctionsData():MinePageCreatorFunctionsItem[]{ 98 getMoreFunctionsData():MinePageCreatorFunctionsItem[]{
99 - if(this.moreData.length === 5){ 99 + if(this.moreData.length === 3){
100 return this.moreData 100 return this.moreData
101 } 101 }
102 // this.moreData.push(new MinePageMoreFunctionModel("扫一扫",$r('app.media.mine_scan'))) 102 // this.moreData.push(new MinePageMoreFunctionModel("扫一扫",$r('app.media.mine_scan')))
@@ -173,4 +173,47 @@ export class ColorUtils { @@ -173,4 +173,47 @@ export class ColorUtils {
173 alpha: (color & 0xFF000000) >> 24 173 alpha: (color & 0xFF000000) >> 24
174 } 174 }
175 } 175 }
  176 +
  177 +
  178 + public static getMorningEveningPaperRgb(color: ColorRgb): ColorRgb{
  179 + // RGB颜色取值范围是0~255,需要转换为0~1的浮点数
  180 + const red: number = color.red / MAX_RGB_VALUE;
  181 + const green: number = color.green / MAX_RGB_VALUE;
  182 + const blue: number = color.blue / MAX_RGB_VALUE;
  183 +
  184 + const max: number = Math.max(red, green, blue);
  185 + const min: number = Math.min(red, green, blue);
  186 + const delta: number = max - min;
  187 +
  188 + // 色调
  189 + let hue: number = 0;
  190 + // 饱和度
  191 + let saturation: number = 0;
  192 + // 明度
  193 + let value: number = 0;
  194 + // 计算hue值
  195 + if (max === min) {
  196 + hue = 0;
  197 + } else if (Math.abs(max - red) < Number.EPSILON) {
  198 + hue = (green >= blue ? ((green - blue) / delta) * 60 : ((green - blue) / delta) * 60 + 360);
  199 + } else if (Math.abs(max - green) < Number.EPSILON) {
  200 + hue = (((blue - red) / delta) + 2) * 60;
  201 + } else if (Math.abs(max - blue) < Number.EPSILON) {
  202 + hue = (((red - green) / delta) + 4) * 60;
  203 + }
  204 +
  205 + // 计算saturation值
  206 + saturation = 0.9;
  207 + // 计算value值
  208 + value = 0.3;
  209 +
  210 + return ColorUtils.hsv2rgb({
  211 + hue: hue,
  212 + saturation: saturation,
  213 + value: value,
  214 + alpha: color.alpha
  215 + })
  216 +
  217 + }
  218 +
176 } 219 }
@@ -4,7 +4,88 @@ import PageModel from '../viewmodel/PageModel'; @@ -4,7 +4,88 @@ import PageModel from '../viewmodel/PageModel';
4 import PageHelper from '../viewmodel/PageHelper'; 4 import PageHelper from '../viewmodel/PageHelper';
5 import PageAdModel from '../viewmodel/PageAdvModel'; 5 import PageAdModel from '../viewmodel/PageAdvModel';
6 import { LoadStatus } from '../components/refresh/RefreshLayoutBean'; 6 import { LoadStatus } from '../components/refresh/RefreshLayoutBean';
  7 +import { Logger } from 'wdKit/Index';
  8 +
  9 +const TAG = 'PullDownRefresh'
  10 +/***********新的下拉、上拉手势 start **********/
  11 +export function onActionStart(pageModel: PageModel, pageAdvModel: PageAdModel, event?: GestureEvent) {
  12 + if (event === undefined) {
  13 + return
  14 + }
  15 + pageModel.downY = event.offsetY;
  16 + pageModel.lastMoveY = event.offsetY;
  17 +}
  18 +
  19 +export function onActionUpdate(pageModel: PageModel, pageAdvModel: PageAdModel, event?: GestureEvent) {
  20 + if (event === undefined) {
  21 + return
  22 + }
  23 + if ((pageModel.isRefreshing === true) || (pageModel.isLoading === true)) {
  24 + return;
  25 + }
  26 + let isDownPull = event.offsetY - pageModel.lastMoveY > 0;
  27 + if (((isDownPull === true) || (pageModel.isPullRefreshOperation === true)) &&
  28 + (pageModel.isCanLoadMore === false)) {
  29 + actionUpdatePullRefresh(pageModel, event);
  30 + } else {
  31 + actionUpdateLoadMore(pageModel, event);
  32 + }
  33 + pageModel.lastMoveY = event.offsetY;
  34 +}
  35 +
  36 +export function onActionEnd(pageModel: PageModel, pageAdvModel: PageAdModel) {
  37 + if ((pageModel.isRefreshing === true) || (pageModel.isLoading === true)) {
  38 + return;
  39 + }
  40 + if ((pageModel.isPullRefreshOperation === true)) {
  41 + touchUpPullRefresh(pageModel, pageAdvModel);
  42 + } else {
  43 + // touchUpLoadMore(pageModel);
  44 + }
  45 +}
  46 +
  47 +export function actionUpdatePullRefresh(pageModel: PageModel, event: GestureEvent) {
  48 + if (pageModel.startIndex === 0) {
  49 + pageModel.isPullRefreshOperation = true;
  50 + let height = vp2px(Const.CUSTOM_REFRESH_DECIDE_HEIGHT);
  51 + pageModel.offsetY = event.offsetY - pageModel.downY;
  52 + if (pageModel.offsetY >= height) {
  53 + pullRefreshState(pageModel, RefreshState.Release);
  54 + pageModel.offsetY = height + pageModel.offsetY * Const.Y_OFF_SET_COEFFICIENT;
  55 + } else {
  56 + pullRefreshState(pageModel, RefreshState.DropDown);
  57 + }
  58 + if (pageModel.offsetY < 0) {
  59 + pageModel.offsetY = 0;
  60 + pageModel.isPullRefreshOperation = false;
  61 + }
  62 + }
  63 +}
  64 +
  65 +export function actionUpdateLoadMore(model: PageModel, event: GestureEvent) {
  66 + // list size +1
  67 + if (model.endIndex >= model.compList.totalCount() - 3 && model.endIndex <= model.compList.totalCount()) {
  68 + // model.offsetY = event.touches[0].y - model.downY;
  69 + // if (Math.abs(model.offsetY) > vp2px(model.pullUpLoadHeight) / 2) {
  70 + // model.isCanLoadMore = true;
  71 + // model.isVisiblePullUpLoad = true;
  72 + // model.offsetY = -vp2px(model.pullUpLoadHeight) + model.offsetY * Const.Y_OFF_SET_COEFFICIENT;
  73 + // }
  74 +
  75 + // 不用分页动画,直接预加载
  76 + model.isCanLoadMore = true;
  77 + model.isVisiblePullUpLoad = true;
  78 + touchUpLoadMore(model);
  79 + }
  80 +}
  81 +
  82 +/***********新的下拉、上拉手势 end **********/
  83 +
  84 +
7 //下拉刷新上拉加载更多组件 85 //下拉刷新上拉加载更多组件
  86 +/**
  87 + * @deprecated
  88 + */
8 export function listTouchEvent(pageModel: PageModel, pageAdvModel: PageAdModel, event: TouchEvent) { 89 export function listTouchEvent(pageModel: PageModel, pageAdvModel: PageAdModel, event: TouchEvent) {
9 switch (event.type) { 90 switch (event.type) {
10 case TouchType.Down: 91 case TouchType.Down:
@@ -16,7 +97,8 @@ export function listTouchEvent(pageModel: PageModel, pageAdvModel: PageAdModel, @@ -16,7 +97,8 @@ export function listTouchEvent(pageModel: PageModel, pageAdvModel: PageAdModel,
16 return; 97 return;
17 } 98 }
18 let isDownPull = event.touches[0].y - pageModel.lastMoveY > 0; 99 let isDownPull = event.touches[0].y - pageModel.lastMoveY > 0;
19 - if (((isDownPull === true) || (pageModel.isPullRefreshOperation === true)) && (pageModel.isCanLoadMore === false)) { 100 + if (((isDownPull === true) || (pageModel.isPullRefreshOperation === true)) &&
  101 + (pageModel.isCanLoadMore === false)) {
20 // Finger movement, processing pull-down refresh. 102 // Finger movement, processing pull-down refresh.
21 touchMovePullRefresh(pageModel, event); 103 touchMovePullRefresh(pageModel, event);
22 } else { 104 } else {
@@ -44,6 +126,9 @@ export function listTouchEvent(pageModel: PageModel, pageAdvModel: PageAdModel, @@ -44,6 +126,9 @@ export function listTouchEvent(pageModel: PageModel, pageAdvModel: PageAdModel,
44 } 126 }
45 } 127 }
46 128
  129 +/**
  130 + * @deprecated
  131 + */
47 export function touchMovePullRefresh(pageModel: PageModel, event: TouchEvent) { 132 export function touchMovePullRefresh(pageModel: PageModel, event: TouchEvent) {
48 if (pageModel.startIndex === 0) { 133 if (pageModel.startIndex === 0) {
49 pageModel.isPullRefreshOperation = true; 134 pageModel.isPullRefreshOperation = true;
@@ -73,11 +158,22 @@ export function touchUpPullRefresh(pageModel: PageModel, pageAdvModel: PageAdMod @@ -73,11 +158,22 @@ export function touchUpPullRefresh(pageModel: PageModel, pageAdvModel: PageAdMod
73 let advSelf: PageAdModel = pageAdvModel; 158 let advSelf: PageAdModel = pageAdvModel;
74 PageHelper.refreshUI(self, advSelf) 159 PageHelper.refreshUI(self, advSelf)
75 }, Const.DELAY_TIME); 160 }, Const.DELAY_TIME);
  161 + setRefreshTimeoutTimer(pageModel)
76 } else { 162 } else {
77 closeRefresh(pageModel, false); 163 closeRefresh(pageModel, false);
78 } 164 }
79 } 165 }
80 166
  167 +export function setRefreshTimeoutTimer(pageModel: PageModel) {
  168 + let timeoutId = setTimeout(() => {
  169 + closeRefresh(pageModel, false);
  170 + Logger.error(TAG, 'closeRefresh by timeout')
  171 + }, Const.REFRESH_TIMEOUT__TIME);
  172 + // 取消超时关闭定时器
  173 + clearTimeout(pageModel.refreshTimeoutTimerId)
  174 + pageModel.refreshTimeoutTimerId = timeoutId
  175 +}
  176 +
81 /** 177 /**
82 * 自动刷新接口,如首页底导,双击按钮自动刷新 178 * 自动刷新接口,如首页底导,双击按钮自动刷新
83 * @param pageModel 页面数据 179 * @param pageModel 页面数据
@@ -93,6 +189,7 @@ export function autoRefresh(pageModel: PageModel, pageAdvModel: PageAdModel) { @@ -93,6 +189,7 @@ export function autoRefresh(pageModel: PageModel, pageAdvModel: PageAdModel) {
93 pullRefreshState(pageModel, RefreshState.Refreshing); 189 pullRefreshState(pageModel, RefreshState.Refreshing);
94 pageModel.currentPage = 1; 190 pageModel.currentPage = 1;
95 PageHelper.refreshUI(pageModel, pageAdvModel) 191 PageHelper.refreshUI(pageModel, pageAdvModel)
  192 + setRefreshTimeoutTimer(pageModel)
96 } 193 }
97 194
98 export function pullRefreshState(pageModel: PageModel, state: number) { 195 export function pullRefreshState(pageModel: PageModel, state: number) {
@@ -141,6 +238,8 @@ export function pullRefreshState(pageModel: PageModel, state: number) { @@ -141,6 +238,8 @@ export function pullRefreshState(pageModel: PageModel, state: number) {
141 238
142 export function closeRefresh(pageModel: PageModel, isRefreshSuccess: boolean) { 239 export function closeRefresh(pageModel: PageModel, isRefreshSuccess: boolean) {
143 let self = pageModel; 240 let self = pageModel;
  241 + // 取消超时关闭定时器
  242 + clearTimeout(self.refreshTimeoutTimerId)
144 setTimeout(() => { 243 setTimeout(() => {
145 let delay = Const.RefreshConstant_DELAY_PULL_DOWN_REFRESH; 244 let delay = Const.RefreshConstant_DELAY_PULL_DOWN_REFRESH;
146 if (self.isCanRefresh === true) { 245 if (self.isCanRefresh === true) {
1 import PageModel from '../viewmodel/PageModel'; 1 import PageModel from '../viewmodel/PageModel';
2 import { RefreshConstants as Const } from './RefreshConstants'; 2 import { RefreshConstants as Const } from './RefreshConstants';
3 import PageHelper from '../viewmodel/PageHelper'; 3 import PageHelper from '../viewmodel/PageHelper';
  4 +import { Logger } from 'wdKit/Index';
  5 +
  6 +const TAG = 'PullUpLoadMore'
4 7
5 export function touchMoveLoadMore(model: PageModel, event: TouchEvent) { 8 export function touchMoveLoadMore(model: PageModel, event: TouchEvent) {
6 // list size +1 9 // list size +1
7 - if (model.endIndex >= model.compList.totalCount()-3 && model.endIndex <= model.compList.totalCount()) { 10 + if (model.endIndex >= model.compList.totalCount() - 3 && model.endIndex <= model.compList.totalCount()) {
8 // model.offsetY = event.touches[0].y - model.downY; 11 // model.offsetY = event.touches[0].y - model.downY;
9 // if (Math.abs(model.offsetY) > vp2px(model.pullUpLoadHeight) / 2) { 12 // if (Math.abs(model.offsetY) > vp2px(model.pullUpLoadHeight) / 2) {
10 // model.isCanLoadMore = true; 13 // model.isCanLoadMore = true;
@@ -32,6 +35,7 @@ export function touchUpLoadMore(model: PageModel) { @@ -32,6 +35,7 @@ export function touchUpLoadMore(model: PageModel) {
32 // closeLoadMore(model); 35 // closeLoadMore(model);
33 PageHelper.loadMore(self) 36 PageHelper.loadMore(self)
34 }, Const.DELAY_TIME); 37 }, Const.DELAY_TIME);
  38 + setLoadMoreTimeoutTimer(self)
35 } else { 39 } else {
36 closeLoadMore(self); 40 closeLoadMore(self);
37 } 41 }
@@ -42,3 +46,13 @@ export function closeLoadMore(model: PageModel) { @@ -42,3 +46,13 @@ export function closeLoadMore(model: PageModel) {
42 model.isLoading = false; 46 model.isLoading = false;
43 model.isVisiblePullUpLoad = false; 47 model.isVisiblePullUpLoad = false;
44 } 48 }
  49 +
  50 +export function setLoadMoreTimeoutTimer(pageModel: PageModel) {
  51 + let timeoutId = setTimeout(() => {
  52 + closeLoadMore(pageModel);
  53 + Logger.error(TAG, 'closeLoadMore by timeout')
  54 + }, Const.REFRESH_TIMEOUT__TIME);
  55 + // 取消超时关闭定时器
  56 + clearTimeout(pageModel.loadMoreTimeoutTimerId)
  57 + pageModel.loadMoreTimeoutTimerId = timeoutId
  58 +}
@@ -14,7 +14,7 @@ export class RefreshConstants { @@ -14,7 +14,7 @@ export class RefreshConstants {
14 * The delay time. 14 * The delay time.
15 */ 15 */
16 static readonly DELAY_TIME: number = 50; 16 static readonly DELAY_TIME: number = 50;
17 - 17 + static readonly REFRESH_TIMEOUT__TIME: number = 10000;
18 /** 18 /**
19 * The animation duration. 19 * The animation duration.
20 */ 20 */
@@ -25,12 +25,10 @@ export class RefreshConstants { @@ -25,12 +25,10 @@ export class RefreshConstants {
25 static readonly RefreshConstant_DELAY_PULL_DOWN_REFRESH: number = 50; 25 static readonly RefreshConstant_DELAY_PULL_DOWN_REFRESH: number = 50;
26 static readonly RefreshConstant_CLOSE_PULL_DOWN_REFRESH_TIME: number = 150; 26 static readonly RefreshConstant_CLOSE_PULL_DOWN_REFRESH_TIME: number = 150;
27 static readonly RefreshConstant_DELAY_SHRINK_ANIMATION_TIME: number = 1500; 27 static readonly RefreshConstant_DELAY_SHRINK_ANIMATION_TIME: number = 1500;
28 -  
29 /** 28 /**
30 * The page size. 29 * The page size.
31 */ 30 */
32 static readonly PAGE_SIZE: number = 20; 31 static readonly PAGE_SIZE: number = 20;
33 -  
34 /** 32 /**
35 * The refresh and load height. 33 * The refresh and load height.
36 */ 34 */
@@ -59,6 +57,7 @@ export class RefreshConstants { @@ -59,6 +57,7 @@ export class RefreshConstants {
59 static readonly RefreshLayout_IMAGE_WIDTH: number = 18; 57 static readonly RefreshLayout_IMAGE_WIDTH: number = 18;
60 static readonly RefreshLayout_IMAGE_HEIGHT: number = 18; 58 static readonly RefreshLayout_IMAGE_HEIGHT: number = 18;
61 } 59 }
  60 +
62 /** 61 /**
63 * The refresh state enum. 62 * The refresh state enum.
64 */ 63 */
  1 +import { TrackingContent, TrackConstants, ParamType } from 'wdTracking';
  2 +import { CompDTO, ContentDTO } from 'wdBean';
  3 +
  4 +export class InfomationCardClick {
  5 +
  6 + private static getLiveState(contentDTO: ContentDTO) {
  7 + if (contentDTO?.liveInfo?.liveState === 'wait') {
  8 + return 'liveSubscribe'
  9 + } else if (contentDTO?.liveInfo?.liveState === 'running') {
  10 + return 'livePlaying'
  11 + } else if (contentDTO?.liveInfo?.liveState === 'end') {
  12 + return 'liveEnd'
  13 + } else {
  14 + return ''
  15 + }
  16 + }
  17 +
  18 + private static getSummaryType(objectType: string) {
  19 + let summaryType: string = ''
  20 + switch(objectType) {
  21 + case '2':
  22 + summaryType = 'liveTopic';
  23 + break;
  24 + case '8':
  25 + summaryType = 'articleTopic';
  26 + break;
  27 + case '13':
  28 + summaryType = 'audioTopic';
  29 + break;
  30 + // case '':
  31 + // summaryType = 'talkTopic';
  32 + // break;
  33 + // case '':
  34 + // summaryType = 'morningAndEveningNewsTopic';
  35 + // break;
  36 + // case '':
  37 + // summaryType = 'timeAxisTopic';
  38 + // break;
  39 + default:
  40 + summaryType = '';
  41 + break;
  42 + }
  43 + return summaryType;
  44 + }
  45 +
  46 + public static track(compDTO: CompDTO, contentDTO: ContentDTO, pageId: string, pageName: string): void {
  47 + try {
  48 + const extParams: ParamType = {
  49 + 'action': 'detailPageShow',
  50 + 'shareChannel': '',
  51 + 'duration': 0,
  52 + 'contentName': contentDTO.newsTitle,
  53 + 'contentType': contentDTO.objectType,
  54 + // 'contentClassify': '' // 废除
  55 + 'contentId': contentDTO.objectId,
  56 + // 'compId': contentDTO.relId,
  57 + 'contentStyle': contentDTO.appStyle,
  58 + 'liveType': InfomationCardClick.getLiveState(contentDTO),
  59 + 'channelSourceId': contentDTO.channelId,
  60 + 'contentShowChannelId': contentDTO.channelId,
  61 + // 'contentShowChannelName': '',
  62 + 'linkUrl': contentDTO.linkUrl,
  63 + 'regionName': 2, // 信息流:2
  64 + 'componentType': compDTO.compStyle,
  65 + 'sceneId': contentDTO.sceneId,
  66 + 'subSceneId': contentDTO.subSceneId,
  67 + 'cnsTraceId': contentDTO.cnsTraceId,
  68 + 'cardItemId': compDTO.cardItemId,
  69 + 'itemId': compDTO.itemId || contentDTO.itemId,
  70 + 'expIds': compDTO.expIds || contentDTO.expIds
  71 + }
  72 + if (contentDTO.objectType === '5') {
  73 + extParams['summaryId'] = contentDTO.objectId;
  74 + extParams['summaryType'] = InfomationCardClick.getSummaryType(contentDTO.objectType);
  75 + extParams['specialLink'] = contentDTO.linkUrl;
  76 + }
  77 + if (contentDTO.objectType === '2') {
  78 + extParams['liveStreamType'] = contentDTO?.liveInfo.vrType === 0 ? 1 : 2;
  79 + extParams['vliveId'] = contentDTO.objectId;
  80 + extParams['vliveName'] = contentDTO.newsTitle;
  81 + extParams['liveMode'] = 1;
  82 + }
  83 + if (contentDTO.rmhPlatform === 1) {
  84 + extParams['saAuthorName'] = contentDTO.rmhInfo?.rmhName;
  85 + extParams['saAuthorId'] = contentDTO.rmhInfo?.rmhId;
  86 + } else if (contentDTO.source) {
  87 + extParams['saAuthorName'] = contentDTO.source;
  88 + }
  89 + console.log('InfomationCardClick-params:', JSON.stringify(extParams))
  90 + TrackingContent.common(TrackConstants.EventType.Click, pageId, pageName, extParams)
  91 + } catch (err) {
  92 + console.log('InfomationCardClick-err', JSON.stringify(err))
  93 + }
  94 + }
  95 +}
@@ -49,6 +49,9 @@ export class PageHelper { @@ -49,6 +49,9 @@ export class PageHelper {
49 } 49 }
50 50
51 private refreshUIEnd(pageModel: PageModel, isRefreshSuccess: boolean) { 51 private refreshUIEnd(pageModel: PageModel, isRefreshSuccess: boolean) {
  52 + if (pageModel.loadStrategy != 2) {
  53 + return
  54 + }
52 closeRefresh(pageModel, isRefreshSuccess) 55 closeRefresh(pageModel, isRefreshSuccess)
53 } 56 }
54 57
@@ -119,6 +122,7 @@ export class PageHelper { @@ -119,6 +122,7 @@ export class PageHelper {
119 } 122 }
120 }).catch((err: string | Resource) => { 123 }).catch((err: string | Resource) => {
121 promptAction.showToast({ message: err }); 124 promptAction.showToast({ message: err });
  125 + this.refreshUIEnd(pageModel, false)
122 }) 126 })
123 } else { 127 } else {
124 Logger.debug(TAG, 'getPageInfo') 128 Logger.debug(TAG, 'getPageInfo')
@@ -127,6 +131,7 @@ export class PageHelper { @@ -127,6 +131,7 @@ export class PageHelper {
127 if (pageInfo == null) { 131 if (pageInfo == null) {
128 pageModel.viewType = ViewType.EMPTY; 132 pageModel.viewType = ViewType.EMPTY;
129 pageModel.emptyType = WDViewDefaultType.WDViewDefaultType_NoContent1; 133 pageModel.emptyType = WDViewDefaultType.WDViewDefaultType_NoContent1;
  134 + this.refreshUIEnd(pageModel, false)
130 return; 135 return;
131 } 136 }
132 pageModel.pageInfo = pageInfo; 137 pageModel.pageInfo = pageInfo;
@@ -146,6 +151,7 @@ export class PageHelper { @@ -146,6 +151,7 @@ export class PageHelper {
146 Logger.debug(TAG, 'getPageInfo go on') 151 Logger.debug(TAG, 'getPageInfo go on')
147 this.parseGroup(pageModel, false) 152 this.parseGroup(pageModel, false)
148 }).catch(() => { 153 }).catch(() => {
  154 + this.refreshUIEnd(pageModel, false)
149 if (this.isPageLoaded(pageModel)) { 155 if (this.isPageLoaded(pageModel)) {
150 return 156 return
151 } 157 }
@@ -406,7 +412,7 @@ export class PageHelper { @@ -406,7 +412,7 @@ export class PageHelper {
406 /** 412 /**
407 * 竖直方向list,将数据拆出来,组装成comp 413 * 竖直方向list,将数据拆出来,组装成comp
408 */ 414 */
409 - private createSpecialComp(compList: CompDTO[]): CompDTO[]{ 415 + private createSpecialComp(compList: CompDTO[]): CompDTO[] {
410 if (!compList) { 416 if (!compList) {
411 return compList 417 return compList
412 } 418 }
@@ -458,7 +464,6 @@ export class PageHelper { @@ -458,7 +464,6 @@ export class PageHelper {
458 464
459 // 批查直播观看人数 465 // 批查直播观看人数
460 this.getLiveRoomDataInfo(compList) 466 this.getLiveRoomDataInfo(compList)
461 -  
462 // 467 //
463 468
464 469
@@ -28,13 +28,28 @@ export default class PageModel { @@ -28,13 +28,28 @@ export default class PageModel {
28 loadStrategy: number = 1; 28 loadStrategy: number = 1;
29 currentPage: number = 1; 29 currentPage: number = 1;
30 pageSize: number = Const.PAGE_SIZE; 30 pageSize: number = Const.PAGE_SIZE;
  31 + /**
  32 + * @deprecated
  33 + */
31 pullDownRefreshText: Resource = $r('app.string.pull_down_refresh_text'); 34 pullDownRefreshText: Resource = $r('app.string.pull_down_refresh_text');
  35 + /**
  36 + * @deprecated
  37 + */
32 pullDownRefreshImage: Resource = $r('app.media.ic_pull_down_refresh'); 38 pullDownRefreshImage: Resource = $r('app.media.ic_pull_down_refresh');
33 pullDownRefreshHeight: number = Const.CUSTOM_LAYOUT_HEIGHT; 39 pullDownRefreshHeight: number = Const.CUSTOM_LAYOUT_HEIGHT;
34 isVisiblePullDown: boolean = false; 40 isVisiblePullDown: boolean = false;
35 load: LoadStatus = LoadStatus.IDLE; 41 load: LoadStatus = LoadStatus.IDLE;
  42 + /**
  43 + * @deprecated
  44 + */
36 pullUpLoadText: Resource = $r('app.string.pull_up_load_text'); 45 pullUpLoadText: Resource = $r('app.string.pull_up_load_text');
  46 + /**
  47 + * @deprecated
  48 + */
37 pullUpLoadImage: Resource = $r('app.media.ic_pull_up_load'); 49 pullUpLoadImage: Resource = $r('app.media.ic_pull_up_load');
  50 + /**
  51 + * @deprecated
  52 + */
38 pullUpLoadHeight: number = Const.CUSTOM_LAYOUT_HEIGHT; 53 pullUpLoadHeight: number = Const.CUSTOM_LAYOUT_HEIGHT;
39 isVisiblePullUpLoad: boolean = false; 54 isVisiblePullUpLoad: boolean = false;
40 offsetY: number = 0; 55 offsetY: number = 0;
@@ -50,6 +65,8 @@ export default class PageModel { @@ -50,6 +65,8 @@ export default class PageModel {
50 isPullRefreshOperation = false; 65 isPullRefreshOperation = false;
51 isLoading: boolean = false; 66 isLoading: boolean = false;
52 isCanLoadMore: boolean = false; 67 isCanLoadMore: boolean = false;
  68 + refreshTimeoutTimerId: number = 0;
  69 + loadMoreTimeoutTimerId: number = 0;
53 // keyGenerator相关字符串,用于刷新list布局 70 // keyGenerator相关字符串,用于刷新list布局
54 timestamp: String = '1'; 71 timestamp: String = '1';
55 72
@@ -83,23 +83,29 @@ export struct DetailPlayLiveCommon { @@ -83,23 +83,29 @@ export struct DetailPlayLiveCommon {
83 * 获取直播信息,可区分横竖屏直播 83 * 获取直播信息,可区分横竖屏直播
84 */ 84 */
85 getLiveDetails() { 85 getLiveDetails() {
  86 +
86 this.liveViewModel.getLiveDetails(this.contentId, this.relId, this.relType) 87 this.liveViewModel.getLiveDetails(this.contentId, this.relId, this.relType)
87 .then( 88 .then(
88 (data) => { 89 (data) => {
89 if (data.length > 0) { 90 if (data.length > 0) {
  91 +
  92 + //todo 不加setTimeOut ,接口返回的数据 就没法让PlayerComponent #@Consume @Watch('updateData') liveDetailsBean 的updateData方法运行
  93 + setTimeout(() => {
90 this.liveDetailsBean = data[0] 94 this.liveDetailsBean = data[0]
91 - this.liveState = this.liveDetailsBean.liveInfo?.liveState  
92 - this.liveStyle = this.liveDetailsBean.liveInfo.liveStyle 95 + }, 10)
  96 +
  97 + this.liveState = data[0].liveInfo?.liveState
  98 + this.liveStyle = data[0].liveInfo.liveStyle
93 99
94 - if (this.liveDetailsBean.fullColumnImgUrls && this.liveDetailsBean.fullColumnImgUrls.length > 0) {  
95 - this.imgUrl = this.liveDetailsBean.fullColumnImgUrls[0].url 100 + if (data[0].fullColumnImgUrls && data[0].fullColumnImgUrls.length > 0) {
  101 + this.imgUrl = data[0].fullColumnImgUrls[0].url
96 } 102 }
97 103
98 - if (this.liveDetailsBean.liveInfo.liveState == 'end') {  
99 - this.playUrl = this.liveDetailsBean.liveInfo.vlive[0].replayUri 104 + if (data[0].liveInfo.liveState == 'end') {
  105 + this.playUrl = data[0].liveInfo.vlive[0].replayUri
100 } 106 }
101 107
102 - console.log(TAG, 'getLiveDetails:', JSON.stringify((this.liveDetailsBean))) 108 + // console.log(TAG, 'getLiveDetails:', JSON.stringify((this.liveDetailsBean)))
103 } 109 }
104 }, 110 },
105 () => { 111 () => {
@@ -53,17 +53,23 @@ export struct DetailPlayLivePage { @@ -53,17 +53,23 @@ export struct DetailPlayLivePage {
53 console.error(TAG, 'this.publishCommentModel', this.publishCommentModel.targetId) 53 console.error(TAG, 'this.publishCommentModel', this.publishCommentModel.targetId)
54 } 54 }
55 55
  56 + async aboutToDisappear() {
  57 + Logger.info(TAG, `wyj-aboutToDisappear`)
  58 + await this.playerController?.stop()
  59 + await this.playerController?.release()
  60 + }
  61 +
56 build() { 62 build() {
57 Column() { 63 Column() {
58 TopPlayComponent({ playerController: this.playerController }) 64 TopPlayComponent({ playerController: this.playerController })
59 - .layoutWeight(211) 65 + .height(211)
60 TabComponent({ tabs: this.tabs, changeToTab: this.changeToTab }) 66 TabComponent({ tabs: this.tabs, changeToTab: this.changeToTab })
61 - .layoutWeight(503) 67 + .layoutWeight(1)
62 .visibility(this.displayDirection == DisplayDirection.VERTICAL ? Visibility.Visible : Visibility.None) 68 .visibility(this.displayDirection == DisplayDirection.VERTICAL ? Visibility.Visible : Visibility.None)
63 -  
64 OperRowListView({ 69 OperRowListView({
65 componentType: 4, 70 componentType: 4,
66 operationButtonList: ['comment', 'collect', 'share', 'like'], 71 operationButtonList: ['comment', 'collect', 'share', 'like'],
  72 + styleType: 1,
67 contentDetailData: this.contentDetailData, 73 contentDetailData: this.contentDetailData,
68 publishCommentModel: this.publishCommentModel, 74 publishCommentModel: this.publishCommentModel,
69 showCommentIcon: false, 75 showCommentIcon: false,
@@ -79,12 +85,7 @@ export struct DetailPlayLivePage { @@ -79,12 +85,7 @@ export struct DetailPlayLivePage {
79 } 85 }
80 .height('100%') 86 .height('100%')
81 .width('100%') 87 .width('100%')
82 - }  
83 -  
84 - async aboutToDisappear() {  
85 - Logger.info(TAG, `wyj-aboutToDisappear`)  
86 - await this.playerController?.stop()  
87 - await this.playerController?.release() 88 + // 设置底部绘制延伸到导航条
88 } 89 }
89 90
90 onPageShowCus(): void { 91 onPageShowCus(): void {
@@ -36,6 +36,7 @@ export struct DetailPlayVLivePage { @@ -36,6 +36,7 @@ export struct DetailPlayVLivePage {
36 aboutToAppear(): void { 36 aboutToAppear(): void {
37 this.openFullScreen() 37 this.openFullScreen()
38 this.getLiveRoomData() 38 this.getLiveRoomData()
  39 +
39 } 40 }
40 41
41 aboutToDisappear(): void { 42 aboutToDisappear(): void {
@@ -21,6 +21,7 @@ export struct PlayerComponent { @@ -21,6 +21,7 @@ export struct PlayerComponent {
21 @State playUrl: string = '' 21 @State playUrl: string = ''
22 @State isCanplay: boolean = false 22 @State isCanplay: boolean = false
23 23
  24 +
24 pageShowChange() { 25 pageShowChange() {
25 this.playerController?.play() 26 this.playerController?.play()
26 } 27 }
@@ -30,15 +31,10 @@ export struct PlayerComponent { @@ -30,15 +31,10 @@ export struct PlayerComponent {
30 } 31 }
31 32
32 aboutToAppear(): void { 33 aboutToAppear(): void {
33 - console.log(TAG, 'aboutToAppear')  
34 - this.playerController.onCanplay = () => {  
35 - console.log('可以播放了')  
36 - this.playerController?.play()  
37 - this.isCanplay = true  
38 - }  
39 } 34 }
40 35
41 async aboutToDisappear(): Promise<void> { 36 async aboutToDisappear(): Promise<void> {
  37 +
42 await this.playerController?.pause() 38 await this.playerController?.pause()
43 await this.playerController?.stop() 39 await this.playerController?.stop()
44 await this.playerController?.release() 40 await this.playerController?.release()
@@ -63,7 +59,6 @@ export struct PlayerComponent { @@ -63,7 +59,6 @@ export struct PlayerComponent {
63 59
64 this.liveStreamType = liveStreamType 60 this.liveStreamType = liveStreamType
65 this.playUrl = playUrl 61 this.playUrl = playUrl
66 -  
67 } 62 }
68 } 63 }
69 64
@@ -75,6 +70,7 @@ export struct PlayerComponent { @@ -75,6 +70,7 @@ export struct PlayerComponent {
75 WDPlayerRenderVLiveView({ 70 WDPlayerRenderVLiveView({
76 playerController: this.playerController, 71 playerController: this.playerController,
77 onLoad: () => { 72 onLoad: () => {
  73 + this.isCanplay = true
78 this.playerController?.firstPlay(this.playUrl); 74 this.playerController?.firstPlay(this.playUrl);
79 } 75 }
80 }) 76 })
@@ -82,12 +78,14 @@ export struct PlayerComponent { @@ -82,12 +78,14 @@ export struct PlayerComponent {
82 AliPlayerRenderView({ 78 AliPlayerRenderView({
83 playerController: this.playerController, 79 playerController: this.playerController,
84 onLoad: () => { 80 onLoad: () => {
  81 + this.isCanplay = true
85 this.playerController?.firstPlay(this.playUrl); 82 this.playerController?.firstPlay(this.playUrl);
86 } 83 }
87 }).margin({ top: 195 }).height(211) 84 }).margin({ top: 195 }).height(211)
88 } 85 }
89 86
90 PictureLoading().visibility(this.isCanplay ? Visibility.None : Visibility.Visible) 87 PictureLoading().visibility(this.isCanplay ? Visibility.None : Visibility.Visible)
  88 +
91 } 89 }
92 .height('100%') 90 .height('100%')
93 .width('100%') 91 .width('100%')
@@ -98,8 +96,11 @@ export struct PlayerComponent { @@ -98,8 +96,11 @@ export struct PlayerComponent {
98 this.isShowControl = !this.isShowControl 96 this.isShowControl = !this.isShowControl
99 } 97 }
100 }) 98 })
  99 +
101 } 100 }
102 .height('100%') 101 .height('100%')
103 .width('100%') 102 .width('100%')
104 } 103 }
  104 +
  105 +
105 } 106 }
@@ -185,7 +185,7 @@ export struct DetailPlayShortVideoPage { @@ -185,7 +185,7 @@ export struct DetailPlayShortVideoPage {
185 index: $index, 185 index: $index,
186 currentIndex: $currentIndex, 186 currentIndex: $currentIndex,
187 showCommentList: $showCommentList, 187 showCommentList: $showCommentList,
188 - publishCommentModel: $publishCommentModel 188 + // publishCommentModel: $publishCommentModel
189 }) 189 })
190 this.playerViewBuilder() 190 this.playerViewBuilder()
191 191
1 -import { ContentDetailDTO } from 'wdBean/Index'  
2 -import { WindowModel } from 'wdKit/Index'  
3 -import {  
4 - publishCommentModel  
5 -} from '../../../../../wdComponent/src/main/ets/components/comment/model/PublishCommentModel'  
6 -import { CommentComponent } from '../../../../../wdComponent/src/main/ets/components/comment/view/CommentComponent'  
7 -import { OperRowListView } from '../../../../../wdComponent/src/main/ets/components/view/OperRowListView' 1 +import { ContentDetailDTO, PageInfoDTO } from 'wdBean/Index'
8 2
  3 +import { CommentListDialogView } from 'wdComponent/Index'
9 4
10 @Component 5 @Component
11 export struct CommentDialogView { 6 export struct CommentDialogView {
12 - @Link publishCommentModel: publishCommentModel  
13 @Link @Watch('showCommentListChange') showCommentList: boolean 7 @Link @Watch('showCommentListChange') showCommentList: boolean
14 @Link index: number 8 @Link index: number
15 @Link currentIndex: number 9 @Link currentIndex: number
16 - @Consume windowWidth: number  
17 - @Consume windowHeight: number  
18 - @Consume bottomSafeHeight: number  
19 - @Consume topSafeHeight: number  
20 @Consume contentDetailData: ContentDetailDTO 10 @Consume contentDetailData: ContentDetailDTO
  11 + @State fakePageInfo: PageInfoDTO = {} as PageInfoDTO
21 @State dialogOffsetY: number = 0 // (this.windowHeight - this.windowWidth * 9 / 16) 12 @State dialogOffsetY: number = 0 // (this.windowHeight - this.windowWidth * 9 / 16)
22 - // @State modifier: DrawModifier = new DrawModifier();  
23 - dialogController: CustomDialogController = new CustomDialogController({  
24 - builder: DetailDialog({  
25 - publishCommentModel: $publishCommentModel,  
26 - contentDetailData: $contentDetailData,  
27 - dialogOffsetY: $dialogOffsetY,  
28 - showCommentList: $showCommentList,  
29 - windowWidth: this.windowWidth,  
30 - windowHeight: this.windowHeight  
31 - }),  
32 - autoCancel: false,  
33 - customStyle: true,  
34 - alignment: DialogAlignment.Bottom,  
35 - // onWillDismiss: (dismissDialogAction: DismissDialogAction) => {  
36 - // this.showCommentList = false  
37 - // dismissDialogAction.dismiss()  
38 - // },  
39 - // openAnimation: { duration: 0 },  
40 - // closeAnimation: { duration: 0 },  
41 - })  
42 13
43 - /**  
44 - * 问题:弹窗从底部到上动画无法添加  
45 - */ 14 + @State @Watch("innerShowCommentChange") innerShowComment: boolean = false
46 15
47 showCommentListChange(val: boolean) { 16 showCommentListChange(val: boolean) {
48 if (this.showCommentList && this.index === this.currentIndex) { 17 if (this.showCommentList && this.index === this.currentIndex) {
49 - this.dialogController.open()  
50 - console.log('open')  
51 - // animateTo({ duration: 10000, expectedFrameRateRange: { min: 60, max: 60, expected: 60 } }, () => {  
52 - // this.dialogOffsetY = 500  
53 - // this.modifier.invalidate()  
54 - // }) 18 + this.innerShowComment = true
55 } else { 19 } else {
56 - this.dialogController.close()  
57 - console.log('close') 20 + this.innerShowComment = false
58 } 21 }
59 } 22 }
60 23
61 - build() { 24 + innerShowCommentChange() {
  25 + this.showCommentList = this.innerShowComment
62 } 26 }
63 -}  
64 -  
65 -@CustomDialog  
66 -export struct DetailDialog {  
67 - controller: CustomDialogController  
68 - @Link publishCommentModel: publishCommentModel  
69 - @Link dialogOffsetY: number  
70 - @Link contentDetailData: ContentDetailDTO  
71 - @Link showCommentList: boolean  
72 - @Prop windowWidth: number  
73 - @Prop windowHeight: number  
74 27
75 build() { 28 build() {
76 - Column() {  
77 - CommentComponent({  
78 - publishCommentModel: this.publishCommentModel,  
79 - showCloseIcon: true,  
80 - fixedHeightMode: true,  
81 - onCloseClick: () => {  
82 - console.log('onCloseClick')  
83 - this.showCommentList = false  
84 - this.controller.close()  
85 - // setTimeout(() => {  
86 - //  
87 - // }, 1000)  
88 -  
89 - }  
90 - }).layoutWeight(1)  
91 -  
92 - OperRowListView({  
93 - componentType: 4,  
94 - pageComponentType: 8,  
95 - showBackIcon: false,  
96 - operationButtonList: ['comment', 'like', 'collect', 'share'], 29 + CommentListDialogView({
  30 + showCommentList: this.innerShowComment,
97 contentDetailData: this.contentDetailData, 31 contentDetailData: this.contentDetailData,
98 - publishCommentModel: this.publishCommentModel,  
99 - showCommentIcon: true,  
100 - styleType: 1,  
101 - onBack: () => {  
102 - WindowModel.shared.setWindowLayoutFullScreen(false)  
103 - WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#000000', }) 32 + pageInfo: this.fakePageInfo,
  33 + onClose: () => {
  34 + this.showCommentList = false
104 } 35 }
105 }) 36 })
106 } 37 }
107 - .height(this.windowHeight - this.windowWidth * 9 / 16 + 'px')  
108 - // .margin({ top: this.dialogOffsetY + 'px' })  
109 - .zIndex(1000)  
110 - .backgroundColor(Color.White)  
111 - }  
112 } 38 }
@@ -2,15 +2,11 @@ import { Logger, EmitterEventId, EmitterUtils, DateTimeUtils,CustomToast, String @@ -2,15 +2,11 @@ import { Logger, EmitterEventId, EmitterUtils, DateTimeUtils,CustomToast, String
2 import router from '@ohos.router' 2 import router from '@ohos.router'
3 import { LoginViewModel } from './LoginViewModel' 3 import { LoginViewModel } from './LoginViewModel'
4 import { LoginInputComponent } from './LoginInputComponent' 4 import { LoginInputComponent } from './LoginInputComponent'
5 -import { ErrorToastUtils, SPHelper } from 'wdKit'  
6 import { WDRouterPage } from 'wdRouter/src/main/ets/router/WDRouterPage'; 5 import { WDRouterPage } from 'wdRouter/src/main/ets/router/WDRouterPage';
7 import { WDRouterRule } from 'wdRouter/src/main/ets/router/WDRouterRule'; 6 import { WDRouterRule } from 'wdRouter/src/main/ets/router/WDRouterRule';
8 import { Params } from '../../../../../../../commons/wdRouter/oh_modules/wdBean/src/main/ets/bean/content/Params' 7 import { Params } from '../../../../../../../commons/wdRouter/oh_modules/wdBean/src/main/ets/bean/content/Params'
9 import {InterestsHobbiesModel} from '../../../../../../../products/phone/src/main/ets/pages/viewModel/InterestsHobbiesModel' 8 import {InterestsHobbiesModel} from '../../../../../../../products/phone/src/main/ets/pages/viewModel/InterestsHobbiesModel'
10 -import HuaweiAuth from '../../utils/HuaweiAuth'  
11 -import { loginComponentManager, LoginWithHuaweiIDButton } from '@hms.core.account.LoginComponent'  
12 -import { BusinessError } from '@ohos.base'  
13 -import { TrackingPageBrowse, TrackConstants } from 'wdTracking/Index' 9 +import { TrackingPageBrowse, TrackConstants, TrackingButton, ParamType, Tracking } from 'wdTracking/Index'
14 10
15 @Extend(Row) 11 @Extend(Row)
16 function otherStyle() { 12 function otherStyle() {
@@ -43,7 +39,6 @@ struct LoginPage { @@ -43,7 +39,6 @@ struct LoginPage {
43 @State isSubmit: boolean = false 39 @State isSubmit: boolean = false
44 @State checkCodePage: boolean = true //判断是否是验证码页面 默认验证码登录 40 @State checkCodePage: boolean = true //判断是否是验证码页面 默认验证码登录
45 @State passwordSwitch: boolean = true //密码显示 41 @State passwordSwitch: boolean = true //密码显示
46 - // @State isPasswordSubmit: boolean = false //账户密码状态 是否出发登录  
47 lastTime: number = 0 42 lastTime: number = 0
48 @State codeStateSuccess:boolean=false 43 @State codeStateSuccess:boolean=false
49 @State toastText:string = "" 44 @State toastText:string = ""
@@ -64,6 +59,7 @@ struct LoginPage { @@ -64,6 +59,7 @@ struct LoginPage {
64 onCodeSend() { 59 onCodeSend() {
65 Logger.debug(TAG, "isCodeSend:" + this.isCodeSend + "") 60 Logger.debug(TAG, "isCodeSend:" + this.isCodeSend + "")
66 if (this.isCodeSend) { 61 if (this.isCodeSend) {
  62 + TrackingButton.click("loginPageGetVerificationCode",TrackConstants.PageName.Phone_Login_Page,TrackConstants.PageName.Phone_Login_Page)
67 this.sendVerifyCode() 63 this.sendVerifyCode()
68 } 64 }
69 } 65 }
@@ -81,8 +77,13 @@ struct LoginPage { @@ -81,8 +77,13 @@ struct LoginPage {
81 this.pageHideTime = DateTimeUtils.getTimeStamp() 77 this.pageHideTime = DateTimeUtils.getTimeStamp()
82 let duration = 0 78 let duration = 0
83 duration = Math.floor((this.pageHideTime - this.pageShowTime)/1000) 79 duration = Math.floor((this.pageHideTime - this.pageShowTime)/1000)
  80 +
  81 + if(this.checkCodePage){
  82 + TrackingPageBrowse.trackCommonPageExposureEnd(TrackConstants.PageName.Phone_Login_Page,TrackConstants.PageName.Phone_Login_Page,duration)
  83 + }else{
84 TrackingPageBrowse.trackCommonPageExposureEnd(TrackConstants.PageName.Login_Page,TrackConstants.PageName.Login_Page,duration) 84 TrackingPageBrowse.trackCommonPageExposureEnd(TrackConstants.PageName.Login_Page,TrackConstants.PageName.Login_Page,duration)
85 } 85 }
  86 + }
86 87
87 build() { 88 build() {
88 Stack() { 89 Stack() {
@@ -96,7 +97,6 @@ struct LoginPage { @@ -96,7 +97,6 @@ struct LoginPage {
96 .margin({ top: 78 }) 97 .margin({ top: 78 })
97 .align(Alignment.Center) 98 .align(Alignment.Center)
98 99
99 - if (this.checkCodePage) {  
100 LoginInputComponent({ 100 LoginInputComponent({
101 phoneContent: $phoneContent, 101 phoneContent: $phoneContent,
102 codeContent: $codeContent, 102 codeContent: $codeContent,
@@ -105,11 +105,8 @@ struct LoginPage { @@ -105,11 +105,8 @@ struct LoginPage {
105 codeStateSuccess:$codeStateSuccess, 105 codeStateSuccess:$codeStateSuccess,
106 protocolState:this.protocolState, 106 protocolState:this.protocolState,
107 isNeedProtocol:true 107 isNeedProtocol:true
108 - })  
109 - } else { 108 + }).visibility(this.checkCodePage ? Visibility.Visible : Visibility.None)
110 this.addPassword() 109 this.addPassword()
111 - }  
112 -  
113 110
114 Row() { 111 Row() {
115 Image(this.protocolState ? $r('app.media.login_checkbox_select') : $r('app.media.login_checkbox_unselected')) 112 Image(this.protocolState ? $r('app.media.login_checkbox_select') : $r('app.media.login_checkbox_unselected'))
@@ -122,11 +119,21 @@ struct LoginPage { @@ -122,11 +119,21 @@ struct LoginPage {
122 Text() { 119 Text() {
123 Span("我已阅读并同意").fontColor("#999999").fontSize(12) 120 Span("我已阅读并同意").fontColor("#999999").fontSize(12)
124 Span("《用户协议》").fontColor("#ED2800").fontSize(12).onClick(() => { 121 Span("《用户协议》").fontColor("#ED2800").fontSize(12).onClick(() => {
  122 + if(this.checkCodePage){
  123 + TrackingButton.click("loginPageUserAgreement",TrackConstants.PageName.Phone_Login_Page,TrackConstants.PageName.Phone_Login_Page)
  124 + }else{
  125 + TrackingButton.click("loginPageUserAgreement",TrackConstants.PageName.Login_Page,TrackConstants.PageName.Login_Page)
  126 + }
125 let bean = { contentID: "1", pageID: "" } as Params 127 let bean = { contentID: "1", pageID: "" } as Params
126 WDRouterRule.jumpWithPage(WDRouterPage.loginProtocolPage, bean) 128 WDRouterRule.jumpWithPage(WDRouterPage.loginProtocolPage, bean)
127 }) 129 })
128 Span("及").fontColor("#999999").fontSize(12) 130 Span("及").fontColor("#999999").fontSize(12)
129 Span("《隐私政策》").fontColor("#ED2800").fontSize(12).onClick(() => { 131 Span("《隐私政策》").fontColor("#ED2800").fontSize(12).onClick(() => {
  132 + if(this.checkCodePage){
  133 + TrackingButton.click("loginPagePrivacyAgreement",TrackConstants.PageName.Phone_Login_Page,TrackConstants.PageName.Phone_Login_Page)
  134 + }else{
  135 + TrackingButton.click("loginPagePrivacyAgreement",TrackConstants.PageName.Login_Page,TrackConstants.PageName.Login_Page)
  136 + }
130 let bean = { contentID: "2", pageID: "" } as Params 137 let bean = { contentID: "2", pageID: "" } as Params
131 WDRouterRule.jumpWithPage(WDRouterPage.loginProtocolPage, bean) 138 WDRouterRule.jumpWithPage(WDRouterPage.loginProtocolPage, bean)
132 }) 139 })
@@ -137,9 +144,10 @@ struct LoginPage { @@ -137,9 +144,10 @@ struct LoginPage {
137 Text("登录") 144 Text("登录")
138 .borderRadius(4) 145 .borderRadius(4)
139 .fontColor(this.isSubmit ? "#FFFFFFFF" : "#66FFFFFF") 146 .fontColor(this.isSubmit ? "#FFFFFFFF" : "#66FFFFFF")
140 - .fontSize(18)  
141 - .fontWeight(FontWeight.Medium) 147 + .fontSize("31lpx")
  148 + .fontWeight(400)
142 .margin({ top: 20 }) 149 .margin({ top: 20 })
  150 + .lineHeight("50lpx")
143 .height(44) 151 .height(44)
144 .textAlign(TextAlign.Center) 152 .textAlign(TextAlign.Center)
145 .width("100%") 153 .width("100%")
@@ -160,9 +168,14 @@ struct LoginPage { @@ -160,9 +168,14 @@ struct LoginPage {
160 168
161 169
162 if (!this.checkCodePage) { 170 if (!this.checkCodePage) {
163 - Text('忘记密码').fontColor('#666666').fontSize(14).margin({ top: 16 }) 171 + Text('忘记密码')
  172 + .fontColor('#666666')
  173 + .fontSize("31lpx")
  174 + .fontWeight(400)
  175 + .lineHeight("38lpx")
  176 + .margin({ top: 16 })
164 .onClick(() => { 177 .onClick(() => {
165 - // router.pushUrl({ url: 'pages/login/ForgetPasswordPage' }) 178 + TrackingButton.click("loginPageForgotPassword",TrackConstants.PageName.Login_Page,TrackConstants.PageName.Login_Page)
166 if(StringUtils.isNotEmpty(this.accountContent) && StringUtils.photoMatch(this.accountContent)){ 179 if(StringUtils.isNotEmpty(this.accountContent) && StringUtils.photoMatch(this.accountContent)){
167 let pageType = { 'pageType': 0, 'phone': Number(this.accountContent) } as Record<string, number>; 180 let pageType = { 'pageType': 0, 'phone': Number(this.accountContent) } as Record<string, number>;
168 WDRouterRule.jumpWithPage(WDRouterPage.forgetPasswordPage, pageType) 181 WDRouterRule.jumpWithPage(WDRouterPage.forgetPasswordPage, pageType)
@@ -228,11 +241,7 @@ struct LoginPage { @@ -228,11 +241,7 @@ struct LoginPage {
228 }) 241 })
229 242
230 RelativeContainer() { 243 RelativeContainer() {
231 - // if (this.passwordSwitch) {  
232 this.addPasswordInputLayout() 244 this.addPasswordInputLayout()
233 - // } else {  
234 - // this.addPasswordInputLayout()  
235 - // }  
236 245
237 Image(this.passwordSwitch ? $r('app.media.login_password_off') : $r('app.media.login_password_on')) 246 Image(this.passwordSwitch ? $r('app.media.login_password_off') : $r('app.media.login_password_on'))
238 .onClick(() => { 247 .onClick(() => {
@@ -251,6 +260,7 @@ struct LoginPage { @@ -251,6 +260,7 @@ struct LoginPage {
251 .height(48) 260 .height(48)
252 .width('100%') 261 .width('100%')
253 }.padding({ left: 25, right: 25 }).width('100%').margin({ top: 36 }) 262 }.padding({ left: 25, right: 25 }).width('100%').margin({ top: 36 })
  263 + .visibility(this.checkCodePage ? Visibility.None : Visibility.Visible)
254 264
255 } 265 }
256 266
@@ -289,24 +299,6 @@ struct LoginPage { @@ -289,24 +299,6 @@ struct LoginPage {
289 }.width('100%') 299 }.width('100%')
290 300
291 Row() { 301 Row() {
292 - /*Row() {  
293 - Image($r('app.media.login_wx'))  
294 - .width(20).height(20).onClick(()=>{  
295 - ErrorToastUtils.ErrorToast.showToast(ErrorToastUtils.ErrorType.NET_CORE_NO_NETWORK)  
296 - })  
297 - }.backgroundImage($r('app.media.login_other_left'), ImageRepeat.NoRepeat)  
298 - .otherStyle()  
299 -  
300 - Row() {  
301 - Image($r('app.media.login_qq')).size({ width: 20, height: 20 })  
302 - }.backgroundImage($r('app.media.login_other_middle'), ImageRepeat.NoRepeat)  
303 - .otherStyle()  
304 -  
305 - Row() {  
306 - Image($r('app.media.login_wb')).size({ width: 20, height: 20 })  
307 - }.backgroundImage($r('app.media.login_other_middle'), ImageRepeat.NoRepeat)  
308 - .otherStyle()*/  
309 -  
310 Row() { 302 Row() {
311 Image(this.checkCodePage ? $r('app.media.login_qt') : $r('app.media.login_other_password')) 303 Image(this.checkCodePage ? $r('app.media.login_qt') : $r('app.media.login_other_password'))
312 .size({ width: "35lpx", height: "35lpx" }) 304 .size({ width: "35lpx", height: "35lpx" })
@@ -320,10 +312,19 @@ struct LoginPage { @@ -320,10 +312,19 @@ struct LoginPage {
320 .lineHeight("38lpx") 312 .lineHeight("38lpx")
321 } 313 }
322 .onClick(() => { 314 .onClick(() => {
  315 + this.onPageHide()
  316 +
  317 + if(this.checkCodePage){
  318 + trackTypeClick(0,TrackConstants.PageName.Phone_Login_Page)
  319 + }else{
  320 + trackTypeClick(6,TrackConstants.PageName.Login_Page)
  321 + }
  322 +
323 this.updateAccount() 323 this.updateAccount()
324 - this.checkCodePage = !this.checkCodePage; 324 + this.checkCodePage = !this.checkCodePage
325 this.passwordSwitch = true 325 this.passwordSwitch = true
326 this.isSubmit = false 326 this.isSubmit = false
  327 + this.pageShowTime = DateTimeUtils.getTimeStamp()
327 }).width('100%') 328 }).width('100%')
328 .alignItems(VerticalAlign.Center) 329 .alignItems(VerticalAlign.Center)
329 .justifyContent(FlexAlign.Center) 330 .justifyContent(FlexAlign.Center)
@@ -374,6 +375,7 @@ struct LoginPage { @@ -374,6 +375,7 @@ struct LoginPage {
374 requestLogin() { 375 requestLogin() {
375 Logger.debug('LoginViewModel', "requestLogin") 376 Logger.debug('LoginViewModel', "requestLogin")
376 if (this.checkCodePage) { 377 if (this.checkCodePage) {
  378 + TrackingButton.click("loginPageLoginButton",TrackConstants.PageName.Phone_Login_Page,TrackConstants.PageName.Phone_Login_Page)
377 this.loginViewModel.appLogin(this.phoneContent, 2, this.codeContent).then((data) => { 379 this.loginViewModel.appLogin(this.phoneContent, 2, this.codeContent).then((data) => {
378 Logger.debug(TAG, "requestLogin: " + data.jwtToken) 380 Logger.debug(TAG, "requestLogin: " + data.jwtToken)
379 ///同步兴趣tag 381 ///同步兴趣tag
@@ -385,6 +387,7 @@ struct LoginPage { @@ -385,6 +387,7 @@ struct LoginPage {
385 this.showToastTip(error) 387 this.showToastTip(error)
386 }) 388 })
387 } else { 389 } else {
  390 + TrackingButton.click("loginPageLoginButton",TrackConstants.PageName.Login_Page,TrackConstants.PageName.Login_Page)
388 this.loginViewModel.appLoginByPassword(this.accountContent, 0, this.passwordContent, "").then((data) => { 391 this.loginViewModel.appLoginByPassword(this.accountContent, 0, this.passwordContent, "").then((data) => {
389 Logger.debug(TAG, "requestLogin: " + data.jwtToken) 392 Logger.debug(TAG, "requestLogin: " + data.jwtToken)
390 this.showToastTip('登录成功') 393 this.showToastTip('登录成功')
@@ -588,3 +591,12 @@ struct ProtocolComponent { @@ -588,3 +591,12 @@ struct ProtocolComponent {
588 591
589 } 592 }
590 } 593 }
  594 +
  595 +function trackTypeClick(typeValue: number,pageId: string){
  596 + let params: ParamType = {}
  597 + params["loginType"] = typeValue
  598 + params["pageName"] = pageId
  599 + params["pageId"] = pageId
  600 +
  601 + Tracking.event("login_type_click", params)
  602 +}
@@ -137,7 +137,6 @@ export class WDAliPlayerController { @@ -137,7 +137,6 @@ export class WDAliPlayerController {
137 onStateChanged: (status: number) => { 137 onStateChanged: (status: number) => {
138 this.avPlayerStatus = status 138 this.avPlayerStatus = status
139 Logger.debug(TAG, "status update:" + `${this.getStatusStringWith(status)}`) 139 Logger.debug(TAG, "status update:" + `${this.getStatusStringWith(status)}`)
140 -  
141 switch (status) { 140 switch (status) {
142 case initalized: { 141 case initalized: {
143 //this.avPlayer?.prepare(); 142 //this.avPlayer?.prepare();
@@ -196,8 +196,8 @@ struct LaunchAdvertisingPage { @@ -196,8 +196,8 @@ struct LaunchAdvertisingPage {
196 contentTrackingDict(){ 196 contentTrackingDict(){
197 this.pageParam = { 197 this.pageParam = {
198 'adType':'0', 198 'adType':'0',
199 - 'adId':this.model.launchAdInfo[0].matInfo.id.toString(),  
200 - 'adName':this.model.launchAdInfo[0].matInfo.advTitle, 199 + 'adId':this.model.launchAdInfo[0]?.matInfo.id.toString(),
  200 + 'adName':this.model.launchAdInfo[0]?.matInfo.advTitle,
201 'regionName':'0' 201 'regionName':'0'
202 } 202 }
203 } 203 }
@@ -4,7 +4,7 @@ import { EmitterEventId, EmitterUtils, Logger, StringUtils } from 'wdKit'; @@ -4,7 +4,7 @@ import { EmitterEventId, EmitterUtils, Logger, StringUtils } from 'wdKit';
4 import { HttpUtils } from 'wdNetwork/Index'; 4 import { HttpUtils } from 'wdNetwork/Index';
5 import HomeChannelUtils, { AssignChannelParam } from 'wdRouter/Index'; 5 import HomeChannelUtils, { AssignChannelParam } from 'wdRouter/Index';
6 import { MinePageComponent } from 'wdComponent/src/main/ets/components/page/MinePageComponent'; 6 import { MinePageComponent } from 'wdComponent/src/main/ets/components/page/MinePageComponent';
7 -import { CompUtils, TopNavigationComponent } from 'wdComponent/Index'; 7 +import { CompUtils, TopNavigationComponent, TopNavigationComponentNew } from 'wdComponent/Index';
8 import { VideoChannelPage } from './VideoChannelPage'; 8 import { VideoChannelPage } from './VideoChannelPage';
9 import ChannelViewModel from 'wdComponent/src/main/ets/viewmodel/ChannelViewModel'; 9 import ChannelViewModel from 'wdComponent/src/main/ets/viewmodel/ChannelViewModel';
10 10
@@ -17,6 +17,7 @@ let storage = LocalStorage.getShared(); @@ -17,6 +17,7 @@ let storage = LocalStorage.getShared();
17 @Entry(storage) 17 @Entry(storage)
18 @Component 18 @Component
19 export struct BottomNavigationComponent { 19 export struct BottomNavigationComponent {
  20 + private isNewTopPage = true // TODO 顶导重构页面开关,false,则用原来的顶导
20 @Provide bottomRectHeight: number = 0 21 @Provide bottomRectHeight: number = 0
21 @Provide topRectHeight: number = 0 22 @Provide topRectHeight: number = 0
22 @Provide isLayoutFullScreen: boolean = false 23 @Provide isLayoutFullScreen: boolean = false
@@ -82,6 +83,17 @@ export struct BottomNavigationComponent { @@ -82,6 +83,17 @@ export struct BottomNavigationComponent {
82 autoRefresh: this.autoRefresh 83 autoRefresh: this.autoRefresh
83 }) 84 })
84 } else { 85 } else {
  86 + if (this.isNewTopPage) {
  87 + TopNavigationComponentNew({
  88 + groupId: navItem.id,
  89 + topNavList: navItem.topNavChannelList.filter(item => item.channelId != 2073),
  90 + _currentNavIndex: $currentNavIndex,
  91 + bottomNavIndex: index,
  92 + currentBottomNavName: navItem.name,
  93 + assignChannel: this.assignChannel,
  94 + autoRefresh: this.autoRefresh
  95 + })
  96 + } else {
85 TopNavigationComponent({ 97 TopNavigationComponent({
86 groupId: navItem.id, 98 groupId: navItem.id,
87 topNavList: navItem.topNavChannelList.filter(item => item.channelId != 2073), 99 topNavList: navItem.topNavChannelList.filter(item => item.channelId != 2073),
@@ -92,6 +104,8 @@ export struct BottomNavigationComponent { @@ -92,6 +104,8 @@ export struct BottomNavigationComponent {
92 autoRefresh: this.autoRefresh 104 autoRefresh: this.autoRefresh
93 }) 105 })
94 } 106 }
  107 +
  108 + }
95 } 109 }
96 .tabBar(this.tabBarBuilder(navItem, index)) 110 .tabBar(this.tabBarBuilder(navItem, index))
97 111
@@ -99,7 +99,7 @@ export struct MultiPictureDetailPageComponent { @@ -99,7 +99,7 @@ export struct MultiPictureDetailPageComponent {
99 index: $index, 99 index: $index,
100 currentIndex: $currentIndex, 100 currentIndex: $currentIndex,
101 showCommentList: $showCommentList, 101 showCommentList: $showCommentList,
102 - publishCommentModel: $publishCommentModel 102 + // publishCommentModel: $publishCommentModel
103 }) 103 })
104 104
105 } 105 }