yumaochao
@@ -26,14 +26,11 @@ export struct CardSourceInfo { @@ -26,14 +26,11 @@ export struct CardSourceInfo {
26 let flag: boolean = false; 26 let flag: boolean = false;
27 if (curRouter === 'MainPage') { 27 if (curRouter === 'MainPage') {
28 if (this.isTwoDaysAgo(publishTime)) { 28 if (this.isTwoDaysAgo(publishTime)) {
29 - console.log('curRouter 01')  
30 flag = false 29 flag = false
31 } else { 30 } else {
32 - console.log('curRouter 02')  
33 flag = true; 31 flag = true;
34 } 32 }
35 } else { 33 } else {
36 - console.log('curRouter 03')  
37 flag = true; 34 flag = true;
38 } 35 }
39 return flag; 36 return flag;
@@ -80,9 +80,8 @@ export struct RmhTitle { @@ -80,9 +80,8 @@ export struct RmhTitle {
80 80
81 async aboutToAppear(): Promise<void> { 81 async aboutToAppear(): Promise<void> {
82 this.getBatchAttentionStatus() 82 this.getBatchAttentionStatus()
83 -  
84 - let page = router.getState();  
85 - if (page.path.includes('/page/PeopleShipHomePage') || page.path.includes('/pages/MainPage')) { 83 + const curRouter = router.getState().name;
  84 + if (curRouter === 'MainPage') {
86 this.hideTime = true; 85 this.hideTime = true;
87 } 86 }
88 87
1 -import ArrayList from '@ohos.util.ArrayList'  
2 import { MineSettingComponent } from '../setting/MineSettingComponent'; 1 import { MineSettingComponent } from '../setting/MineSettingComponent';
3 import { AccountAndSecurityLayout } from '../setting/AccountAndSecurityLayout'; 2 import { AccountAndSecurityLayout } from '../setting/AccountAndSecurityLayout';
4 import router from '@ohos.router'; 3 import router from '@ohos.router';
5 -import { Action, Params } from 'wdBean'; 4 +import { Params } from 'wdBean';
6 import { DateTimeUtils } from 'wdKit/Index'; 5 import { DateTimeUtils } from 'wdKit/Index';
7 -import { TrackingPageBrowse, TrackConstants, TrackingButton } from 'wdTracking/Index'; 6 +import { TrackingPageBrowse, TrackConstants } from 'wdTracking/Index';
8 7
9 @Entry 8 @Entry
10 @Component 9 @Component
11 struct SettingPage { 10 struct SettingPage {
12 - @State message: string = 'Hello World 02'  
13 @State pageType: string = 'mainSetting'; 11 @State pageType: string = 'mainSetting';
14 @State params:Params = router.getParams() as Params; 12 @State params:Params = router.getParams() as Params;
15 @State enterActivityTime:number = 0; 13 @State enterActivityTime:number = 0;
  14 + @Provide pageShow: number = -1
  15 + @Provide pageHide: number = -1
16 16
17 pageShowSettingTime:number = 0; 17 pageShowSettingTime:number = 0;
18 pageHideSettingTime:number = 0; 18 pageHideSettingTime:number = 0;
19 - pageShowAccountTime:number = 0;  
20 - pageHideAccountTime:number = 0; 19 +
21 20
22 onPageShow() { 21 onPageShow() {
  22 + this.pageShow = Math.random()
  23 +
23 this.pageType = this.params.pageID; 24 this.pageType = this.params.pageID;
24 this.enterActivityTime = DateTimeUtils.getTimeStamp() 25 this.enterActivityTime = DateTimeUtils.getTimeStamp()
25 if (this.pageType == 'mainSetting'){ 26 if (this.pageType == 'mainSetting'){
26 this.pageShowSettingTime = DateTimeUtils.getTimeStamp() 27 this.pageShowSettingTime = DateTimeUtils.getTimeStamp()
27 - }else{  
28 - this.pageShowAccountTime = DateTimeUtils.getTimeStamp()  
29 } 28 }
30 } 29 }
31 30
32 onPageHide(): void { 31 onPageHide(): void {
  32 + this.pageHide = Math.random()
33 if (this.pageType == 'mainSetting'){ 33 if (this.pageType == 'mainSetting'){
34 this.pageHideSettingTime = DateTimeUtils.getTimeStamp() 34 this.pageHideSettingTime = DateTimeUtils.getTimeStamp()
35 - }else{  
36 - this.pageHideAccountTime = DateTimeUtils.getTimeStamp()  
37 } 35 }
38 36
39 let duration = 0 37 let duration = 0
40 if(this.pageType == 'mainSetting'){ 38 if(this.pageType == 'mainSetting'){
41 duration = Math.floor((this.pageHideSettingTime - this.pageShowSettingTime)/1000) 39 duration = Math.floor((this.pageHideSettingTime - this.pageShowSettingTime)/1000)
42 - }else{  
43 - duration = Math.floor((this.pageHideAccountTime - this.pageShowAccountTime)/1000)  
44 } 40 }
45 if(this.pageType == 'mainSetting'){ 41 if(this.pageType == 'mainSetting'){
46 TrackingPageBrowse.trackCommonPageExposureEnd(TrackConstants.PageName.Setting,TrackConstants.PageName.Setting,duration) 42 TrackingPageBrowse.trackCommonPageExposureEnd(TrackConstants.PageName.Setting,TrackConstants.PageName.Setting,duration)
47 - }else{  
48 - TrackingPageBrowse.trackCommonPageExposureEnd(TrackConstants.PageName.Account_Management,TrackConstants.PageName.Account_Management,duration)  
49 } 43 }
50 } 44 }
51 45
1 import { SpConstants } from 'wdConstant'; 1 import { SpConstants } from 'wdConstant';
2 -import { Logger, SPHelper, ToastUtils, EmitterEventId, EmitterUtils } from 'wdKit'; 2 +import { Logger, SPHelper, ToastUtils, EmitterEventId, EmitterUtils, DateTimeUtils } from 'wdKit';
3 import {MineMainSettingFunctionItem} from '../../viewmodel/MineMainSettingFunctionItem'; 3 import {MineMainSettingFunctionItem} from '../../viewmodel/MineMainSettingFunctionItem';
4 import MineSettingDatasModel from '../../model/MineSettingDatasModel'; 4 import MineSettingDatasModel from '../../model/MineSettingDatasModel';
5 import router from '@ohos.router'; 5 import router from '@ohos.router';
@@ -11,7 +11,7 @@ import { LogoutViewModel } from '../../viewmodel/LogoutViewModel'; @@ -11,7 +11,7 @@ import { LogoutViewModel } from '../../viewmodel/LogoutViewModel';
11 import { CustomLogoutDialog } from './CustomLogoutDialog'; 11 import { CustomLogoutDialog } from './CustomLogoutDialog';
12 import { emitter } from '@kit.BasicServicesKit'; 12 import { emitter } from '@kit.BasicServicesKit';
13 import { ConfirmLogoutDialog } from './ConfirmLogoutDialog'; 13 import { ConfirmLogoutDialog } from './ConfirmLogoutDialog';
14 -import { TrackingButton, TrackConstants } from 'wdTracking/Index'; 14 +import { TrackingButton, TrackConstants, TrackingPageBrowse } from 'wdTracking/Index';
15 export { SettingPasswordParams } from "wdLogin" 15 export { SettingPasswordParams } from "wdLogin"
16 16
17 @Component 17 @Component
@@ -22,8 +22,37 @@ export struct AccountAndSecurityLayout { @@ -22,8 +22,37 @@ export struct AccountAndSecurityLayout {
22 @State protocolState: boolean = false //协议勾选状态 22 @State protocolState: boolean = false //协议勾选状态
23 @State isAccountPage: boolean = true 23 @State isAccountPage: boolean = true
24 @State ifSetPassword: boolean = false //是否设置过密码 24 @State ifSetPassword: boolean = false //是否设置过密码
  25 + @Consume pageShow :number
  26 + @Consume @Watch('pageHideForUpdateData') pageHide :number
25 27
26 @Watch("checkSetPassword") @Prop enterActivityTime:number = 0; 28 @Watch("checkSetPassword") @Prop enterActivityTime:number = 0;
  29 + logoutLayoutShowTime:number = 0;
  30 + logoutLayoutHideTime:number = 0;
  31 + pageShowAccountTime:number = 0;
  32 + pageHideAccountTime:number = 0;
  33 +
  34 + //注销账户 浏览埋点
  35 + logoutLayoutHide(){
  36 + this.logoutLayoutHideTime = DateTimeUtils.getTimeStamp()
  37 + let duration = 0
  38 + duration = Math.floor((this.logoutLayoutHideTime - this.logoutLayoutShowTime)/1000)
  39 + TrackingPageBrowse.trackCommonPageExposureEnd(TrackConstants.PageName.Cancel_Account,TrackConstants.PageName.Cancel_Account,duration)
  40 + }
  41 + //账户管理 浏览埋点
  42 + logoutLayoutHide2(){
  43 + this.pageHideAccountTime = DateTimeUtils.getTimeStamp()
  44 + let duration = 0
  45 + duration = Math.floor((this.pageHideAccountTime - this.pageShowAccountTime)/1000)
  46 + TrackingPageBrowse.trackCommonPageExposureEnd(TrackConstants.PageName.Account_Management,TrackConstants.PageName.Account_Management,duration)
  47 + }
  48 +
  49 + pageHideForUpdateData(){
  50 + if(!this.isAccountPage){
  51 + this.logoutLayoutHide()
  52 + }else{
  53 + this.logoutLayoutHide2()
  54 + }
  55 + }
27 56
28 logoutViewModel = new LogoutViewModel() 57 logoutViewModel = new LogoutViewModel()
29 dialogController: CustomDialogController = new CustomDialogController({ 58 dialogController: CustomDialogController = new CustomDialogController({
@@ -57,6 +86,7 @@ export struct AccountAndSecurityLayout { @@ -57,6 +86,7 @@ export struct AccountAndSecurityLayout {
57 86
58 87
59 aboutToAppear() { 88 aboutToAppear() {
  89 + this.pageShowAccountTime = DateTimeUtils.getTimeStamp()
60 // 获取设置页面数据 90 // 获取设置页面数据
61 this.getAccountAndSecurityData() 91 this.getAccountAndSecurityData()
62 this.addEmitEvent() 92 this.addEmitEvent()
@@ -189,7 +219,7 @@ export struct AccountAndSecurityLayout { @@ -189,7 +219,7 @@ export struct AccountAndSecurityLayout {
189 }else if (index == 3) { 219 }else if (index == 3) {
190 trackButtonClick("accountManagementPageAccountCancellation") 220 trackButtonClick("accountManagementPageAccountCancellation")
191 this.isAccountPage=false 221 this.isAccountPage=false
192 - // WDRouterRule.jumpWithPage(WDRouterPage.forgetPasswordPage, pageType) 222 + this.logoutLayoutShowTime = DateTimeUtils.getTimeStamp()
193 } 223 }
194 }) 224 })
195 225
@@ -253,6 +283,8 @@ export struct AccountAndSecurityLayout { @@ -253,6 +283,8 @@ export struct AccountAndSecurityLayout {
253 }) 283 })
254 .onClick(() => { 284 .onClick(() => {
255 this.isAccountPage=true 285 this.isAccountPage=true
  286 + this.pageShowAccountTime = DateTimeUtils.getTimeStamp()
  287 + this.logoutLayoutHide()
256 this.protocolState=false 288 this.protocolState=false
257 }) 289 })
258 .id('backImage') 290 .id('backImage')
@@ -330,6 +362,7 @@ export struct AccountAndSecurityLayout { @@ -330,6 +362,7 @@ export struct AccountAndSecurityLayout {
330 Text() { 362 Text() {
331 Span("我已阅读并同意").fontColor("#999999").fontSize(12) 363 Span("我已阅读并同意").fontColor("#999999").fontSize(12)
332 Span("《用户注销协议》").fontColor("#ED2800").fontSize(12).onClick(() => { 364 Span("《用户注销协议》").fontColor("#ED2800").fontSize(12).onClick(() => {
  365 + TrackingButton.click("cancelAccountPageUserLogoffAgreement",TrackConstants.PageName.Cancel_Account,TrackConstants.PageName.Cancel_Account)
333 let bean = { contentID: "3", pageID: "" } as Params 366 let bean = { contentID: "3", pageID: "" } as Params
334 WDRouterRule.jumpWithPage(WDRouterPage.loginProtocolPage, bean) 367 WDRouterRule.jumpWithPage(WDRouterPage.loginProtocolPage, bean)
335 }) 368 })
@@ -351,6 +384,7 @@ export struct AccountAndSecurityLayout { @@ -351,6 +384,7 @@ export struct AccountAndSecurityLayout {
351 if (!this.protocolState) { 384 if (!this.protocolState) {
352 return 385 return
353 } 386 }
  387 + TrackingButton.click("cancelAccountPageconfirmCancelAccount",TrackConstants.PageName.Cancel_Account,TrackConstants.PageName.Cancel_Account)
354 this.dialogController.open() 388 this.dialogController.open()
355 389
356 }) 390 })
@@ -454,6 +488,7 @@ export struct AccountAndSecurityLayout { @@ -454,6 +488,7 @@ export struct AccountAndSecurityLayout {
454 488
455 //注销账号 489 //注销账号
456 requestLogout() { 490 requestLogout() {
  491 + TrackingButton.click("cancelAccountPageCancelAccountSuccess",TrackConstants.PageName.Cancel_Account,TrackConstants.PageName.Cancel_Account)
457 this.logoutViewModel.requestLogout().then(()=>{ 492 this.logoutViewModel.requestLogout().then(()=>{
458 ToastUtils.shortToast("注销成功") 493 ToastUtils.shortToast("注销成功")
459 router.back() 494 router.back()
@@ -22,7 +22,7 @@ interface ILikeStyleResp { @@ -22,7 +22,7 @@ interface ILikeStyleResp {
22 export struct LikeComponent { 22 export struct LikeComponent {
23 @Consume contentDetailData: ContentDetailDTO 23 @Consume contentDetailData: ContentDetailDTO
24 @Prop pageComponentType: number 24 @Prop pageComponentType: number
25 - @State likesStyle: number = this.contentDetailData.likesStyle // 赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空 25 + @State likesStyle: number | string = 1 // 赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空
26 @State likeStatus: boolean = false 26 @State likeStatus: boolean = false
27 viewModel: LikeViewModel = new LikeViewModel() 27 viewModel: LikeViewModel = new LikeViewModel()
28 @Prop @Watch('onDataUpdated') data: Record<string, string> 28 @Prop @Watch('onDataUpdated') data: Record<string, string>
@@ -41,6 +41,14 @@ export struct LikeComponent { @@ -41,6 +41,14 @@ export struct LikeComponent {
41 // this.data['status'] = "1" 41 // this.data['status'] = "1"
42 42
43 aboutToAppear() { 43 aboutToAppear() {
  44 + // 2:竖屏直播页 3:图集 4:横屏直播页
  45 + if(this.pageComponentType == 2 || this.pageComponentType == 4) {
  46 + // 点赞样式 love爱心型 thumb点赞手势 mourning 蜡烛(默哀) pray 祈福
  47 + this.likesStyle = this.contentDetailData?.liveInfo?.likesStyle
  48 + } else {
  49 + // 内容用 点赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空
  50 + this.likesStyle = this.contentDetailData.likesStyle
  51 + }
44 this.onDataUpdated() 52 this.onDataUpdated()
45 } 53 }
46 54
@@ -80,7 +88,7 @@ export struct LikeComponent { @@ -80,7 +88,7 @@ export struct LikeComponent {
80 * 将点赞样式转换为icon 88 * 将点赞样式转换为icon
81 */ 89 */
82 transLikeStyle(): ILikeStyleResp { 90 transLikeStyle(): ILikeStyleResp {
83 - if (this.likesStyle === 1) { 91 + if (this.likesStyle === 1 || this.likesStyle === 'love' || this.likesStyle === 'thumb') {
84 return { 92 return {
85 url: this.likeStatus ? $r(`app.media.ic_like_check`) : 93 url: this.likeStatus ? $r(`app.media.ic_like_check`) :
86 this.styleType == 1 ? 94 this.styleType == 1 ?
@@ -88,12 +96,12 @@ export struct LikeComponent { @@ -88,12 +96,12 @@ export struct LikeComponent {
88 $r(`app.media.ic_like_uncheck`), 96 $r(`app.media.ic_like_uncheck`),
89 name: '赞' 97 name: '赞'
90 } 98 }
91 - } else if (this.likesStyle === 2) { 99 + } else if (this.likesStyle === 2 || this.likesStyle === 'pray') {
92 return { 100 return {
93 url: this.likeStatus ? $r(`app.media.ic_thub_check`) : $r(`app.media.ic_thub_uncheck`), 101 url: this.likeStatus ? $r(`app.media.ic_thub_check`) : $r(`app.media.ic_thub_uncheck`),
94 name: '祈祷' 102 name: '祈祷'
95 } 103 }
96 - } else if (this.likesStyle === 3) { 104 + } else if (this.likesStyle === 3 || this.likesStyle === 'mourning') {
97 return { 105 return {
98 url: this.likeStatus ? $r(`app.media.ic_candle_check`) : 106 url: this.likeStatus ? $r(`app.media.ic_candle_check`) :
99 $r(`app.media.ic_candle_uncheck`), 107 $r(`app.media.ic_candle_uncheck`),
@@ -143,6 +151,7 @@ export struct LikeComponent { @@ -143,6 +151,7 @@ export struct LikeComponent {
143 } 151 }
144 .width(154) 152 .width(154)
145 .height(40) 153 .height(40)
  154 + .visibility(this.likesStyle == 4 || this.likesStyle == 'empty' ? Visibility.None : Visibility.Visible)
146 } 155 }
147 156
148 @Builder 157 @Builder
@@ -160,6 +169,7 @@ export struct LikeComponent { @@ -160,6 +169,7 @@ export struct LikeComponent {
160 .onClick(() => { 169 .onClick(() => {
161 this.clickButtonEvent() 170 this.clickButtonEvent()
162 }) 171 })
  172 + .visibility(this.likesStyle == 4 || this.likesStyle == 'empty' ? Visibility.None : Visibility.Visible)
163 } 173 }
164 174
165 @Builder 175 @Builder
@@ -173,7 +183,10 @@ export struct LikeComponent { @@ -173,7 +183,10 @@ export struct LikeComponent {
173 .onClick(() => { 183 .onClick(() => {
174 this.clickButtonEvent() 184 this.clickButtonEvent()
175 }) 185 })
176 - }.width(24).height(24) 186 + }
  187 + .width(24)
  188 + .height(24)
  189 + .visibility(this.likesStyle == 4 || this.likesStyle == 'empty' ? Visibility.None : Visibility.Visible)
177 } 190 }
178 191
179 @Builder 192 @Builder
@@ -248,6 +261,7 @@ export struct LikeComponent { @@ -248,6 +261,7 @@ export struct LikeComponent {
248 }.width(24).height(24).onClick(() => { 261 }.width(24).height(24).onClick(() => {
249 this.clickButtonEvent() 262 this.clickButtonEvent()
250 }) 263 })
  264 + .visibility(this.likesStyle == 4 || this.likesStyle == 'empty' ? Visibility.None : Visibility.Visible)
251 } 265 }
252 266
253 @Builder 267 @Builder
@@ -284,6 +298,7 @@ export struct LikeComponent { @@ -284,6 +298,7 @@ export struct LikeComponent {
284 } 298 }
285 .width(36) 299 .width(36)
286 .height(42) 300 .height(42)
  301 + .visibility(this.likesStyle == 4 || this.likesStyle == 'empty' ? Visibility.None : Visibility.Visible)
287 302
288 } 303 }
289 304