王士厅
Showing 30 changed files with 477 additions and 72 deletions
@@ -68,6 +68,7 @@ export class WDRouterPage { @@ -68,6 +68,7 @@ export class WDRouterPage {
68 static loginPage = new WDRouterPage("wdLogin", "ets/pages/login/LoginPage"); 68 static loginPage = new WDRouterPage("wdLogin", "ets/pages/login/LoginPage");
69 static oneKeyLoginPage = new WDRouterPage("wdLogin", "ets/pages/login/OneKeyLoginPage"); 69 static oneKeyLoginPage = new WDRouterPage("wdLogin", "ets/pages/login/OneKeyLoginPage");
70 static forgetPasswordPage = new WDRouterPage("wdLogin", "ets/pages/login/ForgetPasswordPage"); 70 static forgetPasswordPage = new WDRouterPage("wdLogin", "ets/pages/login/ForgetPasswordPage");
  71 + static changeBindPhonePage = new WDRouterPage("wdLogin", "ets/pages/login/ChangeBindPhonePage");
71 static modifyPasswordPage = new WDRouterPage("wdLogin", "ets/pages/login/ModifyPasswordPage"); 72 static modifyPasswordPage = new WDRouterPage("wdLogin", "ets/pages/login/ModifyPasswordPage");
72 //我的 预约 73 //我的 预约
73 static appointmentListPage = new WDRouterPage("wdComponent", "ets/components/page/AppointmentListPage"); 74 static appointmentListPage = new WDRouterPage("wdComponent", "ets/components/page/AppointmentListPage");
@@ -11,7 +11,8 @@ import { LiveRoomDataBean } from '../live/LiveRoomDataBean'; @@ -11,7 +11,8 @@ import { LiveRoomDataBean } from '../live/LiveRoomDataBean';
11 11
12 @Observed 12 @Observed
13 export class ContentDTO implements BaseDTO { 13 export class ContentDTO implements BaseDTO {
14 - seoTags?:string; 14 + seoTags: string = '';
  15 + cornerMark:string = '';
15 liveType?: string; // 直播新闻-直播状态 16 liveType?: string; // 直播新闻-直播状态
16 expIds: string = ''; 17 expIds: string = '';
17 itemId: string = ''; 18 itemId: string = '';
@@ -158,6 +159,7 @@ export class ContentDTO implements BaseDTO { @@ -158,6 +159,7 @@ export class ContentDTO implements BaseDTO {
158 content.rmhInfo = old.rmhInfo; 159 content.rmhInfo = old.rmhInfo;
159 content.photoNum = old.photoNum; 160 content.photoNum = old.photoNum;
160 content.corner = old.corner; 161 content.corner = old.corner;
  162 + content.cornerMark = old.cornerMark;
161 content.rmhPlatform = old.rmhPlatform; 163 content.rmhPlatform = old.rmhPlatform;
162 content.newTags = old.newTags; 164 content.newTags = old.newTags;
163 content.titleShow = old.titleShow; 165 content.titleShow = old.titleShow;
@@ -10,6 +10,7 @@ import { ENewspaperPageDialog } from '../dialog/ENewspaperPageDialog'; @@ -10,6 +10,7 @@ import { ENewspaperPageDialog } from '../dialog/ENewspaperPageDialog';
10 import { RMCalendarBean } from './calendar/RMCalendarBean'; 10 import { RMCalendarBean } from './calendar/RMCalendarBean';
11 import { newsSkeleton } from './skeleton/newsSkeleton'; 11 import { newsSkeleton } from './skeleton/newsSkeleton';
12 import { Logger, ToastUtils, NetworkUtil } from 'wdKit/Index'; 12 import { Logger, ToastUtils, NetworkUtil } from 'wdKit/Index';
  13 +import { promptAction } from '@kit.ArkUI';
13 14
14 @Component 15 @Component
15 export struct ENewspaperPageComponent { 16 export struct ENewspaperPageComponent {
@@ -270,6 +271,10 @@ export struct ENewspaperPageComponent { @@ -270,6 +271,10 @@ export struct ENewspaperPageComponent {
270 }) 271 })
271 .id('e_newspaper_page_num') 272 .id('e_newspaper_page_num')
272 .onClick((event: ClickEvent) => { 273 .onClick((event: ClickEvent) => {
  274 + if(!NetworkUtil.isNetConnected()){
  275 + ToastUtils.showToast('网络出小差了,请检查网络后重试', 1000)
  276 + return
  277 + }
273 if (this.newspaperListBean.list && this.newspaperListBean.list.length > 0) { 278 if (this.newspaperListBean.list && this.newspaperListBean.list.length > 0) {
274 this.pageDialogShow = !this.pageDialogShow 279 this.pageDialogShow = !this.pageDialogShow
275 if (this.pageDialogShow) { 280 if (this.pageDialogShow) {
@@ -305,6 +310,10 @@ export struct ENewspaperPageComponent { @@ -305,6 +310,10 @@ export struct ENewspaperPageComponent {
305 }) 310 })
306 .id('e_newspaper_read') 311 .id('e_newspaper_read')
307 .onClick((event: ClickEvent) => { 312 .onClick((event: ClickEvent) => {
  313 + if(!NetworkUtil.isNetConnected()){
  314 + ToastUtils.showToast('网络出小差了,请检查网络后重试', 1000)
  315 + return
  316 + }
308 if (this.newspaperListBean.list && this.newspaperListBean.list.length > 0) { 317 if (this.newspaperListBean.list && this.newspaperListBean.list.length > 0) {
309 this.isOpenListDialog = true 318 this.isOpenListDialog = true
310 }else { 319 }else {
1 import { FeedBackParams, FeedbackTypeBean, PhotoListBean } from 'wdBean/Index'; 1 import { FeedBackParams, FeedbackTypeBean, PhotoListBean } from 'wdBean/Index';
2 import { AppUtils, 2 import { AppUtils,
  3 + DateTimeUtils,
3 DeviceUtil, 4 DeviceUtil,
4 FastClickUtil, Logger, NetworkUtil, StringUtils, ToastUtils, UserDataLocal } from 'wdKit/Index'; 5 FastClickUtil, Logger, NetworkUtil, StringUtils, ToastUtils, UserDataLocal } from 'wdKit/Index';
5 import { MultiPictureDetailViewModel } from '../viewmodel/MultiPictureDetailViewModel'; 6 import { MultiPictureDetailViewModel } from '../viewmodel/MultiPictureDetailViewModel';
@@ -9,7 +10,7 @@ import { BusinessError } from '@kit.BasicServicesKit'; @@ -9,7 +10,7 @@ import { BusinessError } from '@kit.BasicServicesKit';
9 import { router } from '@kit.ArkUI'; 10 import { router } from '@kit.ArkUI';
10 import { CommonConstants } from 'wdConstant/Index'; 11 import { CommonConstants } from 'wdConstant/Index';
11 import { ProcessUtils } from 'wdRouter/Index'; 12 import { ProcessUtils } from 'wdRouter/Index';
12 -import { HashMap } from '@kit.ArkTS'; 13 +import { TrackingPageBrowse } from 'wdTracking/Index';
13 14
14 const TAG = 'FeedBackActivity' 15 const TAG = 'FeedBackActivity'
15 16
@@ -20,6 +21,9 @@ const TAG = 'FeedBackActivity' @@ -20,6 +21,9 @@ const TAG = 'FeedBackActivity'
20 @Entry 21 @Entry
21 @Component 22 @Component
22 export struct FeedBackActivity { 23 export struct FeedBackActivity {
  24 + pageShowTime:number = 0;
  25 + pageId:string = 'feedbackPage';
  26 + pageName:string=this.pageId;
23 @State canSubmit: boolean = false; 27 @State canSubmit: boolean = false;
24 @State textNumLabel: string = '0/500'; 28 @State textNumLabel: string = '0/500';
25 contact: string = ""; 29 contact: string = "";
@@ -50,7 +54,7 @@ export struct FeedBackActivity { @@ -50,7 +54,7 @@ export struct FeedBackActivity {
50 .fontSize($r('app.float.font_size_16')) 54 .fontSize($r('app.float.font_size_16'))
51 .fontWeight(FontWeight.Bold) 55 .fontWeight(FontWeight.Bold)
52 .width('100%') 56 .width('100%')
53 - .margin({ left: $r('app.float.vp_15'), top: $r('app.float.vp_14') }) 57 + .margin({ left: 24, top: $r('app.float.vp_14') })
54 GridRow({ 58 GridRow({
55 columns:3, 59 columns:3,
56 }) { 60 }) {
@@ -75,7 +79,7 @@ export struct FeedBackActivity { @@ -75,7 +79,7 @@ export struct FeedBackActivity {
75 } 79 }
76 }) 80 })
77 } 81 }
78 - .width('100%') 82 + .width('94%')
79 .margin({top:$r('app.float.vp_16')}) 83 .margin({top:$r('app.float.vp_16')})
80 Blank() 84 Blank()
81 .height($r('app.float.margin_5')) 85 .height($r('app.float.margin_5'))
@@ -85,7 +89,7 @@ export struct FeedBackActivity { @@ -85,7 +89,7 @@ export struct FeedBackActivity {
85 .fontSize($r('app.float.font_size_16')) 89 .fontSize($r('app.float.font_size_16'))
86 .fontWeight(FontWeight.Bold) 90 .fontWeight(FontWeight.Bold)
87 .width(CommonConstants.FULL_WIDTH) 91 .width(CommonConstants.FULL_WIDTH)
88 - .margin({ left: $r('app.float.vp_16'), top: $r('app.float.vp_12') }) 92 + .margin({ left: 24, top: $r('app.float.vp_12') })
89 Stack({ alignContent: Alignment.BottomEnd }) { 93 Stack({ alignContent: Alignment.BottomEnd }) {
90 TextArea({ placeholder: $r('app.string.feedback_comments') }) 94 TextArea({ placeholder: $r('app.string.feedback_comments') })
91 .width(CommonConstants.FULL_WIDTH) 95 .width(CommonConstants.FULL_WIDTH)
@@ -165,7 +169,7 @@ export struct FeedBackActivity { @@ -165,7 +169,7 @@ export struct FeedBackActivity {
165 .margin({bottom: $r('app.float.vp_12'), right: $r('app.float.vp_11')}) 169 .margin({bottom: $r('app.float.vp_12'), right: $r('app.float.vp_11')})
166 } 170 }
167 .height(200) 171 .height(200)
168 - .width('90%') 172 + .width('94%')
169 .margin({ top: $r('app.float.vp_12') }) 173 .margin({ top: $r('app.float.vp_12') })
170 .backgroundColor($r('app.color.color_F5F5F5')) 174 .backgroundColor($r('app.color.color_F5F5F5'))
171 .borderRadius(4) 175 .borderRadius(4)
@@ -176,9 +180,8 @@ export struct FeedBackActivity { @@ -176,9 +180,8 @@ export struct FeedBackActivity {
176 Text($r('app.string.feedback_email')) 180 Text($r('app.string.feedback_email'))
177 .fontColor($r('app.color.color_222222')) 181 .fontColor($r('app.color.color_222222'))
178 .fontSize($r('app.float.font_size_14')) 182 .fontSize($r('app.float.font_size_14'))
179 - .fontWeight(FontWeight.Bold)  
180 - .width('100%')  
181 - .margin({ left: $r('app.float.vp_16'), top: $r('app.float.margin_24') }) 183 + .width('94%')
  184 + .margin({ top: $r('app.float.margin_24') })
182 Row() { 185 Row() {
183 Text($r('app.string.feedback_mail')) 186 Text($r('app.string.feedback_mail'))
184 .fontColor($r('app.color.color_222222')) 187 .fontColor($r('app.color.color_222222'))
@@ -187,6 +190,7 @@ export struct FeedBackActivity { @@ -187,6 +190,7 @@ export struct FeedBackActivity {
187 TextInput({ placeholder: $r('app.string.feedback_hideemail') }) 190 TextInput({ placeholder: $r('app.string.feedback_hideemail') })
188 .width(CommonConstants.FULL_WIDTH) 191 .width(CommonConstants.FULL_WIDTH)
189 .height(CommonConstants.FULL_HEIGHT) 192 .height(CommonConstants.FULL_HEIGHT)
  193 + // .margin({left:15})
190 .backgroundColor($r('app.color.color_F5F5F5')) 194 .backgroundColor($r('app.color.color_F5F5F5'))
191 .onChange((value) => { 195 .onChange((value) => {
192 // Logger.debug(TAG, "onChange" + value + "/" + this.passwordContent) 196 // Logger.debug(TAG, "onChange" + value + "/" + this.passwordContent)
@@ -194,7 +198,7 @@ export struct FeedBackActivity { @@ -194,7 +198,7 @@ export struct FeedBackActivity {
194 }) 198 })
195 } 199 }
196 .height(44) 200 .height(44)
197 - .width('90%') 201 + .width('94%')
198 .backgroundColor($r('app.color.color_F5F5F5')) 202 .backgroundColor($r('app.color.color_F5F5F5'))
199 .margin({top: $r('app.float.margin_16') }) 203 .margin({top: $r('app.float.margin_16') })
200 .borderRadius(4) 204 .borderRadius(4)
@@ -380,4 +384,12 @@ export struct FeedBackActivity { @@ -380,4 +384,12 @@ export struct FeedBackActivity {
380 } 384 }
381 } 385 }
382 386
  387 + onPageShow() {
  388 + this.pageShowTime = DateTimeUtils.getTimeStamp()
  389 + }
  390 + onPageHide() {
  391 + //页面浏览
  392 + TrackingPageBrowse.trackCommonPageExposureEnd(this.pageId,this.pageName,Math.floor((DateTimeUtils.getTimeStamp() - this.pageShowTime)/1000))
  393 +
  394 + }
383 } 395 }
@@ -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;
@@ -54,6 +51,12 @@ export struct CardSourceInfo { @@ -54,6 +51,12 @@ export struct CardSourceInfo {
54 .fontColor($r("app.color.color_ED2800")) 51 .fontColor($r("app.color.color_ED2800"))
55 .margin({ right: 2 }) 52 .margin({ right: 2 })
56 } 53 }
  54 + if(this.contentDTO.cornerMark){
  55 + Text(this.contentDTO.cornerMark)
  56 + .fontSize($r("app.float.font_size_11"))
  57 + .fontColor($r("app.color.color_ED2800"))
  58 + .margin({ right: 2 })
  59 + }
57 if (this.contentDTO.rmhPlatform === 1) { 60 if (this.contentDTO.rmhPlatform === 1) {
58 Text(this.contentDTO.rmhInfo?.rmhName) 61 Text(this.contentDTO.rmhInfo?.rmhName)
59 .fontSize($r("app.float.font_size_11")) 62 .fontSize($r("app.float.font_size_11"))
@@ -91,15 +94,21 @@ export struct CardSourceInfo { @@ -91,15 +94,21 @@ export struct CardSourceInfo {
91 // .fontColor($r("app.color.color_B0B0B0")) 94 // .fontColor($r("app.color.color_B0B0B0"))
92 // .flexShrink(0); 95 // .flexShrink(0);
93 // } 96 // }
94 - if (this.contentDTO.source && this.showTime()) { 97 + // if (this.contentDTO.source && this.showTime()) {
  98 + // Text(this.handleTimeStr())
  99 + // .fontSize($r("app.float.font_size_11"))
  100 + // .fontColor($r("app.color.color_B0B0B0"))
  101 + // .flexShrink(0)
  102 + // .margin({right: 4})
  103 + // }
  104 + if (this.showTime()) {
95 Text(this.handleTimeStr()) 105 Text(this.handleTimeStr())
96 .fontSize($r("app.float.font_size_11")) 106 .fontSize($r("app.float.font_size_11"))
97 .fontColor($r("app.color.color_B0B0B0")) 107 .fontColor($r("app.color.color_B0B0B0"))
98 .flexShrink(0) 108 .flexShrink(0)
99 .margin({right: 4}) 109 .margin({right: 4})
100 } 110 }
101 -  
102 - if (this.getContentDtoBean()?.interactData?.commentNum && this.contentDTO.source) { 111 + if (this.getContentDtoBean()?.interactData?.commentNum) {
103 Text(`${this.getContentDtoBean()?.interactData?.commentNum}评`) 112 Text(`${this.getContentDtoBean()?.interactData?.commentNum}评`)
104 .fontSize($r("app.float.font_size_11")) 113 .fontSize($r("app.float.font_size_11"))
105 .fontColor($r("app.color.color_B0B0B0")) 114 .fontColor($r("app.color.color_B0B0B0"))
@@ -107,6 +116,15 @@ export struct CardSourceInfo { @@ -107,6 +116,15 @@ export struct CardSourceInfo {
107 .visibility(Number(this.getContentDtoBean()?.interactData?.commentNum) === 0 ? Visibility.None : 116 .visibility(Number(this.getContentDtoBean()?.interactData?.commentNum) === 0 ? Visibility.None :
108 Visibility.Visible) 117 Visibility.Visible)
109 } 118 }
  119 +
  120 + // if (this.getContentDtoBean()?.interactData?.commentNum && this.contentDTO.source) {
  121 + // Text(`${this.getContentDtoBean()?.interactData?.commentNum}评`)
  122 + // .fontSize($r("app.float.font_size_11"))
  123 + // .fontColor($r("app.color.color_B0B0B0"))
  124 + // .flexShrink(0)
  125 + // .visibility(Number(this.getContentDtoBean()?.interactData?.commentNum) === 0 ? Visibility.None :
  126 + // Visibility.Visible)
  127 + // }
110 } 128 }
111 .width(CommonConstants.FULL_WIDTH) 129 .width(CommonConstants.FULL_WIDTH)
112 .margin({ top: 8 }) 130 .margin({ top: 8 })
@@ -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
@@ -36,7 +36,18 @@ export struct Card2Component { @@ -36,7 +36,18 @@ export struct Card2Component {
36 this.titleInit(); 36 this.titleInit();
37 this.loadImg = await onlyWifiLoadImg(); 37 this.loadImg = await onlyWifiLoadImg();
38 } 38 }
39 - 39 + calculateTextIndent() {
  40 + if (this.contentDTO?.newTags?.length < 5 && this.contentDTO?.newTags?.length > 2) {
  41 + return 58;
  42 + } else if ((this.contentDTO.newTags?.length !== 0) || (this.contentDTO.seoTags?.length !== 0)) {
  43 + // 当newTags或seoTags存在时,应用相同的缩进
  44 + return 35;
  45 + } else if (this.contentDTO.objectType == '5') {
  46 + return 35;
  47 + } else {
  48 + return 0;
  49 + }
  50 + }
40 titleInit() { 51 titleInit() {
41 if (this.contentDTO.title?.includes('<em>') && this.contentDTO.title?.includes('</em>')) { 52 if (this.contentDTO.title?.includes('<em>') && this.contentDTO.title?.includes('</em>')) {
42 this.titleMarked = true; 53 this.titleMarked = true;
@@ -50,13 +61,14 @@ export struct Card2Component { @@ -50,13 +61,14 @@ export struct Card2Component {
50 Column() { 61 Column() {
51 Column() { 62 Column() {
52 Stack() { 63 Stack() {
53 - //新闻标题  
54 - if (this.contentDTO.newTags) {  
55 - Notes({ newTags: this.contentDTO.newTags }).height(30).align(Alignment.Center)  
56 - //Notes({ newTags: this.contentDTO.newTags })  
57 - } else if (this.contentDTO.objectType == '5') { 64 + if(this.contentDTO.objectType == '5'){
58 Notes({ objectType: this.contentDTO.objectType }).height(30).align(Alignment.Center) 65 Notes({ objectType: this.contentDTO.objectType }).height(30).align(Alignment.Center)
59 - //Notes({ objectType: this.contentDTO.objectType }) 66 + } else {
  67 + if (this.contentDTO.seoTags) {
  68 + Notes({ newTags: this.contentDTO.seoTags }).height(30).align(Alignment.Center)
  69 + } else if (this.contentDTO.newTags) {
  70 + Notes({ newTags: this.contentDTO.newTags }).height(30).align(Alignment.Center)
  71 + }
60 } 72 }
61 Text() { 73 Text() {
62 if (this.titleMarked) { 74 if (this.titleMarked) {
@@ -74,9 +86,7 @@ export struct Card2Component { @@ -74,9 +86,7 @@ export struct Card2Component {
74 .lineHeight(27) 86 .lineHeight(27)
75 .textOverflow({ overflow: TextOverflow.Ellipsis }) // 超出的部分显示省略号。 87 .textOverflow({ overflow: TextOverflow.Ellipsis }) // 超出的部分显示省略号。
76 .align(Alignment.Start) 88 .align(Alignment.Start)
77 - .textIndent(this.contentDTO.newTags?.length < 5 && this.contentDTO.newTags?.length > 2 ? 58 :  
78 - (this.contentDTO.newTags?.length != 0 && this.contentDTO.newTags?.length) ||  
79 - this.contentDTO.objectType == '5' ? 35 : 0) 89 + .textIndent(this.calculateTextIndent())
80 }.alignContent(Alignment.TopStart) 90 }.alignContent(Alignment.TopStart)
81 91
82 //.textIndent(this.contentDTO.objectType == '5' ? 35 : 0) 92 //.textIndent(this.contentDTO.objectType == '5' ? 35 : 0)
@@ -32,6 +32,18 @@ export struct Card6Component { @@ -32,6 +32,18 @@ export struct Card6Component {
32 this.loadImg = await onlyWifiLoadImg(); 32 this.loadImg = await onlyWifiLoadImg();
33 this.clicked = hasClicked(this.contentDTO.objectId) 33 this.clicked = hasClicked(this.contentDTO.objectId)
34 } 34 }
  35 + calculateTextIndent() {
  36 + if (this.contentDTO?.newTags?.length < 5 && this.contentDTO?.newTags?.length > 2) {
  37 + return 58;
  38 + } else if ((this.contentDTO.newTags?.length !== 0) || (this.contentDTO.seoTags?.length !== 0)) {
  39 + // 当newTags或seoTags存在时,应用相同的缩进
  40 + return 35;
  41 + } else if (this.contentDTO.objectType == '5') {
  42 + return 35;
  43 + } else {
  44 + return 0;
  45 + }
  46 + }
35 47
36 titleInit() { 48 titleInit() {
37 if (this.contentDTO.title?.includes('<em>') && this.contentDTO.title?.includes('</em>')) { 49 if (this.contentDTO.title?.includes('<em>') && this.contentDTO.title?.includes('</em>')) {
@@ -57,11 +69,16 @@ export struct Card6Component { @@ -57,11 +69,16 @@ export struct Card6Component {
57 // .margin({ right: 2 }) 69 // .margin({ right: 2 })
58 // } 70 // }
59 Stack() { 71 Stack() {
60 - if (this.contentDTO.newTags) {  
61 - Notes({ newTags: this.contentDTO.newTags }).height(27).align(Alignment.Center)  
62 - } else if (this.contentDTO.objectType == '5') {  
63 - Notes({ objectType: this.contentDTO.objectType }).height(27).align(Alignment.Center) 72 + if(this.contentDTO.objectType == '5'){
  73 + Notes({ objectType: this.contentDTO.objectType }).height(30).align(Alignment.Center)
  74 + } else {
  75 + if (this.contentDTO.seoTags) {
  76 + Notes({ newTags: this.contentDTO.seoTags }).height(30).align(Alignment.Center)
  77 + } else if (this.contentDTO.newTags) {
  78 + Notes({ newTags: this.contentDTO.newTags }).height(30).align(Alignment.Center)
64 } 79 }
  80 + }
  81 +
65 82
66 Text() { 83 Text() {
67 if (this.titleMarked) { 84 if (this.titleMarked) {
@@ -80,9 +97,7 @@ export struct Card6Component { @@ -80,9 +97,7 @@ export struct Card6Component {
80 .maxLines(3) 97 .maxLines(3)
81 .alignSelf(ItemAlign.Start) 98 .alignSelf(ItemAlign.Start)
82 .textOverflow({ overflow: TextOverflow.Ellipsis }) // 超出的部分显示省略号。 99 .textOverflow({ overflow: TextOverflow.Ellipsis }) // 超出的部分显示省略号。
83 - .textIndent(this.contentDTO?.newTags?.length < 5 && this.contentDTO?.newTags?.length > 2 ? 58 :  
84 - (this.contentDTO.newTags?.length != 0 && this.contentDTO.newTags?.length) ||  
85 - this.contentDTO.objectType == '5' ? 35 : 0) 100 + .textIndent(this.calculateTextIndent())
86 }.alignContent(Alignment.TopStart) 101 }.alignContent(Alignment.TopStart)
87 102
88 } 103 }
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
@@ -460,10 +460,11 @@ export struct SearchResultContentComponent { @@ -460,10 +460,11 @@ export struct SearchResultContentComponent {
460 console.log('获取value2',JSON.stringify(value)) 460 console.log('获取value2',JSON.stringify(value))
461 let liveType = value.data?.liveType; 461 let liveType = value.data?.liveType;
462 let seoTags = value.data?.seoTags 462 let seoTags = value.data?.seoTags
  463 + let cornerMark = value.data?.cornerMark
463 let contentDTO = new ContentDTO(); 464 let contentDTO = new ContentDTO();
464 contentDTO.liveType = liveType?liveType: "" 465 contentDTO.liveType = liveType?liveType: ""
465 contentDTO.seoTags = seoTags?seoTags: "" 466 contentDTO.seoTags = seoTags?seoTags: ""
466 - // console.log('获取value333333333',JSON.stringify(contentDTO.liveType)) 467 + contentDTO.cornerMark = cornerMark?cornerMark: ""
467 contentDTO.appStyle = value.data.appStyle + "" 468 contentDTO.appStyle = value.data.appStyle + ""
468 contentDTO.cityCode = value.data.cityCode 469 contentDTO.cityCode = value.data.cityCode
469 contentDTO.coverSize = "" 470 contentDTO.coverSize = ""
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()
@@ -175,9 +205,7 @@ export struct AccountAndSecurityLayout { @@ -175,9 +205,7 @@ export struct AccountAndSecurityLayout {
175 .onClick(() => { 205 .onClick(() => {
176 console.log(index + "") 206 console.log(index + "")
177 if (index == 0){ 207 if (index == 0){
178 - trackButtonClick("accountManagementPageChangePhoneNumber")  
179 - let pageType = {'pageType': 2} as Record<string, number>;  
180 - WDRouterRule.jumpWithPage(WDRouterPage.forgetPasswordPage, pageType) 208 + WDRouterRule.jumpWithPage(WDRouterPage.changeBindPhonePage)
181 }else if (index == 1) { 209 }else if (index == 1) {
182 trackButtonClick("accountManagementPageAccountManagementPassword") 210 trackButtonClick("accountManagementPageAccountManagementPassword")
183 if (this.ifSetPassword) { 211 if (this.ifSetPassword) {
@@ -191,7 +219,7 @@ export struct AccountAndSecurityLayout { @@ -191,7 +219,7 @@ export struct AccountAndSecurityLayout {
191 }else if (index == 3) { 219 }else if (index == 3) {
192 trackButtonClick("accountManagementPageAccountCancellation") 220 trackButtonClick("accountManagementPageAccountCancellation")
193 this.isAccountPage=false 221 this.isAccountPage=false
194 - // WDRouterRule.jumpWithPage(WDRouterPage.forgetPasswordPage, pageType) 222 + this.logoutLayoutShowTime = DateTimeUtils.getTimeStamp()
195 } 223 }
196 }) 224 })
197 225
@@ -255,6 +283,8 @@ export struct AccountAndSecurityLayout { @@ -255,6 +283,8 @@ export struct AccountAndSecurityLayout {
255 }) 283 })
256 .onClick(() => { 284 .onClick(() => {
257 this.isAccountPage=true 285 this.isAccountPage=true
  286 + this.pageShowAccountTime = DateTimeUtils.getTimeStamp()
  287 + this.logoutLayoutHide()
258 this.protocolState=false 288 this.protocolState=false
259 }) 289 })
260 .id('backImage') 290 .id('backImage')
@@ -332,6 +362,7 @@ export struct AccountAndSecurityLayout { @@ -332,6 +362,7 @@ export struct AccountAndSecurityLayout {
332 Text() { 362 Text() {
333 Span("我已阅读并同意").fontColor("#999999").fontSize(12) 363 Span("我已阅读并同意").fontColor("#999999").fontSize(12)
334 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)
335 let bean = { contentID: "3", pageID: "" } as Params 366 let bean = { contentID: "3", pageID: "" } as Params
336 WDRouterRule.jumpWithPage(WDRouterPage.loginProtocolPage, bean) 367 WDRouterRule.jumpWithPage(WDRouterPage.loginProtocolPage, bean)
337 }) 368 })
@@ -353,6 +384,7 @@ export struct AccountAndSecurityLayout { @@ -353,6 +384,7 @@ export struct AccountAndSecurityLayout {
353 if (!this.protocolState) { 384 if (!this.protocolState) {
354 return 385 return
355 } 386 }
  387 + TrackingButton.click("cancelAccountPageconfirmCancelAccount",TrackConstants.PageName.Cancel_Account,TrackConstants.PageName.Cancel_Account)
356 this.dialogController.open() 388 this.dialogController.open()
357 389
358 }) 390 })
@@ -456,6 +488,7 @@ export struct AccountAndSecurityLayout { @@ -456,6 +488,7 @@ export struct AccountAndSecurityLayout {
456 488
457 //注销账号 489 //注销账号
458 requestLogout() { 490 requestLogout() {
  491 + TrackingButton.click("cancelAccountPageCancelAccountSuccess",TrackConstants.PageName.Cancel_Account,TrackConstants.PageName.Cancel_Account)
459 this.logoutViewModel.requestLogout().then(()=>{ 492 this.logoutViewModel.requestLogout().then(()=>{
460 ToastUtils.shortToast("注销成功") 493 ToastUtils.shortToast("注销成功")
461 router.back() 494 router.back()
  1 +import { SpConstants } from 'wdConstant/Index'
  2 +import { CustomToast, Logger, NetworkUtil, ToastUtils, SPHelper, EmitterEventId,
  3 + DateTimeUtils } from 'wdKit/Index'
  4 +import { LoginViewModel } from './LoginViewModel'
  5 +import { router } from '@kit.ArkUI'
  6 +import { emitter } from '@kit.BasicServicesKit'
  7 +import { TrackingPageBrowse, TrackConstants, TrackingButton } from 'wdTracking/Index'
  8 +
  9 +const TAG = 'ChangeBindPhonePage'
  10 +/*更换手机号页面*/
  11 +@Entry
  12 +@Component
  13 +struct ChangeBindPhonePage {
  14 + @State phoneContent: string = ''
  15 + @State codeContent: string = ''
  16 + @State isSubmit: boolean = false //是否可以提交 默认不可以
  17 + loginViewModel: LoginViewModel = new LoginViewModel()
  18 + @State @Watch('onCodeSend') isCodeSend: boolean = false //验证码点击发送事件
  19 + @State pageTitle:string = '更换手机号';
  20 + @State @Watch('startCount') codeStateSuccess:boolean=false
  21 + @State codeBtnState: boolean = false
  22 + @State timeCount: number = 60
  23 + isFirst:boolean=true//是否第一次获取验证码
  24 + lastTime: number = 0
  25 + pageShowTime:number = 0;
  26 + pageHideTime:number = 0;
  27 +
  28 +
  29 + onPageShow() {
  30 + this.pageShowTime = DateTimeUtils.getTimeStamp()
  31 + }
  32 +
  33 + onPageHide(): void {
  34 + this.pageHideTime = DateTimeUtils.getTimeStamp()
  35 + let duration = 0
  36 + duration = Math.floor((this.pageHideTime - this.pageShowTime)/1000)
  37 + TrackingPageBrowse.trackCommonPageExposureEnd(TrackConstants.PageName.Change_PhoneNum,TrackConstants.PageName.Change_PhoneNum,duration)
  38 + }
  39 +
  40 + onCodeSend() {
  41 + if (this.isCodeSend) {
  42 + TrackingButton.click("changePhoneNumberPageSendVerificationCode",TrackConstants.PageName.Change_PhoneNum,TrackConstants.PageName.Change_PhoneNum)
  43 + this.sendVerifyCode()
  44 + }
  45 + }
  46 +
  47 + @State toastText:string = ""
  48 + dialogToast: CustomDialogController = new CustomDialogController({
  49 + builder: CustomToast({
  50 + msg: this.toastText,
  51 + }),
  52 + autoCancel: false,
  53 + alignment: DialogAlignment.Center,
  54 + customStyle: true,
  55 + maskColor:"#00000000"
  56 + })
  57 +
  58 +
  59 +
  60 + build() {
  61 + Column() {
  62 + Image($r('app.media.login_back_icon')).width(24).height(24).margin({ left: 15, top: 10 }).onClick(() => {
  63 + router.back()
  64 + })
  65 +
  66 + Text(this.pageTitle).fontSize(22).fontColor('#333333').fontWeight(FontWeight.Bold).margin({ left: 25, top: 112 })
  67 +
  68 + Column(){
  69 + TextInput({text: this.phoneContent, placeholder: "请输入手机号" })
  70 + .fontSize(16)
  71 + .height(48)
  72 + .placeholderColor("#CCCCCC")
  73 + .maxLength(11)
  74 + .margin({ top: 36 })
  75 + .backgroundColor("#F5F5F5")
  76 + .borderRadius(4)
  77 + .type(InputType.Number)
  78 + .onChange((content) => {
  79 + this.phoneContent = content
  80 + this.isSubmit = (this.phoneContent.length >= 11 && this.codeContent.length >= 4)
  81 +
  82 + if (content.length >= 11 ) {
  83 + this.codeBtnState = true
  84 + } else {
  85 + this.codeBtnState = false
  86 + }
  87 + })
  88 +
  89 +
  90 + Row() {
  91 + TextInput({ text: this.codeContent,placeholder: "验证码" })
  92 + .placeholderColor("#CCCCCC")
  93 + .layoutWeight(1)
  94 + .fontSize(16)
  95 + .height(48)
  96 + .type(InputType.Number)
  97 + .fontColor("#222222")
  98 + .backgroundColor("#00000000")
  99 + .borderRadius({ topLeft: 4, bottomLeft: 4 })
  100 + .onChange((value) => {
  101 + this.codeContent = value
  102 + this.isSubmit = (this.phoneContent.length >= 11 && this.codeContent.length >= 4)
  103 + })
  104 +
  105 + Text(this.codeStateSuccess ? this.timeCount + "s" : this.isFirst?"发送验证码":'重新获取')
  106 + .fontColor(this.codeBtnState?'#ED2800':'#80ED2800')
  107 + .width(110)
  108 + .fontSize(14)
  109 + .fontWeight( FontWeight.Bold)
  110 + .height(48)
  111 + .textAlign(TextAlign.Center)
  112 + .enabled(this.codeStateSuccess?false:true)
  113 + .onClick(() => {
  114 + if (this.phoneContent.length < 11) {
  115 + return
  116 + }
  117 +
  118 + let currentTime = DateTimeUtils.getTimeStamp()
  119 + if (currentTime - this.lastTime < 500) {
  120 + return
  121 + }
  122 + this.lastTime = currentTime;
  123 + this.isCodeSend = true
  124 +
  125 + })
  126 +
  127 +
  128 + }.margin({ top: 12 })
  129 + .height(48)
  130 + .alignItems(VerticalAlign.Center)
  131 + .justifyContent(FlexAlign.Start)
  132 + .backgroundImage($r('app.media.code_login_bg'))
  133 + .backgroundImageSize({width:'100%',height:48})
  134 + }.width('100%')
  135 + .padding({ left: 25, right: 25 })
  136 +
  137 +
  138 + Row() {
  139 + Text("确认")
  140 + .layoutWeight(1)
  141 + .fontColor(this.isSubmit ?"#FFFFFFFF":"#66FFFFFF")
  142 + .borderRadius(4)
  143 + .fontSize(18)
  144 + .textAlign(TextAlign.Center)
  145 + .fontWeight(FontWeight.Medium)
  146 + .margin({ top: 26 })
  147 + .height(44)
  148 + .backgroundColor(this.isSubmit ?"#ED2800":"#99ED2800")
  149 + .enabled(this.isSubmit ? true : false)
  150 + .onClick(() => {
  151 + TrackingButton.click("changePhoneNumberPageConfirm",TrackConstants.PageName.Change_PhoneNum,TrackConstants.PageName.Change_PhoneNum)
  152 + this.changeBindPhone()
  153 + })
  154 + }.width('100%')
  155 + .padding({ left: 25, right: 25 })
  156 +
  157 + }.width('100%').height('100%').alignItems(HorizontalAlign.Start)
  158 + }
  159 +
  160 + //发送验证码
  161 + sendVerifyCode() {
  162 + if (this.isEmpty(this.phoneContent)) {
  163 + return
  164 + }
  165 +
  166 + this.loginViewModel.sendVerifyCode(this.phoneContent).then((verifyCode) => {
  167 + this.showToastTip("已发送")
  168 + this.codeStateSuccess=true
  169 + this.isCodeSend=false
  170 + Logger.debug(TAG, "sendVerifyCode: " + verifyCode)
  171 + }).catch((message: string)=>{
  172 + let netStatus = NetworkUtil.isNetConnected()
  173 + if (netStatus) {
  174 + this.showToastTip(message)
  175 + } else {
  176 + this.showToastTip("验证码获取失败,请重新尝试")
  177 + }
  178 + this.codeStateSuccess=false
  179 + this.isCodeSend=false
  180 + })
  181 + }
  182 +
  183 + isEmpty(obj: undefined|null|string): boolean {
  184 + return (obj == undefined || obj == null || obj == '');
  185 + }
  186 +
  187 + changeBindPhone(){
  188 + if (!this.isSubmit) {
  189 + return
  190 + }
  191 + if (this.isEmpty(this.phoneContent)) {
  192 + return
  193 + }
  194 + if (this.isEmpty(this.codeContent)) {
  195 + return
  196 + }
  197 + this.loginViewModel.changeBindPhone(this.phoneContent,this.codeContent).then(()=>{
  198 + ToastUtils.shortToast('绑定成功')
  199 + this.querySecurity()
  200 + }).catch((message: string) => {
  201 + if (message != '') {
  202 + ToastUtils.shortToast(message)
  203 + }
  204 + })
  205 + }
  206 +
  207 + querySecurity(){
  208 + this.loginViewModel.querySecurity().then(()=>{
  209 + SPHelper.default.save(SpConstants.USER_PHONE,this.phoneContent)
  210 + this.sendEmitEvent()
  211 + router.back()
  212 + }).catch(()=>{
  213 +
  214 + })
  215 + }
  216 +
  217 + sendEmitEvent(){
  218 + // 定义一个eventId为1的事件,事件优先级为Low
  219 + let event: emitter.InnerEvent = {
  220 + eventId: EmitterEventId.PHONE_CHANGE_SUCCESS,
  221 + priority: emitter.EventPriority.LOW
  222 + };
  223 +
  224 + let eventData: emitter.EventData = {
  225 + data: {
  226 + content: this.phoneContent,
  227 + }
  228 + };
  229 +
  230 + // 发送eventId为1的事件,事件内容为eventData
  231 + emitter.emit(event, eventData);
  232 + }
  233 +
  234 + showToastTip(msg:string){
  235 + this.toastText = msg
  236 + this.dialogToast.open()
  237 + }
  238 +
  239 + startCount() {
  240 + this.isFirst = false
  241 + let time = setInterval(() => {
  242 + Logger.debug("倒计时:" + this.timeCount)
  243 + this.timeCount--
  244 + if (this.timeCount < 1) {
  245 + this.codeStateSuccess = false
  246 + this.timeCount = 60
  247 + clearInterval(time)
  248 + }
  249 + }, 1000)
  250 + }
  251 +}
@@ -22,7 +22,7 @@ struct ForgetPasswordPage { @@ -22,7 +22,7 @@ struct ForgetPasswordPage {
22 @State isSubmit: boolean = false //是否可以提交 默认不可以 22 @State isSubmit: boolean = false //是否可以提交 默认不可以
23 loginViewModel: LoginViewModel = new LoginViewModel() 23 loginViewModel: LoginViewModel = new LoginViewModel()
24 @State @Watch('onCodeSend') isCodeSend: boolean = false //验证码点击发送事件 24 @State @Watch('onCodeSend') isCodeSend: boolean = false //验证码点击发送事件
25 - pageType:number = (router.getParams() as Record<string, number>)['pageType']; //0、登录->忘记密码 1、设置->重置密码 2、设置->更换手机号页面1 3、设置->更换手机号页面2 25 + pageType:number = (router.getParams() as Record<string, number>)['pageType']; //0、登录->忘记密码 1、设置->重置密码 3、设置->更换手机号页面2(不知道是啥)
26 phone:string = (router.getParams() as Record<string, number>)['phone'] + ""; //登录 密码登录 填写手机号 点击忘记密码 带过来手机号 26 phone:string = (router.getParams() as Record<string, number>)['phone'] + ""; //登录 密码登录 填写手机号 点击忘记密码 带过来手机号
27 @State pageTitle:string = '找回密码'; 27 @State pageTitle:string = '找回密码';
28 @State codeStateSuccess:boolean=false 28 @State codeStateSuccess:boolean=false
@@ -51,7 +51,6 @@ struct ForgetPasswordPage { @@ -51,7 +51,6 @@ struct ForgetPasswordPage {
51 router.back() 51 router.back()
52 }) 52 })
53 53
54 -  
55 Text(this.pageTitle).fontSize(22).fontColor('#333333').fontWeight(FontWeight.Bold).margin({ left: 25, top: 112 }) 54 Text(this.pageTitle).fontSize(22).fontColor('#333333').fontWeight(FontWeight.Bold).margin({ left: 25, top: 112 })
56 LoginInputComponent({ 55 LoginInputComponent({
57 phoneContent: $phoneContent, 56 phoneContent: $phoneContent,
@@ -74,11 +73,7 @@ struct ForgetPasswordPage { @@ -74,11 +73,7 @@ struct ForgetPasswordPage {
74 .backgroundColor(this.isSubmit ?"#ED2800":"#99ED2800") 73 .backgroundColor(this.isSubmit ?"#ED2800":"#99ED2800")
75 .enabled(this.isSubmit ? true : false) 74 .enabled(this.isSubmit ? true : false)
76 .onClick(() => { 75 .onClick(() => {
77 - if(this.pageType==2){  
78 - this.changeBindPhone()  
79 - }else {  
80 this.checkVerifyCode() 76 this.checkVerifyCode()
81 - }  
82 }) 77 })
83 }.padding({ left: 25, right: 25 }).width('100%') 78 }.padding({ left: 25, right: 25 }).width('100%')
84 79
@@ -98,8 +93,6 @@ struct ForgetPasswordPage { @@ -98,8 +93,6 @@ struct ForgetPasswordPage {
98 } 93 }
99 }else if (this.pageType == 1){ 94 }else if (this.pageType == 1){
100 this.pageTitle = '验证当前手机号' 95 this.pageTitle = '验证当前手机号'
101 - }else if (this.pageType == 2){  
102 - this.pageTitle = '更换手机号'  
103 } 96 }
104 if (this.isCodeSend) { 97 if (this.isCodeSend) {
105 this.sendVerifyCode() 98 this.sendVerifyCode()
@@ -10,7 +10,7 @@ export struct LoginInputComponent { @@ -10,7 +10,7 @@ export struct LoginInputComponent {
10 @Link isCodeSend: boolean //验证码控件是否点击 默认没有 发送接口 10 @Link isCodeSend: boolean //验证码控件是否点击 默认没有 发送接口
11 @Link isSubmit: boolean //是否可以提交 11 @Link isSubmit: boolean //是否可以提交
12 isFirst:boolean=true//是否第一次获取验证码 12 isFirst:boolean=true//是否第一次获取验证码
13 - pageType?:number; //0、登录->忘记密码 1、设置->重置密码 2、设置->更换手机号页面1 3、设置->更换手机号页面2 13 + pageType?:number; //0、登录->忘记密码 1、设置->重置密码 3、设置->更换手机号页面2
14 lastTime: number = 0 14 lastTime: number = 0
15 @Link @Watch('startCount') codeStateSuccess: boolean //验证码获取成功与否回调 成功显示倒计时 15 @Link @Watch('startCount') codeStateSuccess: boolean //验证码获取成功与否回调 成功显示倒计时
16 @Watch('onCheckChange') @Prop protocolState: boolean = false //协议勾选状态 16 @Watch('onCheckChange') @Prop protocolState: boolean = false //协议勾选状态
@@ -4,7 +4,7 @@ import { LoginModel } from './LoginModel'; @@ -4,7 +4,7 @@ import { LoginModel } from './LoginModel';
4 import { ModifyPasswordRequestItem } from './ModifyPasswordRequestItem'; 4 import { ModifyPasswordRequestItem } from './ModifyPasswordRequestItem';
5 import { router } from '@kit.ArkUI'; 5 import { router } from '@kit.ArkUI';
6 import { encryptMessage } from '../../utils/cryptoUtil'; 6 import { encryptMessage } from '../../utils/cryptoUtil';
7 -import { TrackingPageBrowse, TrackConstants } from 'wdTracking/Index'; 7 +import { TrackingPageBrowse, TrackConstants, TrackingButton } from 'wdTracking/Index';
8 8
9 /** 9 /**
10 * 修改密码页面 10 * 修改密码页面
@@ -153,6 +153,7 @@ struct ModifyPasswordPage { @@ -153,6 +153,7 @@ struct ModifyPasswordPage {
153 .borderRadius('4vp') 153 .borderRadius('4vp')
154 .onClick(() => { 154 .onClick(() => {
155 if(this.btnStatus){ 155 if(this.btnStatus){
  156 + TrackingButton.click("changePasswordPageConfirm",TrackConstants.PageName.Change_Passwd,TrackConstants.PageName.Change_Passwd)
156 this.submit() 157 this.submit()
157 } 158 }
158 }) 159 })
@@ -8,6 +8,7 @@ @@ -8,6 +8,7 @@
8 "pages/login/SettingPasswordLayout", 8 "pages/login/SettingPasswordLayout",
9 "pages/guide/GuidePages", 9 "pages/guide/GuidePages",
10 "pages/login/OneKeyLoginPage", 10 "pages/login/OneKeyLoginPage",
11 - "pages/login/ModifyPasswordPage" 11 + "pages/login/ModifyPasswordPage",
  12 + "pages/login/ChangeBindPhonePage"
12 ] 13 ]
13 } 14 }
1 import { ENewspaperPageComponent } from 'wdComponent'; 1 import { ENewspaperPageComponent } from 'wdComponent';
2 -import { Logger } from 'wdKit'; 2 +import { DateTimeUtils, Logger } from 'wdKit';
3 import common from '@ohos.app.ability.common'; 3 import common from '@ohos.app.ability.common';
4 import window from '@ohos.window'; 4 import window from '@ohos.window';
  5 +import { TrackingPageBrowse } from 'wdTracking/Index';
5 6
6 const TAG = 'ENewspaper'; 7 const TAG = 'ENewspaper';
7 8
8 @Entry 9 @Entry
9 @Component 10 @Component
10 struct ENewspaper { 11 struct ENewspaper {
  12 + pageShowTime:number = 0;
  13 + pageId:string = 'newsPaperPage';
  14 + pageName:string=this.pageId;
11 // 获取UIAbility上下文 15 // 获取UIAbility上下文
12 context: common.UIAbilityContext = getContext(this) as common.UIAbilityContext 16 context: common.UIAbilityContext = getContext(this) as common.UIAbilityContext
13 17
@@ -46,6 +50,7 @@ struct ENewspaper { @@ -46,6 +50,7 @@ struct ENewspaper {
46 } 50 }
47 51
48 onPageShow() { 52 onPageShow() {
  53 + this.pageShowTime = DateTimeUtils.getTimeStamp()
49 this.setSystemBar('#80000000','#80000000', '#FFFFFFFF') 54 this.setSystemBar('#80000000','#80000000', '#FFFFFFFF')
50 Logger.info(TAG, 'onPageShow'); 55 Logger.info(TAG, 'onPageShow');
51 } 56 }
@@ -53,6 +58,8 @@ struct ENewspaper { @@ -53,6 +58,8 @@ struct ENewspaper {
53 onPageHide() { 58 onPageHide() {
54 this.setSystemBar('#FFFFFFFF','#00000000', '#000000') 59 this.setSystemBar('#FFFFFFFF','#00000000', '#000000')
55 Logger.info(TAG, 'onPageHide'); 60 Logger.info(TAG, 'onPageHide');
  61 + //页面浏览
  62 + TrackingPageBrowse.trackCommonPageExposureEnd(this.pageId,this.pageName,Math.floor((DateTimeUtils.getTimeStamp() - this.pageShowTime)/1000))
56 } 63 }
57 64
58 onBackPress() { 65 onBackPress() {
1 -import { Logger } from 'wdKit'; 1 +import { DateTimeUtils, Logger } from 'wdKit';
2 import { DynamicDetailComponent } from 'wdComponent'; 2 import { DynamicDetailComponent } from 'wdComponent';
3 import router from '@ohos.router'; 3 import router from '@ohos.router';
4 import { Params, Action } from 'wdBean'; 4 import { Params, Action } from 'wdBean';
  5 +import { TrackingPageBrowse } from 'wdTracking/Index';
  6 +
5 const TAG = 'DynamicDetailPage'; 7 const TAG = 'DynamicDetailPage';
6 @Entry 8 @Entry
7 @Component 9 @Component
8 struct DynamicDetailPage { 10 struct DynamicDetailPage {
9 - 11 + pageShowTime:number = 0;
  12 + pageId:string = 'dynamicDetailPage';
  13 + pageName:string=this.pageId;
10 @State relId: string = '' 14 @State relId: string = ''
11 @State contentId: string = '' 15 @State contentId: string = ''
12 @State relType: string = '' 16 @State relType: string = ''
@@ -30,4 +34,12 @@ struct DynamicDetailPage { @@ -30,4 +34,12 @@ struct DynamicDetailPage {
30 this.relType = params?.extra?.relType || ''; 34 this.relType = params?.extra?.relType || '';
31 this.contentId = params?.contentID || ''; 35 this.contentId = params?.contentID || '';
32 } 36 }
  37 + onPageShow() {
  38 + this.pageShowTime = DateTimeUtils.getTimeStamp()
  39 + }
  40 + onPageHide() {
  41 + //页面浏览
  42 + TrackingPageBrowse.trackCommonPageExposureEnd(this.pageId,this.pageName,Math.floor((DateTimeUtils.getTimeStamp() - this.pageShowTime)/1000))
  43 +
  44 + }
33 } 45 }
@@ -131,7 +131,7 @@ export struct BottomNavigationComponent { @@ -131,7 +131,7 @@ export struct BottomNavigationComponent {
131 @Builder 131 @Builder
132 tabBarBuilder(navItem: BottomNavDTO, index: number) { 132 tabBarBuilder(navItem: BottomNavDTO, index: number) {
133 Stack({ alignContent: Alignment.Bottom }) { 133 Stack({ alignContent: Alignment.Bottom }) {
134 - Image(this.currentNavIndex === index ? navItem.iconC : navItem.icon) 134 + Image(this.getBottomIcon(navItem, this.currentNavIndex === index))
135 .height(CommonConstants.FULL_PARENT) 135 .height(CommonConstants.FULL_PARENT)
136 .padding({ 136 .padding({
137 bottom: 15, 137 bottom: 15,
@@ -140,6 +140,7 @@ export struct BottomNavigationComponent { @@ -140,6 +140,7 @@ export struct BottomNavigationComponent {
140 top: 2 140 top: 2
141 }) 141 })
142 .aspectRatio(this.ASPECT_RATIO_1_1) 142 .aspectRatio(this.ASPECT_RATIO_1_1)
  143 + .alt(this.getBottomLocalIcon(navItem, this.currentNavIndex === index))
143 144
144 Text(navItem.name) 145 Text(navItem.name)
145 .margin({ bottom: $r('app.float.bottom_navigation_margin_bottom') }) 146 .margin({ bottom: $r('app.float.bottom_navigation_margin_bottom') })
@@ -160,6 +161,48 @@ export struct BottomNavigationComponent { @@ -160,6 +161,48 @@ export struct BottomNavigationComponent {
160 161
161 } 162 }
162 163
  164 + private getBottomIcon(navItem: BottomNavDTO, isSelect: boolean): string | Resource {
  165 + if (!navItem) {
  166 + return ''
  167 + }
  168 + let icon: string = ''
  169 + if (this.isImmersive) {
  170 + // 获取沉浸式icon
  171 + icon = isSelect ? navItem.immersiveIconCUrl : navItem.immersiveIconUrl
  172 + } else {
  173 + // 获取常规icon
  174 + icon = isSelect ? navItem.iconC : navItem.icon
  175 + }
  176 + if (StringUtils.isEmpty(icon) || icon.includes('.pag')) {
  177 + // 兜底,获取预置的本地icon
  178 + return this.getBottomLocalIcon(navItem, isSelect)
  179 + }
  180 + return icon
  181 + }
  182 +
  183 + private getBottomLocalIcon(navItem: BottomNavDTO, isSelect: boolean): Resource {
  184 + if (!navItem) {
  185 + return isSelect ? $r('app.media.icon_tab_res1') : $r('app.media.icon_tab_res1_no')
  186 + }
  187 + // type:1普通 2我的
  188 + if (navItem.type == '2') {
  189 + // 我的
  190 + return isSelect ? $r('app.media.icon_tab_res5') : $r('app.media.icon_tab_res5_no')
  191 + } else {
  192 + // 顶部样式:中文的(11-新闻;12-人民号;13-视频;14-服务)
  193 + if (navItem.topStyle == '11') {
  194 + return isSelect ? $r('app.media.icon_tab_res1') : $r('app.media.icon_tab_res1_no')
  195 + } else if (navItem.topStyle == '12') {
  196 + return isSelect ? $r('app.media.icon_tab_res2') : $r('app.media.icon_tab_res2_no')
  197 + } else if (navItem.topStyle == '13') {
  198 + return isSelect ? $r('app.media.icon_tab_res3') : $r('app.media.icon_tab_res3_no')
  199 + } else if (navItem.topStyle == '14') {
  200 + return isSelect ? $r('app.media.icon_tab_res4') : $r('app.media.icon_tab_res4_no')
  201 + }
  202 + }
  203 + return isSelect ? $r('app.media.icon_tab_res1') : $r('app.media.icon_tab_res1_no')
  204 + }
  205 +
163 // 底导切换函数 206 // 底导切换函数
164 async onBottomNavigationIndexChange(navItem: BottomNavDTO, index: number) { 207 async onBottomNavigationIndexChange(navItem: BottomNavDTO, index: number) {
165 Logger.info(TAG, `onBottomNavigationIndexChange this.currentNavIndex: ${this.currentNavIndex}`); 208 Logger.info(TAG, `onBottomNavigationIndexChange this.currentNavIndex: ${this.currentNavIndex}`);
@@ -21,6 +21,7 @@ export struct VideoChannelPage { @@ -21,6 +21,7 @@ export struct VideoChannelPage {
21 @Prop topNavList: TopNavDTO[] 21 @Prop topNavList: TopNavDTO[]
22 @Link _currentNavIndex?: number; 22 @Link _currentNavIndex?: number;
23 @Consume barBackgroundColor: Color 23 @Consume barBackgroundColor: Color
  24 + @Consume isImmersive: boolean
24 @Consume displayDirection: DisplayDirection 25 @Consume displayDirection: DisplayDirection
25 @Consume @Watch('setBarBackgroundColor') currentBottomNavInfo: BottomNavDTO // 当前底导信息 26 @Consume @Watch('setBarBackgroundColor') currentBottomNavInfo: BottomNavDTO // 当前底导信息
26 @State @Watch('setBarBackgroundColor') currentTopNavSelectedIndex: number = 0; 27 @State @Watch('setBarBackgroundColor') currentTopNavSelectedIndex: number = 0;
@@ -42,8 +43,10 @@ export struct VideoChannelPage { @@ -42,8 +43,10 @@ export struct VideoChannelPage {
42 if (this.currentTopNavSelectedIndex === 0 && this.currentBottomNavInfo?.name === '视频') { 43 if (this.currentTopNavSelectedIndex === 0 && this.currentBottomNavInfo?.name === '视频') {
43 console.error('setBarBackgroundColor', '黑色') 44 console.error('setBarBackgroundColor', '黑色')
44 this.barBackgroundColor = Color.Black 45 this.barBackgroundColor = Color.Black
  46 + this.isImmersive = true
45 } else { 47 } else {
46 this.barBackgroundColor = Color.White 48 this.barBackgroundColor = Color.White
  49 + this.isImmersive = false
47 console.error('setBarBackgroundColor', '白色') 50 console.error('setBarBackgroundColor', '白色')
48 } 51 }
49 } 52 }