liyubing

Merge remote-tracking branch 'origin/main'

Showing 73 changed files with 1245 additions and 244 deletions
@@ -68,6 +68,8 @@ export class WDRouterPage { @@ -68,6 +68,8 @@ 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 verifyPhoneNumberPage = new WDRouterPage("wdLogin", "ets/pages/login/VerifyPhoneNumberPage");
  72 + static changeBindPhonePage = new WDRouterPage("wdLogin", "ets/pages/login/ChangeBindPhonePage");
71 static modifyPasswordPage = new WDRouterPage("wdLogin", "ets/pages/login/ModifyPasswordPage"); 73 static modifyPasswordPage = new WDRouterPage("wdLogin", "ets/pages/login/ModifyPasswordPage");
72 //我的 预约 74 //我的 预约
73 static appointmentListPage = new WDRouterPage("wdComponent", "ets/components/page/AppointmentListPage"); 75 static appointmentListPage = new WDRouterPage("wdComponent", "ets/components/page/AppointmentListPage");
@@ -11,6 +11,9 @@ import { LiveRoomDataBean } from '../live/LiveRoomDataBean'; @@ -11,6 +11,9 @@ 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 = '';
  15 + cornerMark:string = '';
  16 + liveType?: string; // 直播新闻-直播状态
14 expIds: string = ''; 17 expIds: string = '';
15 itemId: string = ''; 18 itemId: string = '';
16 shareFlag?: string = '1'; 19 shareFlag?: string = '1';
@@ -99,6 +102,8 @@ export class ContentDTO implements BaseDTO { @@ -99,6 +102,8 @@ export class ContentDTO implements BaseDTO {
99 102
100 static clone(old: ContentDTO): ContentDTO { 103 static clone(old: ContentDTO): ContentDTO {
101 let content = new ContentDTO(); 104 let content = new ContentDTO();
  105 + content.liveType = old.liveType;
  106 + content.seoTags = old.seoTags;
102 content.appStyle = old.appStyle; 107 content.appStyle = old.appStyle;
103 content.cityCode = old.cityCode; 108 content.cityCode = old.cityCode;
104 content.coverSize = old.coverSize; 109 content.coverSize = old.coverSize;
@@ -154,6 +159,7 @@ export class ContentDTO implements BaseDTO { @@ -154,6 +159,7 @@ export class ContentDTO implements BaseDTO {
154 content.rmhInfo = old.rmhInfo; 159 content.rmhInfo = old.rmhInfo;
155 content.photoNum = old.photoNum; 160 content.photoNum = old.photoNum;
156 content.corner = old.corner; 161 content.corner = old.corner;
  162 + content.cornerMark = old.cornerMark;
157 content.rmhPlatform = old.rmhPlatform; 163 content.rmhPlatform = old.rmhPlatform;
158 content.newTags = old.newTags; 164 content.newTags = old.newTags;
159 content.titleShow = old.titleShow; 165 content.titleShow = old.titleShow;
@@ -49,6 +49,7 @@ const PATTERN_DATE_CN_RN: string = 'yyyy年MM月dd日 HH:mm'; @@ -49,6 +49,7 @@ const PATTERN_DATE_CN_RN: string = 'yyyy年MM月dd日 HH:mm';
49 49
50 50
51 /** 51 /**
  52 + * 动态详情页UI
52 * @author wd-zsz 53 * @author wd-zsz
53 * */ 54 * */
54 // @Preview 55 // @Preview
@@ -109,7 +110,7 @@ export struct DynamicDetailComponent { @@ -109,7 +110,7 @@ export struct DynamicDetailComponent {
109 //分割线 110 //分割线
110 Image($r('app.media.ic_news_detail_division')) 111 Image($r('app.media.ic_news_detail_division'))
111 .width('100%') 112 .width('100%')
112 - .height($r('app.float.margin_12')) 113 + .height($r('app.float.margin_6'))
113 .padding({ left: $r('app.float.margin_16'), right: $r('app.float.margin_16') }) 114 .padding({ left: $r('app.float.margin_16'), right: $r('app.float.margin_16') })
114 Stack({ alignContent: Alignment.Bottom }) { 115 Stack({ alignContent: Alignment.Bottom }) {
115 if (!this.isNetConnected) { 116 if (!this.isNetConnected) {
@@ -533,6 +534,8 @@ export struct DynamicDetailComponent { @@ -533,6 +534,8 @@ export struct DynamicDetailComponent {
533 } 534 }
534 //点赞操作 535 //点赞操作
535 this.toggleLikeStatus() 536 this.toggleLikeStatus()
  537 + //内容点赞/取消点赞埋点
  538 +
536 }) 539 })
537 540
538 // 评论 541 // 评论
@@ -751,7 +754,7 @@ export struct DynamicDetailComponent { @@ -751,7 +754,7 @@ export struct DynamicDetailComponent {
751 return 754 return
752 } 755 }
753 const params: postExecuteLikeParams = { 756 const params: postExecuteLikeParams = {
754 - status: this.newsStatusOfUser?.likeStatus === '1' ? '0' : '1', 757 + status: this.newsStatusOfUser?.likeStatus === '1' ? 0 : 1,
755 contentId: this.contentDetailData?.newsId + '', 758 contentId: this.contentDetailData?.newsId + '',
756 contentType: this.contentDetailData?.newsType + '', 759 contentType: this.contentDetailData?.newsType + '',
757 } 760 }
1 import { ContentDTO, NewspaperListItemBean, NewspaperPositionItemBean, Params } from 'wdBean'; 1 import { ContentDTO, NewspaperListItemBean, NewspaperPositionItemBean, Params } from 'wdBean';
2 import { StringUtils } from 'wdKit'; 2 import { StringUtils } from 'wdKit';
3 import { ProcessUtils } from 'wdRouter'; 3 import { ProcessUtils } from 'wdRouter';
  4 +import { TrackingContent,TrackConstants } from 'wdTracking/Index';
4 import { newsSkeleton } from './skeleton/newsSkeleton'; 5 import { newsSkeleton } from './skeleton/newsSkeleton';
5 6
6 @Component 7 @Component
@@ -13,6 +14,20 @@ export struct ENewspaperItemComponent { @@ -13,6 +14,20 @@ export struct ENewspaperItemComponent {
13 private itemBeanClicked: NewspaperPositionItemBean = {} as NewspaperPositionItemBean 14 private itemBeanClicked: NewspaperPositionItemBean = {} as NewspaperPositionItemBean
14 @State isShowSkeleton: boolean = true 15 @State isShowSkeleton: boolean = true
15 16
  17 + aboutToAppear(): void {
  18 + for (let index = 0; index < this.newspaperListItemBean.items.length; index++) {
  19 + const element = this.newspaperListItemBean.items[index];
  20 + TrackingContent.common(TrackConstants.EventType.Show,TrackConstants.PageName.NewsPaperPage,TrackConstants.PageName.NewsPaperPage
  21 + ,{
  22 + 'contentName':element.title,
  23 + 'contentType':element.newsType,
  24 + 'contentId':element.newsId,
  25 + 'panelNumber':this.newspaperListItemBean.pageNum,
  26 + 'panelName':this.newspaperListItemBean.pageName,
  27 + 'readMode':'1',
  28 + })
  29 + }
  30 + }
16 build() { 31 build() {
17 Stack() { 32 Stack() {
18 newsSkeleton() 33 newsSkeleton()
@@ -70,6 +85,16 @@ export struct ENewspaperItemComponent { @@ -70,6 +85,16 @@ export struct ENewspaperItemComponent {
70 relType:this.itemBeanClicked.relType ?? '0' 85 relType:this.itemBeanClicked.relType ?? '0'
71 } as ContentDTO 86 } as ContentDTO
72 ProcessUtils.processPage(content) 87 ProcessUtils.processPage(content)
  88 + //内容点击
  89 + TrackingContent.commentClickWithEvent('current_Number_Panel_content_click',TrackConstants.PageName.NewsPaperPage,TrackConstants.PageName.NewsPaperPage
  90 + ,{
  91 + 'contentName':this.itemBeanClicked.title,
  92 + 'contentType':this.itemBeanClicked.newsType,
  93 + 'contentId':this.itemBeanClicked.newsId,
  94 + 'panelNumber':this.newspaperListItemBean.pageNum,
  95 + 'panelName':this.newspaperListItemBean.pageName,
  96 + 'readMode':'1',
  97 + })
73 this.itemBeanClicked = {} as NewspaperPositionItemBean 98 this.itemBeanClicked = {} as NewspaperPositionItemBean
74 } 99 }
75 } 100 }
@@ -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 { TrackingContent,TrackConstants, TrackingButton } from 'wdTracking/Index';
13 14
14 @Component 15 @Component
15 export struct ENewspaperPageComponent { 16 export struct ENewspaperPageComponent {
@@ -33,6 +34,15 @@ export struct ENewspaperPageComponent { @@ -33,6 +34,15 @@ export struct ENewspaperPageComponent {
33 let _swiperIndex = Number.parseInt(this.currentPageNum) 34 let _swiperIndex = Number.parseInt(this.currentPageNum)
34 console.log("ENewspaperPageComponent-onCurrentPageNumUpdated", "_swiperIndex:", _swiperIndex) 35 console.log("ENewspaperPageComponent-onCurrentPageNumUpdated", "_swiperIndex:", _swiperIndex)
35 this.swiperIndex = _swiperIndex > 0 ? _swiperIndex - 1 : _swiperIndex 36 this.swiperIndex = _swiperIndex > 0 ? _swiperIndex - 1 : _swiperIndex
  37 +
  38 + //电子报--版面序号选择点击
  39 + TrackingContent.commentClickWithEvent('panel_number_selection_click',TrackConstants.PageName.NewsPaperPage,TrackConstants.PageName.NewsPaperPage
  40 + ,{
  41 + 'panelNumber':this.newspaperListBean?.list[this.swiperIndex].pageNum,
  42 + 'panelName':this.newspaperListBean?.list[this.swiperIndex].pageName,
  43 + 'currentPanelDate':this.selectDate.toDateString(),
  44 + 'currentNumber':this.swiperIndex,
  45 + })
36 } 46 }
37 47
38 //日历选择弹框 48 //日历选择弹框
@@ -50,6 +60,14 @@ export struct ENewspaperPageComponent { @@ -50,6 +60,14 @@ export struct ENewspaperPageComponent {
50 this.selectDate = 60 this.selectDate =
51 new Date(date.fullYear ? date.fullYear : 0, date.month ? date.month : 0, date.date ? date.date : 0) 61 new Date(date.fullYear ? date.fullYear : 0, date.month ? date.month : 0, date.date ? date.date : 0)
52 } 62 }
  63 + //日历选择点击
  64 + TrackingContent.commentClickWithEvent('date_selection_click',TrackConstants.PageName.NewsPaperPage,TrackConstants.PageName.NewsPaperPage
  65 + ,{
  66 + 'panelNumber':this.newspaperListBean?.list[this.swiperIndex].pageNum,
  67 + 'panelName':this.newspaperListBean?.list[this.swiperIndex].pageName,
  68 + 'currentPanelDate':this.selectDate.toDateString(),
  69 + 'currentNumber':this.swiperIndex,
  70 + })
53 } 71 }
54 }), 72 }),
55 alignment: DialogAlignment.Top, 73 alignment: DialogAlignment.Top,
@@ -189,7 +207,7 @@ export struct ENewspaperPageComponent { @@ -189,7 +207,7 @@ export struct ENewspaperPageComponent {
189 if (this.newspaperListBean && this.newspaperListBean.list && this.newspaperListBean.list.length > 0) { 207 if (this.newspaperListBean && this.newspaperListBean.list && this.newspaperListBean.list.length > 0) {
190 Swiper(this.swiperController) { 208 Swiper(this.swiperController) {
191 ForEach(this.newspaperListBean?.list, (item: NewspaperListItemBean, index: number) => { 209 ForEach(this.newspaperListBean?.list, (item: NewspaperListItemBean, index: number) => {
192 - ENewspaperItemComponent({ newspaperListItemBean: item }) 210 + ENewspaperItemComponent({ newspaperListItemBean: item})
193 }) 211 })
194 } 212 }
195 .index(this.swiperIndex) 213 .index(this.swiperIndex)
@@ -244,6 +262,12 @@ export struct ENewspaperPageComponent { @@ -244,6 +262,12 @@ export struct ENewspaperPageComponent {
244 .id('e_newspaper_next') 262 .id('e_newspaper_next')
245 .onClick((event: ClickEvent) => { 263 .onClick((event: ClickEvent) => {
246 this.swiperController.showNext() 264 this.swiperController.showNext()
  265 + // 电子报--滑动查看下一版
  266 + TrackingButton.click('panelPageViewNextPanel',TrackConstants.PageName.NewsPaperPage,TrackConstants.PageName.NewsPaperPage
  267 + ,{
  268 + 'panelNumber':this.newspaperListBean?.list[this.swiperIndex].pageNum,
  269 + 'panelName':this.newspaperListBean?.list[this.swiperIndex].pageName,
  270 + })
247 }) 271 })
248 } 272 }
249 273
@@ -270,6 +294,10 @@ export struct ENewspaperPageComponent { @@ -270,6 +294,10 @@ export struct ENewspaperPageComponent {
270 }) 294 })
271 .id('e_newspaper_page_num') 295 .id('e_newspaper_page_num')
272 .onClick((event: ClickEvent) => { 296 .onClick((event: ClickEvent) => {
  297 + if(!NetworkUtil.isNetConnected()){
  298 + ToastUtils.showToast('网络出小差了,请检查网络后重试', 1000)
  299 + return
  300 + }
273 if (this.newspaperListBean.list && this.newspaperListBean.list.length > 0) { 301 if (this.newspaperListBean.list && this.newspaperListBean.list.length > 0) {
274 this.pageDialogShow = !this.pageDialogShow 302 this.pageDialogShow = !this.pageDialogShow
275 if (this.pageDialogShow) { 303 if (this.pageDialogShow) {
@@ -305,8 +333,20 @@ export struct ENewspaperPageComponent { @@ -305,8 +333,20 @@ export struct ENewspaperPageComponent {
305 }) 333 })
306 .id('e_newspaper_read') 334 .id('e_newspaper_read')
307 .onClick((event: ClickEvent) => { 335 .onClick((event: ClickEvent) => {
  336 + if(!NetworkUtil.isNetConnected()){
  337 + ToastUtils.showToast('网络出小差了,请检查网络后重试', 1000)
  338 + return
  339 + }
308 if (this.newspaperListBean.list && this.newspaperListBean.list.length > 0) { 340 if (this.newspaperListBean.list && this.newspaperListBean.list.length > 0) {
309 this.isOpenListDialog = true 341 this.isOpenListDialog = true
  342 + //电子报--读报纸点击
  343 + TrackingContent.commentClickWithEvent('read_newspaper_click',TrackConstants.PageName.NewsPaperPage,TrackConstants.PageName.NewsPaperPage
  344 + ,{
  345 + 'panelNumber':this.newspaperListBean?.list[this.swiperIndex].pageNum,
  346 + 'panelName':this.newspaperListBean?.list[this.swiperIndex].pageName,
  347 + 'currentPanelDate':this.selectDate.toDateString(),
  348 + 'currentNumber':this.swiperIndex,
  349 + })
310 }else { 350 }else {
311 ToastUtils.showToast('暂无数据', 1000) 351 ToastUtils.showToast('暂无数据', 1000)
312 } 352 }
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 { TrackConstants, TrackingButton, TrackingPageBrowse } from 'wdTracking/Index';
13 14
14 const TAG = 'FeedBackActivity' 15 const TAG = 'FeedBackActivity'
15 16
@@ -20,6 +21,7 @@ const TAG = 'FeedBackActivity' @@ -20,6 +21,7 @@ const TAG = 'FeedBackActivity'
20 @Entry 21 @Entry
21 @Component 22 @Component
22 export struct FeedBackActivity { 23 export struct FeedBackActivity {
  24 + pageShowTime:number = 0;
23 @State canSubmit: boolean = false; 25 @State canSubmit: boolean = false;
24 @State textNumLabel: string = '0/500'; 26 @State textNumLabel: string = '0/500';
25 contact: string = ""; 27 contact: string = "";
@@ -50,7 +52,7 @@ export struct FeedBackActivity { @@ -50,7 +52,7 @@ export struct FeedBackActivity {
50 .fontSize($r('app.float.font_size_16')) 52 .fontSize($r('app.float.font_size_16'))
51 .fontWeight(FontWeight.Bold) 53 .fontWeight(FontWeight.Bold)
52 .width('100%') 54 .width('100%')
53 - .margin({ left: $r('app.float.vp_15'), top: $r('app.float.vp_14') }) 55 + .margin({ left: 24, top: $r('app.float.vp_14') })
54 GridRow({ 56 GridRow({
55 columns:3, 57 columns:3,
56 }) { 58 }) {
@@ -62,6 +64,11 @@ export struct FeedBackActivity { @@ -62,6 +64,11 @@ export struct FeedBackActivity {
62 .onChange((select) => { 64 .onChange((select) => {
63 feedbackTypeBean.isSelect = select 65 feedbackTypeBean.isSelect = select
64 this.canSubmit = this.checkSubmit() 66 this.canSubmit = this.checkSubmit()
  67 +
  68 + TrackingButton.click('submit_feedback',TrackConstants.PageName.FeedbackPage,TrackConstants.PageName.FeedbackPage,{
  69 + 'feedback_type':feedbackTypeBean.id+''
  70 + })
  71 +
65 }) 72 })
66 Text(feedbackTypeBean.classifyName) 73 Text(feedbackTypeBean.classifyName)
67 .fontColor($r('app.color.color_222222')) 74 .fontColor($r('app.color.color_222222'))
@@ -75,7 +82,7 @@ export struct FeedBackActivity { @@ -75,7 +82,7 @@ export struct FeedBackActivity {
75 } 82 }
76 }) 83 })
77 } 84 }
78 - .width('100%') 85 + .width('94%')
79 .margin({top:$r('app.float.vp_16')}) 86 .margin({top:$r('app.float.vp_16')})
80 Blank() 87 Blank()
81 .height($r('app.float.margin_5')) 88 .height($r('app.float.margin_5'))
@@ -85,7 +92,7 @@ export struct FeedBackActivity { @@ -85,7 +92,7 @@ export struct FeedBackActivity {
85 .fontSize($r('app.float.font_size_16')) 92 .fontSize($r('app.float.font_size_16'))
86 .fontWeight(FontWeight.Bold) 93 .fontWeight(FontWeight.Bold)
87 .width(CommonConstants.FULL_WIDTH) 94 .width(CommonConstants.FULL_WIDTH)
88 - .margin({ left: $r('app.float.vp_16'), top: $r('app.float.vp_12') }) 95 + .margin({ left: 24, top: $r('app.float.vp_12') })
89 Stack({ alignContent: Alignment.BottomEnd }) { 96 Stack({ alignContent: Alignment.BottomEnd }) {
90 TextArea({ placeholder: $r('app.string.feedback_comments') }) 97 TextArea({ placeholder: $r('app.string.feedback_comments') })
91 .width(CommonConstants.FULL_WIDTH) 98 .width(CommonConstants.FULL_WIDTH)
@@ -108,15 +115,15 @@ export struct FeedBackActivity { @@ -108,15 +115,15 @@ export struct FeedBackActivity {
108 GridCol({ 115 GridCol({
109 }) { 116 }) {
110 if(1 == feedbackImageItem.itemType){ 117 if(1 == feedbackImageItem.itemType){
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 - }) 118 + // Image($r('app.media.feekback_add'))
  119 + // .width(60)
  120 + // .height(60)
  121 + // .onClick(async (event: ClickEvent) => {
  122 + // if(await FastClickUtil.isMinDelayTime()){
  123 + // return
  124 + // }
  125 + // this.callFilePickerSelectImage();
  126 + // })
120 }else{ 127 }else{
121 Stack({alignContent: Alignment.TopEnd}) { 128 Stack({alignContent: Alignment.TopEnd}) {
122 Image(feedbackImageItem.picPath) 129 Image(feedbackImageItem.picPath)
@@ -165,7 +172,7 @@ export struct FeedBackActivity { @@ -165,7 +172,7 @@ export struct FeedBackActivity {
165 .margin({bottom: $r('app.float.vp_12'), right: $r('app.float.vp_11')}) 172 .margin({bottom: $r('app.float.vp_12'), right: $r('app.float.vp_11')})
166 } 173 }
167 .height(200) 174 .height(200)
168 - .width('90%') 175 + .width('94%')
169 .margin({ top: $r('app.float.vp_12') }) 176 .margin({ top: $r('app.float.vp_12') })
170 .backgroundColor($r('app.color.color_F5F5F5')) 177 .backgroundColor($r('app.color.color_F5F5F5'))
171 .borderRadius(4) 178 .borderRadius(4)
@@ -176,9 +183,8 @@ export struct FeedBackActivity { @@ -176,9 +183,8 @@ export struct FeedBackActivity {
176 Text($r('app.string.feedback_email')) 183 Text($r('app.string.feedback_email'))
177 .fontColor($r('app.color.color_222222')) 184 .fontColor($r('app.color.color_222222'))
178 .fontSize($r('app.float.font_size_14')) 185 .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') }) 186 + .width('94%')
  187 + .margin({ top: $r('app.float.margin_24') })
182 Row() { 188 Row() {
183 Text($r('app.string.feedback_mail')) 189 Text($r('app.string.feedback_mail'))
184 .fontColor($r('app.color.color_222222')) 190 .fontColor($r('app.color.color_222222'))
@@ -187,6 +193,7 @@ export struct FeedBackActivity { @@ -187,6 +193,7 @@ export struct FeedBackActivity {
187 TextInput({ placeholder: $r('app.string.feedback_hideemail') }) 193 TextInput({ placeholder: $r('app.string.feedback_hideemail') })
188 .width(CommonConstants.FULL_WIDTH) 194 .width(CommonConstants.FULL_WIDTH)
189 .height(CommonConstants.FULL_HEIGHT) 195 .height(CommonConstants.FULL_HEIGHT)
  196 + // .margin({left:15})
190 .backgroundColor($r('app.color.color_F5F5F5')) 197 .backgroundColor($r('app.color.color_F5F5F5'))
191 .onChange((value) => { 198 .onChange((value) => {
192 // Logger.debug(TAG, "onChange" + value + "/" + this.passwordContent) 199 // Logger.debug(TAG, "onChange" + value + "/" + this.passwordContent)
@@ -194,7 +201,7 @@ export struct FeedBackActivity { @@ -194,7 +201,7 @@ export struct FeedBackActivity {
194 }) 201 })
195 } 202 }
196 .height(44) 203 .height(44)
197 - .width('90%') 204 + .width('94%')
198 .backgroundColor($r('app.color.color_F5F5F5')) 205 .backgroundColor($r('app.color.color_F5F5F5'))
199 .margin({top: $r('app.float.margin_16') }) 206 .margin({top: $r('app.float.margin_16') })
200 .borderRadius(4) 207 .borderRadius(4)
@@ -338,9 +345,13 @@ export struct FeedBackActivity { @@ -338,9 +345,13 @@ export struct FeedBackActivity {
338 }) 345 })
339 if(!StringUtils.isEmpty(selectType)){ 346 if(!StringUtils.isEmpty(selectType)){
340 selectType = selectType.substring(0,selectType.length-1) 347 selectType = selectType.substring(0,selectType.length-1)
  348 + TrackingButton.click('feedbackPageSubmitFeedback',TrackConstants.PageName.FeedbackPage,TrackConstants.PageName.FeedbackPage,{
  349 + 'feedbackTypeId':selectType
  350 + })
341 }else{ 351 }else{
342 // 352 //
343 ToastUtils.shortToast($r('app.string.feedback_opinion_type')) 353 ToastUtils.shortToast($r('app.string.feedback_opinion_type'))
  354 + TrackingButton.click('feedbackPageSubmitFeedback',TrackConstants.PageName.FeedbackPage,TrackConstants.PageName.FeedbackPage)
344 return 355 return
345 } 356 }
346 //内容必填 357 //内容必填
@@ -380,4 +391,12 @@ export struct FeedBackActivity { @@ -380,4 +391,12 @@ export struct FeedBackActivity {
380 } 391 }
381 } 392 }
382 393
  394 + onPageShow() {
  395 + this.pageShowTime = DateTimeUtils.getTimeStamp()
  396 + }
  397 + onPageHide() {
  398 + //页面浏览
  399 + TrackingPageBrowse.trackCommonPageExposureEnd(TrackConstants.PageName.FeedbackPage,TrackConstants.PageName.FeedbackPage,Math.floor((DateTimeUtils.getTimeStamp() - this.pageShowTime)/1000))
  400 +
  401 + }
383 } 402 }
@@ -24,6 +24,10 @@ export struct ImageDownloadComponent { @@ -24,6 +24,10 @@ export struct ImageDownloadComponent {
24 24
25 build() { 25 build() {
26 Column() { 26 Column() {
  27 + // Image($r('app.media.save_detail_img'))
  28 + // .width(24)
  29 + // .height(24)
  30 + // .margin({bottom:6})
27 SaveButton({ icon: SaveIconStyle.LINES }) 31 SaveButton({ icon: SaveIconStyle.LINES })
28 .iconSize(24) 32 .iconSize(24)
29 .iconColor(Color.White) 33 .iconColor(Color.White)
@@ -33,7 +37,8 @@ export struct ImageDownloadComponent { @@ -33,7 +37,8 @@ export struct ImageDownloadComponent {
33 await this.saveImage(this.imageBuffer); 37 await this.saveImage(this.imageBuffer);
34 promptAction.showToast({ 38 promptAction.showToast({
35 message: $r('app.string.image_request_success'), 39 message: $r('app.string.image_request_success'),
36 - duration: 2000 40 + duration: 2000,
  41 + alignment:Alignment.Center
37 }) 42 })
38 } 43 }
39 }) 44 })
@@ -67,6 +67,7 @@ export struct MorningEveningPaperComponent { @@ -67,6 +67,7 @@ export struct MorningEveningPaperComponent {
67 // 顶部安全高度赋值 67 // 顶部安全高度赋值
68 @State topSafeHeight: number = 0; 68 @State topSafeHeight: number = 0;
69 @State bottomSafeHeight: number = 0; 69 @State bottomSafeHeight: number = 0;
  70 + @State isHasTopView: boolean = false;
70 71
71 private audioDataList: AudioDataList[] = [] 72 private audioDataList: AudioDataList[] = []
72 private playerController: WDPlayerController = new WDPlayerController(); 73 private playerController: WDPlayerController = new WDPlayerController();
@@ -144,7 +145,10 @@ export struct MorningEveningPaperComponent { @@ -144,7 +145,10 @@ export struct MorningEveningPaperComponent {
144 145
145 Logger.info(TAG, "pageInfoBean dateTime = " + dateTime) 146 Logger.info(TAG, "pageInfoBean dateTime = " + dateTime)
146 Logger.info(TAG, "pageInfoBean subTitle = " + this.subTitle) 147 Logger.info(TAG, "pageInfoBean subTitle = " + this.subTitle)
147 - this.setComponentBgColor(pageInfoBean.backgroundImgUrl) 148 +
  149 + this.isHasTopView = this.pageInfoBean?.topicInfo?.frontLinkObject?true:false
  150 + let coverUrl = this.isHasTopView?this.pageInfoBean?.topicInfo?.frontLinkObject?.coverUrl as string :''
  151 + this.setComponentBgColor(coverUrl)
148 152
149 let compInfoBean = await MorningEveningViewModel.getMorningEveningCompInfo(pageInfoBean?.id, pageInfoBean?.groups[0]?.id, currentTime + "", pageInfoBean?.topicInfo?.topicId) 153 let compInfoBean = await MorningEveningViewModel.getMorningEveningCompInfo(pageInfoBean?.id, pageInfoBean?.groups[0]?.id, currentTime + "", pageInfoBean?.topicInfo?.topicId)
150 // this.compInfoBean = compInfoBean 154 // this.compInfoBean = compInfoBean
@@ -201,11 +205,9 @@ export struct MorningEveningPaperComponent { @@ -201,11 +205,9 @@ export struct MorningEveningPaperComponent {
201 // const pixelMap: image.PixelMap = await image2PixelMap(item.icon); 205 // const pixelMap: image.PixelMap = await image2PixelMap(item.icon);
202 Logger.debug(TAG, "compInfoBean compStyle = " + imageUrl) 206 Logger.debug(TAG, "compInfoBean compStyle = " + imageUrl)
203 207
  208 + if (imageUrl.length > 0 && this.pageInfoBean.topicInfo.frontFlag === 1) {
204 const imageSource: image.ImageSource | undefined = await getPicture(imageUrl) 209 const imageSource: image.ImageSource | undefined = await getPicture(imageUrl)
205 -  
206 - if (imageSource && this.pageInfoBean.topicInfo.frontFlag === 1) {  
207 this.pickColor(imageSource) 210 this.pickColor(imageSource)
208 -  
209 } else { 211 } else {
210 if (this.pageInfoBean.topicInfo.topicPattern === 1) { 212 if (this.pageInfoBean.topicInfo.topicPattern === 1) {
211 this.mixedBgColor = '#66BDBD' 213 this.mixedBgColor = '#66BDBD'
@@ -223,8 +225,7 @@ export struct MorningEveningPaperComponent { @@ -223,8 +225,7 @@ export struct MorningEveningPaperComponent {
223 effectKit.createColorPicker(pixelMap, (err, colorPicker) => { 225 effectKit.createColorPicker(pixelMap, (err, colorPicker) => {
224 let color = colorPicker.getMainColorSync(); 226 let color = colorPicker.getMainColorSync();
225 Logger.debug(TAG, "compInfoBean compStyle = " + color) 227 Logger.debug(TAG, "compInfoBean compStyle = " + color)
226 -  
227 - color = ColorUtils.getMorningEveningPaperRgb({red:color.red,green:color.green,blue:color.blue,alpha:color.alpha}) 228 + // color = ColorUtils.getMorningEveningPaperRgb({red:color.red,green:color.green,blue:color.blue,alpha:color.alpha})
228 // 将取色器选取的color示例转换为十六进制颜色代码 229 // 将取色器选取的color示例转换为十六进制颜色代码
229 this.mixedBgColor = "#" + color.alpha.toString(16) + color.red.toString(16) + color.green.toString(16) + color.blue.toString(16); 230 this.mixedBgColor = "#" + color.alpha.toString(16) + color.red.toString(16) + color.green.toString(16) + color.blue.toString(16);
230 Logger.debug(TAG, "compInfoBean compStyle = " + this.mixedBgColor) 231 Logger.debug(TAG, "compInfoBean compStyle = " + this.mixedBgColor)
@@ -239,15 +240,9 @@ export struct MorningEveningPaperComponent { @@ -239,15 +240,9 @@ export struct MorningEveningPaperComponent {
239 // WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#000000', }) 240 // WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#000000', })
240 } 241 }
241 242
242 - onPageShow(){  
243 - TrackingPageBrowseUtils.TrackingPageBrowseExposureStart()  
244 - }  
245 -  
246 onPageHide() { 243 onPageHide() {
247 this.status = PlayerConstants.STATUS_PAUSE; 244 this.status = PlayerConstants.STATUS_PAUSE;
248 this.playerController?.pause(); 245 this.playerController?.pause();
249 -  
250 - TrackingPageBrowseUtils.TrackingPageBrowseExposureEnd('','',TrackParamConvert.pageInfoBean_ParamType(this.pageInfoBean))  
251 } 246 }
252 247
253 build() { 248 build() {
@@ -259,11 +254,12 @@ export struct MorningEveningPaperComponent { @@ -259,11 +254,12 @@ export struct MorningEveningPaperComponent {
259 topicInfoView({ frontLinkObject: this.pageInfoBean?.topicInfo?.frontLinkObject }) 254 topicInfoView({ frontLinkObject: this.pageInfoBean?.topicInfo?.frontLinkObject })
260 } 255 }
261 256
262 - if (this.audioPlayUrl.length > 0){  
263 - ListItem() {  
264 - this.AudioBarView(this.simpleAudioDialog)  
265 - }  
266 - } 257 + //暂时不展示音频播报
  258 + // if (this.audioPlayUrl.length > 0){
  259 + // ListItem() {
  260 + // this.AudioBarView(this.simpleAudioDialog)
  261 + // }
  262 + // }
267 } 263 }
268 264
269 ListItem() { 265 ListItem() {
@@ -276,19 +272,24 @@ export struct MorningEveningPaperComponent { @@ -276,19 +272,24 @@ export struct MorningEveningPaperComponent {
276 } 272 }
277 } 273 }
278 .height(`calc(100% - ${this.bottomSafeHeight + this.topSafeHeight + 'vp'})`).scrollBar(BarState.Off) 274 .height(`calc(100% - ${this.bottomSafeHeight + this.topSafeHeight + 'vp'})`).scrollBar(BarState.Off)
  275 + .onAreaChange((oldValue: Area, newValue: Area) => {
  276 + let persent = Math.abs(Number(newValue.globalPosition.y)) / 150
  277 + if (persent > 1) {
  278 + persent = 1
  279 + }
  280 + })
279 281
280 - PaperTitleComponent() 282 + PaperTitleComponent().margin({top:this.isHasTopView?this.topSafeHeight:0}).backgroundColor(this.mixedBgColor).opacity(this.isHasTopView?0:1)
281 } 283 }
282 .width('100%') 284 .width('100%')
283 .height('100%') 285 .height('100%')
284 .padding({ 286 .padding({
285 - top: this.topSafeHeight,  
286 - bottom: this.bottomSafeHeight 287 + top: this.isHasTopView?0:this.topSafeHeight,
  288 + // bottom: this.bottomSafeHeight
287 }) 289 })
288 // .backgroundColor(Color.Black) 290 // .backgroundColor(Color.Black)
289 // .backgroundColor(this.pageInfoBean?.backgroundColor ?? Color.Black) 291 // .backgroundColor(this.pageInfoBean?.backgroundColor ?? Color.Black)
290 .backgroundColor(this.mixedBgColor ?? Color.Black) 292 .backgroundColor(this.mixedBgColor ?? Color.Black)
291 -  
292 } 293 }
293 294
294 @Builder 295 @Builder
@@ -32,6 +32,7 @@ export struct topicInfoView { @@ -32,6 +32,7 @@ export struct topicInfoView {
32 }) 32 })
33 .id('img_cover') 33 .id('img_cover')
34 34
  35 + if (this.frontLinkObject) {
35 Row() { 36 Row() {
36 Text("查看详情") 37 Text("查看详情")
37 .fontSize(14) 38 .fontSize(14)
@@ -49,19 +50,19 @@ export struct topicInfoView { @@ -49,19 +50,19 @@ export struct topicInfoView {
49 .margin({ top: 8, left: 16, right: 16, bottom: 16 }) 50 .margin({ top: 8, left: 16, right: 16, bottom: 16 })
50 .borderRadius(2) 51 .borderRadius(2)
51 .onClick(()=>{ 52 .onClick(()=>{
52 - if (this.frontLinkObject) {  
53 let contentDTO :ContentDTO = new ContentDTO(); 53 let contentDTO :ContentDTO = new ContentDTO();
54 contentDTO.objectType = this.frontLinkObject?.newsType.toString() 54 contentDTO.objectType = this.frontLinkObject?.newsType.toString()
55 contentDTO.objectId = this.frontLinkObject?.newsId 55 contentDTO.objectId = this.frontLinkObject?.newsId
56 contentDTO.linkUrl = this.frontLinkObject?.linkUrl 56 contentDTO.linkUrl = this.frontLinkObject?.linkUrl
57 ProcessUtils.processPage(contentDTO) 57 ProcessUtils.processPage(contentDTO)
58 - } 58 +
59 }).width(80) 59 }).width(80)
60 .alignRules({ 60 .alignRules({
61 left: { anchor: "__container__", align: HorizontalAlign.Start }, 61 left: { anchor: "__container__", align: HorizontalAlign.Start },
62 bottom: { anchor: "__container__", align: VerticalAlign.Bottom } 62 bottom: { anchor: "__container__", align: VerticalAlign.Bottom }
63 }) 63 })
64 .id('row_detail') 64 .id('row_detail')
  65 + }
65 66
66 Text(this.frontLinkObject?.summary ?? "") 67 Text(this.frontLinkObject?.summary ?? "")
67 .margin({ top: 10 }) 68 .margin({ top: 10 })
@@ -84,6 +84,42 @@ export struct CardMediaInfo { @@ -84,6 +84,42 @@ export struct CardMediaInfo {
84 // liveInfo.liveState 直播新闻-直播状态 wait待开播running直播中end已结束cancel已取消paused暂停 84 // liveInfo.liveState 直播新闻-直播状态 wait待开播running直播中end已结束cancel已取消paused暂停
85 // 显示直播信息 85 // 显示直播信息
86 Row() { 86 Row() {
  87 + // 搜索接口没有返回liveInfo字段所以得做个区分
  88 + if (this.contentDTO && this.contentDTO.liveInfo && JSON.stringify(this.contentDTO.liveInfo) === '{}') {
  89 + // 当liveInfo不存在的时候
  90 + if (this.contentDTO?.liveType === 'wait') {
  91 + Image($r('app.media.card_wait'))
  92 + .mediaLogo()
  93 + Text('预约')
  94 + .mediaText()
  95 + } else if (this.contentDTO?.liveType === 'running') {
  96 + LottieView({
  97 + name: 'live_status_wait',
  98 + path: "lottie/live_detail_living.json",
  99 + lottieWidth: 14,
  100 + lottieHeight: 14,
  101 + autoplay: true,
  102 + loop: true,
  103 + })
  104 + .margin({
  105 + right: '2vp'
  106 + })
  107 + // Image($r('app.media.card_live'))
  108 + // .mediaLogo()
  109 + Text('直播中')
  110 + .mediaText()
  111 + } else if (this.contentDTO?.liveType === 'end' && this.contentDTO?.linkUrl) {
  112 + Image($r('app.media.card_play'))
  113 + .mediaLogo()
  114 + Text('回看')
  115 + .mediaText()
  116 + }else if(this.contentDTO?.liveInfo?.liveState === 'end' && !this.contentDTO?.linkUrl){
  117 + Text('已结束')
  118 + .mediaText()
  119 + }
  120 + }else {
  121 + // 当liveInfo存在时后
  122 +
87 if (this.contentDTO?.liveInfo?.liveState === 'wait') { 123 if (this.contentDTO?.liveInfo?.liveState === 'wait') {
88 Image($r('app.media.card_wait')) 124 Image($r('app.media.card_wait'))
89 .mediaLogo() 125 .mediaLogo()
@@ -115,6 +151,8 @@ export struct CardMediaInfo { @@ -115,6 +151,8 @@ export struct CardMediaInfo {
115 Text('已结束') 151 Text('已结束')
116 .mediaText() 152 .mediaText()
117 } 153 }
  154 +
  155 + }
118 if (!!this.joinPeopleNum) { 156 if (!!this.joinPeopleNum) {
119 Text(' | ') 157 Text(' | ')
120 .mediaText() 158 .mediaText()
@@ -136,6 +174,7 @@ export struct CardMediaInfo { @@ -136,6 +174,7 @@ export struct CardMediaInfo {
136 .mediaLogo() 174 .mediaLogo()
137 Text(`${this.contentDTO.photoNum}`) 175 Text(`${this.contentDTO.photoNum}`)
138 .mediaTextImgtype() 176 .mediaTextImgtype()
  177 + .fontFamily('BebasNeue')
139 } 178 }
140 .margin({ left: 80,top: 55}) 179 .margin({ left: 80,top: 55})
141 180
@@ -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
@@ -27,6 +27,7 @@ export struct Card17Component { @@ -27,6 +27,7 @@ export struct Card17Component {
27 @State str03: string = ''; 27 @State str03: string = '';
28 28
29 async aboutToAppear(): Promise<void> { 29 async aboutToAppear(): Promise<void> {
  30 + console.log('Card17Component', JSON.stringify(this.contentDTO))
30 this.titleInit(); 31 this.titleInit();
31 this.clicked = hasClicked(this.contentDTO.objectId) 32 this.clicked = hasClicked(this.contentDTO.objectId)
32 this.loadImg = await onlyWifiLoadImg(); 33 this.loadImg = await onlyWifiLoadImg();
@@ -65,7 +66,7 @@ export struct Card17Component { @@ -65,7 +66,7 @@ export struct Card17Component {
65 GridRow({ gutter: 2 }) { 66 GridRow({ gutter: 2 }) {
66 GridCol({ span: { xs: 8 } }) { 67 GridCol({ span: { xs: 8 } }) {
67 Image(this.loadImg ? 68 Image(this.loadImg ?
68 - this.contentDTO.fullColumnImgUrls.length > 0 ? this.contentDTO.fullColumnImgUrls[0].url : '' : '') 69 + this.contentDTO.fullColumnImgUrls.length > 0 ? this.contentDTO.fullColumnImgUrls[0].url || this.contentDTO.fullColumnImgUrls[0].fullUrl : '' : '')
69 .backgroundColor(this.loadImg ? '#f5f5f5' : 0xf5f5f5) 70 .backgroundColor(this.loadImg ? '#f5f5f5' : 0xf5f5f5)
70 .width(CommonConstants.FULL_WIDTH) 71 .width(CommonConstants.FULL_WIDTH)
71 .height(160)// .aspectRatio(CompUtils.ASPECT_RATIO_16_9) 72 .height(160)// .aspectRatio(CompUtils.ASPECT_RATIO_16_9)
@@ -77,7 +78,7 @@ export struct Card17Component { @@ -77,7 +78,7 @@ export struct Card17Component {
77 78
78 GridCol({ span: { xs: 4 } }) { 79 GridCol({ span: { xs: 4 } }) {
79 Image(this.loadImg ? 80 Image(this.loadImg ?
80 - this.contentDTO.fullColumnImgUrls.length > 1 ? this.contentDTO.fullColumnImgUrls[1].url : '' : '') 81 + this.contentDTO.fullColumnImgUrls.length > 1 ? this.contentDTO.fullColumnImgUrls[1].url || this.contentDTO.fullColumnImgUrls[1].fullUrl : '' : '')
81 .backgroundColor(this.loadImg ? '#f5f5f5' : 0xf5f5f5) 82 .backgroundColor(this.loadImg ? '#f5f5f5' : 0xf5f5f5)
82 .width(CommonConstants.FULL_WIDTH) 83 .width(CommonConstants.FULL_WIDTH)
83 .height(79)// .aspectRatio(CompUtils.ASPECT_RATIO_16_9) 84 .height(79)// .aspectRatio(CompUtils.ASPECT_RATIO_16_9)
@@ -94,7 +95,7 @@ export struct Card17Component { @@ -94,7 +95,7 @@ export struct Card17Component {
94 95
95 GridCol({ span: { xs: 4 } }) { 96 GridCol({ span: { xs: 4 } }) {
96 Image(this.loadImg ? 97 Image(this.loadImg ?
97 - this.contentDTO.fullColumnImgUrls.length > 2 ? this.contentDTO.fullColumnImgUrls[2].url : '' : '') 98 + this.contentDTO.fullColumnImgUrls.length > 2 ? this.contentDTO.fullColumnImgUrls[2].url || this.contentDTO.fullColumnImgUrls[2].fullUrl : '' : '')
98 .backgroundColor(this.loadImg ? '#f5f5f5' : 0xf5f5f5) 99 .backgroundColor(this.loadImg ? '#f5f5f5' : 0xf5f5f5)
99 .width(CommonConstants.FULL_WIDTH) 100 .width(CommonConstants.FULL_WIDTH)
100 .height(79)// .aspectRatio(CompUtils.ASPECT_RATIO_16_9) 101 .height(79)// .aspectRatio(CompUtils.ASPECT_RATIO_16_9)
@@ -97,13 +97,14 @@ struct createImg { @@ -97,13 +97,14 @@ struct createImg {
97 @State loadImg: boolean = false; 97 @State loadImg: boolean = false;
98 98
99 async aboutToAppear(): Promise<void> { 99 async aboutToAppear(): Promise<void> {
  100 + console.log("createImg", JSON.stringify(this.contentDTO.fullColumnImgUrls))
100 this.loadImg = await onlyWifiLoadImg(); 101 this.loadImg = await onlyWifiLoadImg();
101 } 102 }
102 103
103 104
104 build() { 105 build() {
105 GridRow() { 106 GridRow() {
106 - if (this.contentDTO.fullColumnImgUrls[0].landscape === 1 || this.contentDTO.fullColumnImgUrls[0].weight > this.contentDTO.fullColumnImgUrls[0].height) { 107 + if (this.contentDTO.fullColumnImgUrls[0].landscape === 1) {
107 // 横屏 108 // 横屏
108 GridCol({ 109 GridCol({
109 span: { xs: 12 } 110 span: { xs: 12 }
@@ -131,6 +132,7 @@ struct createImg { @@ -131,6 +132,7 @@ struct createImg {
131 .backgroundColor(0xf5f5f5) 132 .backgroundColor(0xf5f5f5)
132 .width(CommonConstants.FULL_WIDTH) 133 .width(CommonConstants.FULL_WIDTH)
133 .borderRadius($r('app.float.image_border_radius')) 134 .borderRadius($r('app.float.image_border_radius'))
  135 + .aspectRatio(172 / 230)
134 CardMediaInfo({ contentDTO: this.contentDTO }) 136 CardMediaInfo({ contentDTO: this.contentDTO })
135 } 137 }
136 .align(Alignment.BottomEnd) 138 .align(Alignment.BottomEnd)
@@ -50,14 +50,38 @@ export struct Card2Component { @@ -50,14 +50,38 @@ export struct Card2Component {
50 Column() { 50 Column() {
51 Column() { 51 Column() {
52 Stack() { 52 Stack() {
53 - //新闻标题 53 + // if(this.contentDTO.objectType == '5'){
  54 + // Notes({ objectType: this.contentDTO.objectType }).height(30).align(Alignment.Center)
  55 + // }else if(this.contentDTO.objectType == '2'){
  56 + // if(this.contentDTO.seoTags){
  57 + // Notes({ newTags: this.contentDTO.seoTags }).height(30).align(Alignment.Center)
  58 + // }else if(this.contentDTO.newTags){
  59 + // Notes({ newTags: this.contentDTO.newTags }).height(30).align(Alignment.Center)
  60 + //
  61 + // }
  62 + // }else {
  63 + // if(this.contentDTO.newTags){
  64 + // Notes({ newTags: this.contentDTO.newTags }).height(30).align(Alignment.Center)
  65 + // }
  66 + // }
  67 + if(this.contentDTO.objectType == '5'){
  68 + Notes({ objectType: this.contentDTO.objectType }).height(30).align(Alignment.Center)
  69 + } else {
  70 + if (this.contentDTO.seoTags) {
  71 + Notes({ newTags: this.contentDTO.seoTags }).height(30).align(Alignment.Center)
  72 + }
54 if (this.contentDTO.newTags) { 73 if (this.contentDTO.newTags) {
55 Notes({ newTags: this.contentDTO.newTags }).height(30).align(Alignment.Center) 74 Notes({ newTags: this.contentDTO.newTags }).height(30).align(Alignment.Center)
56 - //Notes({ newTags: this.contentDTO.newTags })  
57 - } else if (this.contentDTO.objectType == '5') {  
58 - Notes({ objectType: this.contentDTO.objectType }).height(30).align(Alignment.Center)  
59 - //Notes({ objectType: this.contentDTO.objectType })  
60 } 75 }
  76 + }
  77 + //新闻标题
  78 + // if (this.contentDTO.newTags) {
  79 + //
  80 + // //Notes({ newTags: this.contentDTO.newTags })
  81 + // } else if (this.contentDTO.objectType == '5') {
  82 + //
  83 + // //Notes({ objectType: this.contentDTO.objectType })
  84 + // }
61 85
62 Text() { 86 Text() {
63 if (this.titleMarked) { 87 if (this.titleMarked) {
@@ -75,9 +99,10 @@ export struct Card2Component { @@ -75,9 +99,10 @@ export struct Card2Component {
75 .lineHeight(27) 99 .lineHeight(27)
76 .textOverflow({ overflow: TextOverflow.Ellipsis }) // 超出的部分显示省略号。 100 .textOverflow({ overflow: TextOverflow.Ellipsis }) // 超出的部分显示省略号。
77 .align(Alignment.Start) 101 .align(Alignment.Start)
78 - .textIndent(this.contentDTO.newTags?.length < 5 && this.contentDTO.newTags?.length > 2 ? 58 :  
79 - (this.contentDTO.newTags?.length != 0 && this.contentDTO.newTags?.length) ||  
80 - this.contentDTO.objectType == '5' ? 35 : 0) 102 + .textIndent((this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) > 2 &&
  103 + (this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) < 5 ? 58 :
  104 + ((this.contentDTO.newTags?.length > 0 || this.contentDTO.seoTags?.length > 0) || this.contentDTO.objectType == '5') ? 35 :
  105 + 0 )
81 }.alignContent(Alignment.TopStart) 106 }.alignContent(Alignment.TopStart)
82 107
83 //.textIndent(this.contentDTO.objectType == '5' ? 35 : 0) 108 //.textIndent(this.contentDTO.objectType == '5' ? 35 : 0)
@@ -32,7 +32,6 @@ export struct Card6Component { @@ -32,7 +32,6 @@ 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 -  
36 titleInit() { 35 titleInit() {
37 if (this.contentDTO.title?.includes('<em>') && this.contentDTO.title?.includes('</em>')) { 36 if (this.contentDTO.title?.includes('<em>') && this.contentDTO.title?.includes('</em>')) {
38 this.titleMarked = true; 37 this.titleMarked = true;
@@ -57,11 +56,17 @@ export struct Card6Component { @@ -57,11 +56,17 @@ export struct Card6Component {
57 // .margin({ right: 2 }) 56 // .margin({ right: 2 })
58 // } 57 // }
59 Stack() { 58 Stack() {
  59 + if(this.contentDTO.objectType == '5'){
  60 + Notes({ objectType: this.contentDTO.objectType }).height(30).align(Alignment.Center)
  61 + } else {
  62 + if (this.contentDTO.seoTags) {
  63 + Notes({ newTags: this.contentDTO.seoTags }).height(30).align(Alignment.Center)
  64 + }
60 if (this.contentDTO.newTags) { 65 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) 66 + Notes({ newTags: this.contentDTO.newTags }).height(30).align(Alignment.Center)
64 } 67 }
  68 + }
  69 +
65 70
66 Text() { 71 Text() {
67 if (this.titleMarked) { 72 if (this.titleMarked) {
@@ -80,9 +85,10 @@ export struct Card6Component { @@ -80,9 +85,10 @@ export struct Card6Component {
80 .maxLines(3) 85 .maxLines(3)
81 .alignSelf(ItemAlign.Start) 86 .alignSelf(ItemAlign.Start)
82 .textOverflow({ overflow: TextOverflow.Ellipsis }) // 超出的部分显示省略号。 87 .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) 88 + .textIndent((this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) > 2 &&
  89 + (this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) < 5 ? 58 :
  90 + ((this.contentDTO.newTags?.length > 0 || this.contentDTO.seoTags?.length > 0) || this.contentDTO.objectType == '5') ? 35 :
  91 + 0 )
86 }.alignContent(Alignment.TopStart) 92 }.alignContent(Alignment.TopStart)
87 93
88 } 94 }
@@ -9,7 +9,7 @@ @@ -9,7 +9,7 @@
9 export struct Notes { 9 export struct Notes {
10 @State objectType: number | string = 5 10 @State objectType: number | string = 5
11 @State newTags: string = '' 11 @State newTags: string = ''
12 - 12 + @State seoTags: string = ''
13 build() { 13 build() {
14 if (this.returnTypeTitleFn()) { 14 if (this.returnTypeTitleFn()) {
15 Text(this.returnTypeTitleFn()) 15 Text(this.returnTypeTitleFn())
@@ -279,6 +279,7 @@ export struct CommentComponent { @@ -279,6 +279,7 @@ export struct CommentComponent {
279 279
280 if (commentListModel && commentListModel.list && commentListModel.list.length > 0) { 280 if (commentListModel && commentListModel.list && commentListModel.list.length > 0) {
281 281
  282 + this.allDatas.clearAllData() // 防止数据重复问题
282 commentListModel.list.forEach(element => { 283 commentListModel.list.forEach(element => {
283 element.hasMore = Number.parseInt(element.childCommentNum) ? true : false 284 element.hasMore = Number.parseInt(element.childCommentNum) ? true : false
284 let newModel = commentViewModel.deepCopyCommentItemModel(element) 285 let newModel = commentViewModel.deepCopyCommentItemModel(element)
1 -import { DisplayUtils, EmitterEventId, EmitterUtils } from 'wdKit/Index' 1 +import { DisplayUtils, EmitterEventId, EmitterUtils, ToastUtils } from 'wdKit/Index'
2 import { publishCommentModel } from '../model/PublishCommentModel' 2 import { publishCommentModel } from '../model/PublishCommentModel'
3 import { CommentCustomDialog } from './CommentCustomDialog' 3 import { CommentCustomDialog } from './CommentCustomDialog'
4 import measure from '@ohos.measure' 4 import measure from '@ohos.measure'
5 import { ContentDetailDTO } from 'wdBean/Index' 5 import { ContentDetailDTO } from 'wdBean/Index'
  6 +import { HttpUtils } from 'wdNetwork/Index'
  7 +import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'
6 8
7 @Preview 9 @Preview
8 @Component 10 @Component
@@ -120,6 +122,21 @@ export struct CommentTabComponent { @@ -120,6 +122,21 @@ export struct CommentTabComponent {
120 if(this.contentDetail.appstyle === 9) return 122 if(this.contentDetail.appstyle === 9) return
121 this.onCommentFocus && this.onCommentFocus() 123 this.onCommentFocus && this.onCommentFocus()
122 124
  125 + // 未登录,游客评论未打开 则先登录
  126 + if (!HttpUtils.isLogin()) {
  127 + if (this.contentDetail.visitorComment != 1) {
  128 + WDRouterRule.jumpWithPage(WDRouterPage.loginPage)
  129 + return
  130 + }
  131 + }
  132 +
  133 + if (this.contentDetail.openComment != 1 && this.contentDetail.commentDisplay != 1) {
  134 + ToastUtils.showToast("暂时无法评论", 3000)
  135 + return
  136 + }
  137 +
  138 + //TODO: 用户被禁言 也不能评论
  139 +
123 this.publishCommentModel.rootCommentId = '-1'; 140 this.publishCommentModel.rootCommentId = '-1';
124 this.publishCommentModel.parentId = '-1'; 141 this.publishCommentModel.parentId = '-1';
125 this.publishCommentModel.placeHolderText = "说两句..." 142 this.publishCommentModel.placeHolderText = "说两句..."
1 import { ViewType } from 'wdConstant/Index' 1 import { ViewType } from 'wdConstant/Index'
2 -import { DateTimeUtils, LazyDataSource, ToastUtils, WindowModel } from 'wdKit/Index' 2 +import { DateTimeUtils, LazyDataSource, Logger, ToastUtils, WindowModel } from 'wdKit/Index'
3 import { commentItemModel } from '../model/CommentModel' 3 import { commentItemModel } from '../model/CommentModel'
4 import commentViewModel from '../viewmodel/CommentViewModel' 4 import commentViewModel from '../viewmodel/CommentViewModel'
5 import { router, window } from '@kit.ArkUI' 5 import { router, window } from '@kit.ArkUI'
@@ -18,9 +18,8 @@ const TAG = 'QualityCommentsComponent'; @@ -18,9 +18,8 @@ const TAG = 'QualityCommentsComponent';
18 @Preview 18 @Preview
19 @Component 19 @Component
20 export struct QualityCommentsComponent { 20 export struct QualityCommentsComponent {
21 -  
22 //刷新 21 //刷新
23 - @State viewType:number = ViewType.LOADING; 22 + @State viewType: number = ViewType.LOADING;
24 @State hasMore: boolean = true; 23 @State hasMore: boolean = true;
25 @State currentPage: number = 1; 24 @State currentPage: number = 1;
26 private scroller: Scroller = new Scroller(); 25 private scroller: Scroller = new Scroller();
@@ -32,11 +31,9 @@ export struct QualityCommentsComponent { @@ -32,11 +31,9 @@ export struct QualityCommentsComponent {
32 currentWindowColor: string = '#FF4202' 31 currentWindowColor: string = '#FF4202'
33 @State allDatas: LazyDataSource<commentItemModel> = new LazyDataSource(); 32 @State allDatas: LazyDataSource<commentItemModel> = new LazyDataSource();
34 @State dialogController: CustomDialogController | null = null; 33 @State dialogController: CustomDialogController | null = null;
35 -  
36 /*必传*/ 34 /*必传*/
37 @State publishCommentModel: publishCommentModel = new publishCommentModel() 35 @State publishCommentModel: publishCommentModel = new publishCommentModel()
38 36
39 -  
40 aboutToDisappear(): void { 37 aboutToDisappear(): void {
41 // windowClass.setWindowSystemBarProperties({ statusBarColor: '#000' }) 38 // windowClass.setWindowSystemBarProperties({ statusBarColor: '#000' })
42 this.dialogController = null // 将dialogController置空 39 this.dialogController = null // 将dialogController置空
@@ -55,7 +52,7 @@ export struct QualityCommentsComponent { @@ -55,7 +52,7 @@ export struct QualityCommentsComponent {
55 this.showAlert() 52 this.showAlert()
56 } 53 }
57 54
58 - showAlert(){ 55 + showAlert() {
59 this.dialogController = new CustomDialogController({ 56 this.dialogController = new CustomDialogController({
60 builder: CommentCustomDialog({ 57 builder: CommentCustomDialog({
61 confirm: (value: Record<string, string>) => { 58 confirm: (value: Record<string, string>) => {
@@ -74,9 +71,11 @@ export struct QualityCommentsComponent { @@ -74,9 +71,11 @@ export struct QualityCommentsComponent {
74 }) 71 })
75 } 72 }
76 73
77 - getData(resolve?: (value: string | PromiseLike<string>) => void){ 74 + getData(resolve?: (value: string | PromiseLike<string>) => void) {
78 commentViewModel.fetchQualityCommentList(this.currentPage + '').then((commentListModel) => { 75 commentViewModel.fetchQualityCommentList(this.currentPage + '').then((commentListModel) => {
79 - if(resolve) resolve('刷新成功') 76 + if (resolve) {
  77 + resolve('刷新成功')
  78 + }
80 79
81 if (commentListModel && commentListModel.list && commentListModel.list.length > 0) { 80 if (commentListModel && commentListModel.list && commentListModel.list.length > 0) {
82 if (this.currentPage === 1) { 81 if (this.currentPage === 1) {
@@ -107,8 +106,13 @@ export struct QualityCommentsComponent { @@ -107,8 +106,13 @@ export struct QualityCommentsComponent {
107 // .aspectRatio(375 / 283); 106 // .aspectRatio(375 / 283);
108 } 107 }
109 .onAreaChange((oldValue: Area, newValue: Area) => { 108 .onAreaChange((oldValue: Area, newValue: Area) => {
110 -  
111 - let persent = Math.abs(Number(newValue.globalPosition.y)) / 150 109 + if (Number(oldValue.globalPosition.y) == 0 && Number(newValue.globalPosition.y) > 30) {
  110 + this.firstPositionY = Number(newValue.globalPosition.y)
  111 + return
  112 + }
  113 + Logger.debug(TAG, "oldValue.globalPosition.y : " + oldValue.globalPosition.y)
  114 + Logger.debug(TAG, "newValue.globalPosition.y : " + newValue.globalPosition.y + `,this.topSafeHeight : ` + this.topSafeHeight)
  115 + let persent = Math.abs(Number(newValue.globalPosition.y) - this.firstPositionY ) / 150 //- this.topSafeHeight) / 283
112 if (persent > 1) { 116 if (persent > 1) {
113 persent = 1 117 persent = 1
114 } 118 }
@@ -131,18 +135,20 @@ export struct QualityCommentsComponent { @@ -131,18 +135,20 @@ export struct QualityCommentsComponent {
131 center: { anchor: "__container__", align: VerticalAlign.Center }, 135 center: { anchor: "__container__", align: VerticalAlign.Center },
132 left: { anchor: "__container__", align: HorizontalAlign.Start } 136 left: { anchor: "__container__", align: HorizontalAlign.Start }
133 }) 137 })
134 - .offset({  
135 - y: (this.topSafeHeight / 2) + 'px'  
136 - }) 138 + // .offset({
  139 + // y: (this.topSafeHeight / 2) + 'px'
  140 + // })
137 .margin({ left: 16 }) 141 .margin({ left: 16 })
138 .onClick(() => { 142 .onClick(() => {
139 router.back() 143 router.back()
140 }) 144 })
141 } 145 }
142 .visibility(this.tileOpacity > 0 ? 1 : 0) 146 .visibility(this.tileOpacity > 0 ? 1 : 0)
143 - .height(this.topSafeHeight + vp2px(44) + 'px') 147 + // .height(this.topSafeHeight + vp2px(44) + 'px')
  148 + .height(44)
144 .width('100%') 149 .width('100%')
145 .backgroundColor($r('app.color.color_transparent')) 150 .backgroundColor($r('app.color.color_transparent'))
  151 + .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP])
146 } 152 }
147 153
148 /*导航栏*/ 154 /*导航栏*/
@@ -159,9 +165,9 @@ export struct QualityCommentsComponent { @@ -159,9 +165,9 @@ export struct QualityCommentsComponent {
159 center: { anchor: "__container__", align: VerticalAlign.Center }, 165 center: { anchor: "__container__", align: VerticalAlign.Center },
160 left: { anchor: "__container__", align: HorizontalAlign.Start } 166 left: { anchor: "__container__", align: HorizontalAlign.Start }
161 }) 167 })
162 - .offset({  
163 - y: (this.topSafeHeight / 2) + 'px'  
164 - }) 168 + // .offset({
  169 + // y: (this.topSafeHeight / 2) + 'px'
  170 + // })
165 .margin({ left: 16 }) 171 .margin({ left: 16 })
166 .onClick(() => { 172 .onClick(() => {
167 router.back() 173 router.back()
@@ -178,71 +184,76 @@ export struct QualityCommentsComponent { @@ -178,71 +184,76 @@ export struct QualityCommentsComponent {
178 center: { anchor: "__container__", align: VerticalAlign.Center }, 184 center: { anchor: "__container__", align: VerticalAlign.Center },
179 middle: { anchor: "__container__", align: HorizontalAlign.Center } 185 middle: { anchor: "__container__", align: HorizontalAlign.Center }
180 }) 186 })
181 - .offset({  
182 - y: (this.topSafeHeight / 2) + 'px'  
183 - }) 187 + // .offset({
  188 + // y: (this.topSafeHeight / 2) + 'px'
  189 + // })
184 } 190 }
185 .visibility(this.tileOpacity > 0 ? 0 : 1) 191 .visibility(this.tileOpacity > 0 ? 0 : 1)
186 .opacity(this.tileOpacity) 192 .opacity(this.tileOpacity)
187 - .height(this.topSafeHeight + vp2px(44) + 'px') 193 + // .height(this.topSafeHeight + vp2px(44) + 'px')
  194 + .height(44)
188 .width('100%') 195 .width('100%')
189 .backgroundColor($r('app.color.white')) 196 .backgroundColor($r('app.color.white'))
  197 + // .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP])
190 } 198 }
191 199
192 build() { 200 build() {
193 - Column() {  
194 -  
195 -  
196 Stack({ alignContent: Alignment.Top }) { 201 Stack({ alignContent: Alignment.Top }) {
197 -  
198 Scroll() { 202 Scroll() {
199 Column() { 203 Column() {
200 Stack() { 204 Stack() {
201 this.titleHeader() 205 this.titleHeader()
202 206
203 - if(this.viewType == ViewType.ERROR){ 207 + if (this.viewType == ViewType.ERROR) {
204 ErrorComponent() 208 ErrorComponent()
205 - }else if(this.viewType == ViewType.EMPTY){  
206 - EmptyComponent({emptyType:WDViewDefaultType.WDViewDefaultType_NoComment})  
207 - }else { 209 + } else if (this.viewType == ViewType.EMPTY) {
  210 + EmptyComponent({ emptyType: WDViewDefaultType.WDViewDefaultType_NoComment })
  211 + } else {
208 this.listLayout() 212 this.listLayout()
209 } 213 }
210 214
211 }.alignContent(Alignment.Top) 215 }.alignContent(Alignment.Top)
212 - }.backgroundColor(this.currentWindowColor).width('100%') 216 + }
  217 + .backgroundColor(this.currentWindowColor).width('100%')
213 } 218 }
214 .friction(0.6) 219 .friction(0.6)
215 .scrollBar(BarState.Off) 220 .scrollBar(BarState.Off)
216 .edgeEffect(EdgeEffect.None) 221 .edgeEffect(EdgeEffect.None)
217 - .width('100%')  
218 - .height('100%') 222 + // .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM])
219 223
220 this.TabbarTransparent() 224 this.TabbarTransparent()
221 this.TabbarNormal() 225 this.TabbarNormal()
222 -  
223 - }  
224 -  
225 } 226 }
  227 + .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM])
226 228
227 } 229 }
228 230
229 @Builder 231 @Builder
230 - listLayout(){  
231 - List({ space: 12, scroller:this.scroller }) { 232 + listLayout() {
  233 + List({ space: 12, scroller: this.scroller }) {
232 // ListItemGroup({ header: this.titleHeader() }) 234 // ListItemGroup({ header: this.titleHeader() })
233 LazyForEach(this.allDatas, (item: commentItemModel, index: number) => { 235 LazyForEach(this.allDatas, (item: commentItemModel, index: number) => {
234 ListItem() { 236 ListItem() {
235 - QualityCommentItem({ item: item, index: index , dialogController:this.dialogController, publishCommentModel:this.publishCommentModel}).margin({ left: 12, right: 12 }) 237 + QualityCommentItem({
  238 + item: item,
  239 + index: index,
  240 + dialogController: this.dialogController,
  241 + publishCommentModel: this.publishCommentModel
  242 + }).margin({ left: 12, right: 12 })
236 } 243 }
237 }) 244 })
238 // 加载更多 245 // 加载更多
239 ListItem() { 246 ListItem() {
240 - if (this.hasMore === false) NoMoreLayout() 247 + if (this.hasMore === false) {
  248 + NoMoreLayout()
  249 + }
241 } 250 }
  251 +
242 // ListItem() { 252 // ListItem() {
243 // 253 //
244 // }.height(`${this.bottomSafeHeight}` + 'px') 254 // }.height(`${this.bottomSafeHeight}` + 'px')
245 - }.onReachEnd(()=>{ 255 + }
  256 + .onReachEnd(() => {
246 this.currentPage++ 257 this.currentPage++
247 this.getData() 258 this.getData()
248 }) 259 })
@@ -255,14 +266,9 @@ export struct QualityCommentsComponent { @@ -255,14 +266,9 @@ export struct QualityCommentsComponent {
255 scrollBackward: NestedScrollMode.SELF_FIRST 266 scrollBackward: NestedScrollMode.SELF_FIRST
256 }) 267 })
257 } 268 }
258 -  
259 -  
260 -  
261 } 269 }
262 270
263 271
264 -  
265 -  
266 @Component 272 @Component
267 struct QualityCommentItem { 273 struct QualityCommentItem {
268 @ObjectLink publishCommentModel: publishCommentModel 274 @ObjectLink publishCommentModel: publishCommentModel
@@ -279,7 +285,8 @@ struct QualityCommentItem { @@ -279,7 +285,8 @@ struct QualityCommentItem {
279 285
280 Image(this.item.fromUserHeader) 286 Image(this.item.fromUserHeader)
281 287
282 - .alt($r(commentViewModel.adjustUserType(this.item.fromUserType) ? 'app.media.WDAccountOwnerHedaerDefaultIcon' : 'app.media.WDAccountDefaultIcon')) 288 + .alt($r(commentViewModel.adjustUserType(this.item.fromUserType) ?
  289 + 'app.media.WDAccountOwnerHedaerDefaultIcon' : 'app.media.WDAccountDefaultIcon'))
283 .width(50) 290 .width(50)
284 .height(50) 291 .height(50)
285 .borderRadius(25) 292 .borderRadius(25)
@@ -376,7 +383,7 @@ struct QualityCommentItem { @@ -376,7 +383,7 @@ struct QualityCommentItem {
376 Row() { 383 Row() {
377 Image($r('app.media.comment_icon_pinglun')).width(16).height(16) 384 Image($r('app.media.comment_icon_pinglun')).width(16).height(16)
378 }.height('100%') 385 }.height('100%')
379 - .onClick(()=>{ 386 + .onClick(() => {
380 this.replyComment() 387 this.replyComment()
381 }) 388 })
382 389
1 -import { CompDTO, ContentDTO, } from 'wdBean'; 1 +import { CompDTO, ContentDTO } from 'wdBean';
2 import { BreakpointConstants, CommonConstants } from 'wdConstant'; 2 import { BreakpointConstants, CommonConstants } from 'wdConstant';
3 import { BreakPointType, Logger } from 'wdKit'; 3 import { BreakPointType, Logger } from 'wdKit';
4 import { CompUtils } from '../../utils/CompUtils'; 4 import { CompUtils } from '../../utils/CompUtils';
@@ -11,6 +11,7 @@ import { InfomationCardClick } from '../../utils/infomationCardClick' @@ -11,6 +11,7 @@ import { InfomationCardClick } from '../../utils/infomationCardClick'
11 11
12 const TAG = 'Zh_Carousel_Layout-01'; 12 const TAG = 'Zh_Carousel_Layout-01';
13 13
  14 +
14 /** 15 /**
15 * 轮播组件,即Banner/轮播大图/焦点图/自动滑动 16 * 轮播组件,即Banner/轮播大图/焦点图/自动滑动
16 * 样式: 17 * 样式:
@@ -47,9 +48,11 @@ export struct ZhCarouselLayout01 { @@ -47,9 +48,11 @@ export struct ZhCarouselLayout01 {
47 @StorageLink('currentBreakpoint') @Watch('watchCurrentBreakpoint') currentBreakpoint: string = 48 @StorageLink('currentBreakpoint') @Watch('watchCurrentBreakpoint') currentBreakpoint: string =
48 BreakpointConstants.BREAKPOINT_XS; 49 BreakpointConstants.BREAKPOINT_XS;
49 @State compDTO: CompDTO = {} as CompDTO 50 @State compDTO: CompDTO = {} as CompDTO
  51 +
50 @State firstWd: number = 0 52 @State firstWd: number = 0
51 @State SecondWd: number = 0 53 @State SecondWd: number = 0
52 @State swiperIndex: number = 0 54 @State swiperIndex: number = 0
  55 +
53 private data: MyDataSource = new MyDataSource([]) 56 private data: MyDataSource = new MyDataSource([])
54 57
55 watchCurrentBreakpoint() { 58 watchCurrentBreakpoint() {
@@ -75,6 +78,7 @@ export struct ZhCarouselLayout01 { @@ -75,6 +78,7 @@ export struct ZhCarouselLayout01 {
75 } 78 }
76 79
77 build() { 80 build() {
  81 +
78 if (this.compDTO?.operDataList?.length) { 82 if (this.compDTO?.operDataList?.length) {
79 Stack() { 83 Stack() {
80 Swiper() { 84 Swiper() {
@@ -206,9 +210,19 @@ struct CarouselLayout01CardView { @@ -206,9 +210,19 @@ struct CarouselLayout01CardView {
206 Blank() 210 Blank()
207 // 文本信息 211 // 文本信息
208 Stack() { 212 Stack() {
209 - if (this.item.objectType == '5' || this.item.objectType == '6') { 213 + if(this.item.objectType == '5'){
210 Notes({ objectType: this.item.objectType }) 214 Notes({ objectType: this.item.objectType })
  215 + } else {
  216 + if (this.item.seoTags) {
  217 + Notes({ newTags: this.item.seoTags })
  218 + }
  219 + if (this.item.newTags) {
  220 + Notes({ newTags: this.item.newTags })
  221 + }
211 } 222 }
  223 + // if (this.item.objectType == '5' || this.item.objectType == '6') {
  224 + // Notes({ objectType: this.item.objectType })
  225 + // }
212 Text(`${this.item.corner}${this.item.newsTitle}`) 226 Text(`${this.item.corner}${this.item.newsTitle}`)
213 .width(CommonConstants.FULL_PARENT) 227 .width(CommonConstants.FULL_PARENT)
214 .fontColor(Color.White) 228 .fontColor(Color.White)
@@ -218,7 +232,10 @@ struct CarouselLayout01CardView { @@ -218,7 +232,10 @@ struct CarouselLayout01CardView {
218 .align(Alignment.Bottom) 232 .align(Alignment.Bottom)
219 .maxLines(CompUtils.MAX_LINES_2) 233 .maxLines(CompUtils.MAX_LINES_2)
220 .textOverflow({ overflow: TextOverflow.Ellipsis }) 234 .textOverflow({ overflow: TextOverflow.Ellipsis })
221 - .textIndent(this.item.objectType == '5' ? 35 : 0) 235 + .textIndent((this.item.newTags?.length || this.item.seoTags?.length) > 2 &&
  236 + (this.item.newTags?.length ||this.item.seoTags?.length) < 5 ? 58 :
  237 + ((this.item.newTags?.length > 0 || this.item.seoTags?.length > 0) ||this.item.objectType == '5') ? 35 :
  238 + 0 )
222 } 239 }
223 // .height(39) 240 // .height(39)
224 .padding({ 241 .padding({
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
@@ -3,6 +3,9 @@ import { CommonConstants, ConfigConstants, ScreenType } from 'wdConstant'; @@ -3,6 +3,9 @@ import { CommonConstants, ConfigConstants, ScreenType } from 'wdConstant';
3 import { Logger, ToastUtils, DateTimeUtils } from 'wdKit'; 3 import { Logger, ToastUtils, DateTimeUtils } from 'wdKit';
4 import { CompUtils } from '../../utils/CompUtils'; 4 import { CompUtils } from '../../utils/CompUtils';
5 import { ProcessUtils, WDRouterRule } from 'wdRouter'; 5 import { ProcessUtils, WDRouterRule } from 'wdRouter';
  6 +import { TrackConstants,
  7 + TrackingButton,
  8 + TrackingContent, TrackingPageBrowse, TrackParamConvert } from 'wdTracking/Index';
6 9
7 const TAG: string = 'CardView'; 10 const TAG: string = 'CardView';
8 11
@@ -528,6 +531,11 @@ export struct PaperSingleColumn999CardView { @@ -528,6 +531,11 @@ export struct PaperSingleColumn999CardView {
528 .borderRadius(4) 531 .borderRadius(4)
529 .onClick(() => { 532 .onClick(() => {
530 ProcessUtils.processPage(this.item) 533 ProcessUtils.processPage(this.item)
  534 + TrackingContent.common(TrackConstants.EventType.Click,TrackConstants.SummaryType.MorningAndEveningNews,TrackConstants.SummaryType.MorningAndEveningNews,TrackParamConvert.program(this.item))
  535 + }).onVisibleAreaChange([0.0, 1.0], (isVisible: boolean, currentRatio: number) => {
  536 + if (isVisible) {
  537 + TrackingContent.common(TrackConstants.EventType.Show,TrackConstants.SummaryType.MorningAndEveningNews,TrackConstants.SummaryType.MorningAndEveningNews,TrackParamConvert.program(this.item))
  538 + }
531 }) 539 })
532 } 540 }
533 541
@@ -73,13 +73,14 @@ struct EditUserInfoPage { @@ -73,13 +73,14 @@ struct EditUserInfoPage {
73 .width('30') 73 .width('30')
74 .height('30') 74 .height('30')
75 } 75 }
76 - }.margin({top:20,bottom:-10})  
77 -  
78 - Button('点击更换头像')  
79 - .fontColor(Color.Gray)  
80 - .fontSize(15)  
81 - .backgroundColor(Color.White)  
82 - .margin(20) 76 + }.margin({top:20,bottom:40})
  77 +
  78 + ///目前不支持头像上传,暂时屏蔽
  79 + // Button('点击更换头像')
  80 + // .fontColor(Color.Gray)
  81 + // .fontSize(15)
  82 + // .backgroundColor(Color.White)
  83 + // .margin(20)
83 84
84 List({}){ 85 List({}){
85 ForEach(this.listData,(item:EditListInfo,index:number) =>{ 86 ForEach(this.listData,(item:EditListInfo,index:number) =>{
@@ -14,7 +14,7 @@ import { CustomPullToRefresh } from '../reusable/CustomPullToRefresh'; @@ -14,7 +14,7 @@ import { CustomPullToRefresh } from '../reusable/CustomPullToRefresh';
14 import { MyCustomDialog } from '../reusable/MyCustomDialog' 14 import { MyCustomDialog } from '../reusable/MyCustomDialog'
15 import { NetworkUtil } from 'wdKit/Index'; 15 import { NetworkUtil } from 'wdKit/Index';
16 import TrackingPageBrowseUtils from '../../utils/TrackingPageBrowseUtils' 16 import TrackingPageBrowseUtils from '../../utils/TrackingPageBrowseUtils'
17 -import { TrackConstants } from 'wdTracking/Index'; 17 +import { TrackConstants, TrackingButton, TrackingContent, TrackParamConvert } from 'wdTracking/Index';
18 18
19 @Entry 19 @Entry
20 @Component 20 @Component
@@ -36,6 +36,9 @@ struct MyCollectionListPage { @@ -36,6 +36,9 @@ struct MyCollectionListPage {
36 builder: MyCustomDialog({ 36 builder: MyCustomDialog({
37 confirm: () => { 37 confirm: () => {
38 this.deleteDatas() 38 this.deleteDatas()
  39 + if (this.isAllSelect) {
  40 + TrackingButton.click('morning_evening_news_click',TrackConstants.PageName.My_Collect,TrackConstants.PageName.My_Collect)
  41 + }
39 }, 42 },
40 titleShow:false, 43 titleShow:false,
41 tipValue: this.isAllSelect?'是否确认清空?':'确认删除'+this.deleteNum.toString()+'条收藏' 44 tipValue: this.isAllSelect?'是否确认清空?':'确认删除'+this.deleteNum.toString()+'条收藏'
@@ -146,7 +149,14 @@ struct MyCollectionListPage { @@ -146,7 +149,14 @@ struct MyCollectionListPage {
146 Column() { 149 Column() {
147 BigPicCardComponent({compDTO:new CompDTO,contentDTO:compDTO}) 150 BigPicCardComponent({compDTO:new CompDTO,contentDTO:compDTO})
148 } 151 }
  152 + }.onVisibleAreaChange([0.0, 1.0], (isVisible: boolean, currentRatio: number) => {
  153 + if (isVisible) {
  154 + TrackingContent.common(TrackConstants.EventType.Show, TrackConstants.PageName.My_Collect,TrackConstants.PageName.My_Collect, TrackParamConvert.program(compDTO))
149 } 155 }
  156 + })
  157 + // .onClick(()=>{
  158 + // TrackingContent.common(TrackConstants.EventType.Click, TrackConstants.PageName.My_Collect,TrackConstants.PageName.My_Collect, TrackParamConvert.program(compDTO))
  159 + // })
150 } 160 }
151 161
152 162
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
@@ -8,6 +8,7 @@ import { FirstTabTopSearchComponent } from '../search/FirstTabTopSearchComponent @@ -8,6 +8,7 @@ import { FirstTabTopSearchComponent } from '../search/FirstTabTopSearchComponent
8 import { AssignChannelParam } from 'wdRouter/src/main/ets/utils/HomeChannelUtils'; 8 import { AssignChannelParam } from 'wdRouter/src/main/ets/utils/HomeChannelUtils';
9 import { PeopleShipMainComponent } from '../peopleShip/PeopleShipMainComponent'; 9 import { PeopleShipMainComponent } from '../peopleShip/PeopleShipMainComponent';
10 import { channelSkeleton } from '../skeleton/channelSkeleton'; 10 import { channelSkeleton } from '../skeleton/channelSkeleton';
  11 +import { TrackConstants, TrackingButton } from 'wdTracking/Index';
11 12
12 const TAG = 'TopNavigationComponent'; 13 const TAG = 'TopNavigationComponent';
13 14
@@ -83,16 +84,16 @@ export struct TopNavigationComponentNew { @@ -83,16 +84,16 @@ export struct TopNavigationComponentNew {
83 PeopleShipMainComponent({ 84 PeopleShipMainComponent({
84 currentTopNavSelectedIndex: $currentTopNavSelectedIndex, 85 currentTopNavSelectedIndex: $currentTopNavSelectedIndex,
85 navIndex: index, 86 navIndex: index,
86 - pageId: navItem.pageId + '',  
87 - channelId: navItem.channelId + '', 87 + pageId: navItem?.pageId + '',
  88 + channelId: navItem?.channelId + '',
88 }) 89 })
89 } else 90 } else
90 if (!this.isBroadcast(navItem) && !this.isLayout(navItem)) { 91 if (!this.isBroadcast(navItem) && !this.isLayout(navItem)) {
91 PageComponent({ 92 PageComponent({
92 currentTopNavSelectedIndex: $currentTopNavSelectedIndex, 93 currentTopNavSelectedIndex: $currentTopNavSelectedIndex,
93 navIndex: index, 94 navIndex: index,
94 - pageId: navItem.pageId + '',  
95 - channelId: navItem.channelId + '', 95 + pageId: navItem?.pageId + '',
  96 + channelId: navItem?.channelId + '',
96 autoRefresh: this.autoRefresh2Page 97 autoRefresh: this.autoRefresh2Page
97 }) 98 })
98 } else { 99 } else {
@@ -171,6 +172,7 @@ export struct TopNavigationComponentNew { @@ -171,6 +172,7 @@ export struct TopNavigationComponentNew {
171 .onClick(() => { 172 .onClick(() => {
172 if (NetworkUtil.isNetConnected()) { 173 if (NetworkUtil.isNetConnected()) {
173 ProcessUtils.gotoMorningEveningPaper() 174 ProcessUtils.gotoMorningEveningPaper()
  175 + TrackingButton.click('morning_evening_news_click',TrackConstants.SummaryType.MorningAndEveningNews,TrackConstants.SummaryType.MorningAndEveningNews)
174 } else { 176 } else {
175 ToastUtils.showToast('网络出小差了,请检查网络后重试', 1000) 177 ToastUtils.showToast('网络出小差了,请检查网络后重试', 1000)
176 } 178 }
@@ -190,12 +190,20 @@ export struct SearchResultContentComponent { @@ -190,12 +190,20 @@ export struct SearchResultContentComponent {
190 }) 190 })
191 let isRemain : boolean = false 191 let isRemain : boolean = false
192 SearcherAboutDataModel.getCreatorDetailListData({creatorIdList:creatorIdList}).then((rem) => { 192 SearcherAboutDataModel.getCreatorDetailListData({creatorIdList:creatorIdList}).then((rem) => {
193 - resultData.list.forEach((value) => { 193 + resultData.list.forEach((value: SearchResultContentItem) => {
  194 + const landscape = value.data.landscape
194 let photos: FullColumnImgUrlDTO[] = [] 195 let photos: FullColumnImgUrlDTO[] = []
195 // if (value.data.appStyle === 4) { 196 // if (value.data.appStyle === 4) {
196 value.data.appStyleImages.split("&&").forEach((value) => { 197 value.data.appStyleImages.split("&&").forEach((value) => {
197 const resizeParams = this.extractResizeParams(value) 198 const resizeParams = this.extractResizeParams(value)
198 - photos.push({ fullUrl: value,weight:resizeParams.width,height:resizeParams.height, } as FullColumnImgUrlDTO) 199 + photos.push(
  200 + {
  201 + fullUrl: value,
  202 + weight:resizeParams.width,
  203 + height:resizeParams.height,
  204 + landscape: Number(landscape),
  205 + } as FullColumnImgUrlDTO
  206 + )
199 }) 207 })
200 // } 208 // }
201 let contentDTO = this.dataTransform(rem,value, photos); 209 let contentDTO = this.dataTransform(rem,value, photos);
@@ -458,7 +466,13 @@ export struct SearchResultContentComponent { @@ -458,7 +466,13 @@ export struct SearchResultContentComponent {
458 let rmhInfo = this.getRmhInfo(rem,value) 466 let rmhInfo = this.getRmhInfo(rem,value)
459 console.log('获取photos',JSON.stringify(photos)) 467 console.log('获取photos',JSON.stringify(photos))
460 console.log('获取value2',JSON.stringify(value)) 468 console.log('获取value2',JSON.stringify(value))
  469 + let liveType = value.data?.liveType;
  470 + let seoTags = value.data?.seoTags
  471 + let cornerMark = value.data?.cornerMark
461 let contentDTO = new ContentDTO(); 472 let contentDTO = new ContentDTO();
  473 + contentDTO.liveType = liveType?liveType: ""
  474 + contentDTO.seoTags = seoTags?seoTags: ""
  475 + contentDTO.cornerMark = cornerMark?cornerMark: ""
462 contentDTO.appStyle = value.data.appStyle + "" 476 contentDTO.appStyle = value.data.appStyle + ""
463 contentDTO.cityCode = value.data.cityCode 477 contentDTO.cityCode = value.data.cityCode
464 contentDTO.coverSize = "" 478 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) {
@@ -185,13 +213,12 @@ export struct AccountAndSecurityLayout { @@ -185,13 +213,12 @@ export struct AccountAndSecurityLayout {
185 WDRouterRule.jumpWithPage(WDRouterPage.modifyPasswordPage) 213 WDRouterRule.jumpWithPage(WDRouterPage.modifyPasswordPage)
186 }else{ 214 }else{
187 //设置密码 215 //设置密码
188 - let pageType = {'pageType': 1} as Record<string, number>;  
189 - WDRouterRule.jumpWithPage(WDRouterPage.forgetPasswordPage, pageType) 216 + WDRouterRule.jumpWithPage(WDRouterPage.verifyPhoneNumberPage)
190 } 217 }
191 }else if (index == 3) { 218 }else if (index == 3) {
192 trackButtonClick("accountManagementPageAccountCancellation") 219 trackButtonClick("accountManagementPageAccountCancellation")
193 this.isAccountPage=false 220 this.isAccountPage=false
194 - // WDRouterRule.jumpWithPage(WDRouterPage.forgetPasswordPage, pageType) 221 + this.logoutLayoutShowTime = DateTimeUtils.getTimeStamp()
195 } 222 }
196 }) 223 })
197 224
@@ -255,6 +282,8 @@ export struct AccountAndSecurityLayout { @@ -255,6 +282,8 @@ export struct AccountAndSecurityLayout {
255 }) 282 })
256 .onClick(() => { 283 .onClick(() => {
257 this.isAccountPage=true 284 this.isAccountPage=true
  285 + this.pageShowAccountTime = DateTimeUtils.getTimeStamp()
  286 + this.logoutLayoutHide()
258 this.protocolState=false 287 this.protocolState=false
259 }) 288 })
260 .id('backImage') 289 .id('backImage')
@@ -332,6 +361,7 @@ export struct AccountAndSecurityLayout { @@ -332,6 +361,7 @@ export struct AccountAndSecurityLayout {
332 Text() { 361 Text() {
333 Span("我已阅读并同意").fontColor("#999999").fontSize(12) 362 Span("我已阅读并同意").fontColor("#999999").fontSize(12)
334 Span("《用户注销协议》").fontColor("#ED2800").fontSize(12).onClick(() => { 363 Span("《用户注销协议》").fontColor("#ED2800").fontSize(12).onClick(() => {
  364 + TrackingButton.click("cancelAccountPageUserLogoffAgreement",TrackConstants.PageName.Cancel_Account,TrackConstants.PageName.Cancel_Account)
335 let bean = { contentID: "3", pageID: "" } as Params 365 let bean = { contentID: "3", pageID: "" } as Params
336 WDRouterRule.jumpWithPage(WDRouterPage.loginProtocolPage, bean) 366 WDRouterRule.jumpWithPage(WDRouterPage.loginProtocolPage, bean)
337 }) 367 })
@@ -353,6 +383,7 @@ export struct AccountAndSecurityLayout { @@ -353,6 +383,7 @@ export struct AccountAndSecurityLayout {
353 if (!this.protocolState) { 383 if (!this.protocolState) {
354 return 384 return
355 } 385 }
  386 + TrackingButton.click("cancelAccountPageconfirmCancelAccount",TrackConstants.PageName.Cancel_Account,TrackConstants.PageName.Cancel_Account)
356 this.dialogController.open() 387 this.dialogController.open()
357 388
358 }) 389 })
@@ -456,6 +487,7 @@ export struct AccountAndSecurityLayout { @@ -456,6 +487,7 @@ export struct AccountAndSecurityLayout {
456 487
457 //注销账号 488 //注销账号
458 requestLogout() { 489 requestLogout() {
  490 + TrackingButton.click("cancelAccountPageCancelAccountSuccess",TrackConstants.PageName.Cancel_Account,TrackConstants.PageName.Cancel_Account)
459 this.logoutViewModel.requestLogout().then(()=>{ 491 this.logoutViewModel.requestLogout().then(()=>{
460 ToastUtils.shortToast("注销成功") 492 ToastUtils.shortToast("注销成功")
461 router.back() 493 router.back()
@@ -5,6 +5,11 @@ import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'; @@ -5,6 +5,11 @@ import { WDRouterPage, WDRouterRule } from 'wdRouter/Index';
5 import { SpConstants } from 'wdConstant/Index'; 5 import { SpConstants } from 'wdConstant/Index';
6 import { ContentDetailDTO } from 'wdBean/Index'; 6 import { ContentDetailDTO } from 'wdBean/Index';
7 import measure from '@ohos.measure' 7 import measure from '@ohos.measure'
  8 +import {
  9 + ContentDetailRequest,
  10 + postExecuteLikeParams,
  11 + batchLikeAndCollectParams,
  12 +} from 'wdDetailPlayApi/src/main/ets/request/ContentDetailRequest';
8 13
9 const TAG = 'LikeComponent'; 14 const TAG = 'LikeComponent';
10 15
@@ -17,7 +22,7 @@ interface ILikeStyleResp { @@ -17,7 +22,7 @@ interface ILikeStyleResp {
17 export struct LikeComponent { 22 export struct LikeComponent {
18 @Consume contentDetailData: ContentDetailDTO 23 @Consume contentDetailData: ContentDetailDTO
19 @Prop pageComponentType: number 24 @Prop pageComponentType: number
20 - @State likesStyle: number = this.contentDetailData.likesStyle // 赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空 25 + @State likesStyle: number | string = 1 // 赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空
21 @State likeStatus: boolean = false 26 @State likeStatus: boolean = false
22 viewModel: LikeViewModel = new LikeViewModel() 27 viewModel: LikeViewModel = new LikeViewModel()
23 @Prop @Watch('onDataUpdated') data: Record<string, string> 28 @Prop @Watch('onDataUpdated') data: Record<string, string>
@@ -36,12 +41,21 @@ export struct LikeComponent { @@ -36,12 +41,21 @@ export struct LikeComponent {
36 // this.data['status'] = "1" 41 // this.data['status'] = "1"
37 42
38 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 + }
39 this.onDataUpdated() 52 this.onDataUpdated()
40 } 53 }
41 54
42 onDataUpdated() { 55 onDataUpdated() {
  56 + console.log(TAG, '点赞点击')
43 if (this.data) { 57 if (this.data) {
44 - if (this.data['channelId'] !== 'undefined') { 58 + if (this.data['contentType'] !== 'undefined') {
45 //获取点赞状态 59 //获取点赞状态
46 this.getLikeStatus() 60 this.getLikeStatus()
47 //获取点赞数 61 //获取点赞数
@@ -74,7 +88,7 @@ export struct LikeComponent { @@ -74,7 +88,7 @@ export struct LikeComponent {
74 * 将点赞样式转换为icon 88 * 将点赞样式转换为icon
75 */ 89 */
76 transLikeStyle(): ILikeStyleResp { 90 transLikeStyle(): ILikeStyleResp {
77 - if (this.likesStyle === 1) { 91 + if (this.likesStyle === 1 || this.likesStyle === 'love' || this.likesStyle === 'thumb') {
78 return { 92 return {
79 url: this.likeStatus ? $r(`app.media.ic_like_check`) : 93 url: this.likeStatus ? $r(`app.media.ic_like_check`) :
80 this.styleType == 1 ? 94 this.styleType == 1 ?
@@ -82,12 +96,12 @@ export struct LikeComponent { @@ -82,12 +96,12 @@ export struct LikeComponent {
82 $r(`app.media.ic_like_uncheck`), 96 $r(`app.media.ic_like_uncheck`),
83 name: '赞' 97 name: '赞'
84 } 98 }
85 - } else if (this.likesStyle === 2) { 99 + } else if (this.likesStyle === 2 || this.likesStyle === 'pray') {
86 return { 100 return {
87 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`),
88 name: '祈祷' 102 name: '祈祷'
89 } 103 }
90 - } else if (this.likesStyle === 3) { 104 + } else if (this.likesStyle === 3 || this.likesStyle === 'mourning') {
91 return { 105 return {
92 url: this.likeStatus ? $r(`app.media.ic_candle_check`) : 106 url: this.likeStatus ? $r(`app.media.ic_candle_check`) :
93 $r(`app.media.ic_candle_uncheck`), 107 $r(`app.media.ic_candle_uncheck`),
@@ -137,6 +151,7 @@ export struct LikeComponent { @@ -137,6 +151,7 @@ export struct LikeComponent {
137 } 151 }
138 .width(154) 152 .width(154)
139 .height(40) 153 .height(40)
  154 + .visibility(this.likesStyle == 4 || this.likesStyle == 'empty' ? Visibility.None : Visibility.Visible)
140 } 155 }
141 156
142 @Builder 157 @Builder
@@ -154,6 +169,7 @@ export struct LikeComponent { @@ -154,6 +169,7 @@ export struct LikeComponent {
154 .onClick(() => { 169 .onClick(() => {
155 this.clickButtonEvent() 170 this.clickButtonEvent()
156 }) 171 })
  172 + .visibility(this.likesStyle == 4 || this.likesStyle == 'empty' ? Visibility.None : Visibility.Visible)
157 } 173 }
158 174
159 @Builder 175 @Builder
@@ -167,7 +183,10 @@ export struct LikeComponent { @@ -167,7 +183,10 @@ export struct LikeComponent {
167 .onClick(() => { 183 .onClick(() => {
168 this.clickButtonEvent() 184 this.clickButtonEvent()
169 }) 185 })
170 - }.width(24).height(24) 186 + }
  187 + .width(24)
  188 + .height(24)
  189 + .visibility(this.likesStyle == 4 || this.likesStyle == 'empty' ? Visibility.None : Visibility.Visible)
171 } 190 }
172 191
173 @Builder 192 @Builder
@@ -242,6 +261,7 @@ export struct LikeComponent { @@ -242,6 +261,7 @@ export struct LikeComponent {
242 }.width(24).height(24).onClick(() => { 261 }.width(24).height(24).onClick(() => {
243 this.clickButtonEvent() 262 this.clickButtonEvent()
244 }) 263 })
  264 + .visibility(this.likesStyle == 4 || this.likesStyle == 'empty' ? Visibility.None : Visibility.Visible)
245 } 265 }
246 266
247 @Builder 267 @Builder
@@ -278,6 +298,7 @@ export struct LikeComponent { @@ -278,6 +298,7 @@ export struct LikeComponent {
278 } 298 }
279 .width(36) 299 .width(36)
280 .height(42) 300 .height(42)
  301 + .visibility(this.likesStyle == 4 || this.likesStyle == 'empty' ? Visibility.None : Visibility.Visible)
281 302
282 } 303 }
283 304
@@ -300,13 +321,26 @@ export struct LikeComponent { @@ -300,13 +321,26 @@ export struct LikeComponent {
300 321
301 executeLike(status: string) { 322 executeLike(status: string) {
302 console.log(TAG, '点赞接口调用', status) 323 console.log(TAG, '点赞接口调用', status)
303 - this.data['status'] = status  
304 - this.data['contentId'] = this.contentDetailData?.newsId + ''  
305 - this.data['contentType'] = this.contentDetailData?.newsType + ''  
306 324
307 - this.viewModel.executeLike2(this.data).then(() => { 325 + const params: postExecuteLikeParams = {
  326 + status: Number(status),
  327 + contentId: this.data['contentId'],
  328 + contentType: this.data['contentType']
  329 + }
  330 + if(this.data['relType']) {
  331 + params.relType = this.data['relType']
  332 + }
  333 + if(this.data['contentRelId']) {
  334 + params.contentRelId = this.data['contentRelId']
  335 + }
  336 + if(this.data['channelId']) {
  337 + params.channelId = this.data['channelId']
  338 + }
  339 +
  340 + console.log(TAG, "点赞 params", JSON.stringify(params))
  341 + ContentDetailRequest.postExecuteLike(params).then((data) => {
308 342
309 - console.log(TAG, '点赞接口调用成功') 343 + console.log(TAG, '点赞接口调用成功', JSON.stringify(data))
310 344
311 // 直播点赞一直增加 345 // 直播点赞一直增加
312 if (this.contentDetailData.liveInfo) { 346 if (this.contentDetailData.liveInfo) {
@@ -333,12 +367,26 @@ export struct LikeComponent { @@ -333,12 +367,26 @@ export struct LikeComponent {
333 } 367 }
334 368
335 getLikeStatus() { 369 getLikeStatus() {
336 - this.viewModel.getLikeStatus(this.data).then((data) => {  
337 - if (data && data['data'].length && data['data'][0]['likeStatus']) {  
338 - this.likeStatus = data['data'][0]['likeStatus'] 370 + // console.log(TAG, "this.data", JSON.stringify(this.data))
  371 + const params: batchLikeAndCollectParams = {
  372 + contentList: [
  373 + {
  374 + contentId: this.data['contentId'],
  375 + contentType: this.data['contentType'],
  376 + contentRelId: this.data['contentRelId'] || '' + '',
  377 + }
  378 + ]
  379 + }
  380 + console.log(TAG, "查询点赞状态params", JSON.stringify(params))
  381 + ContentDetailRequest.postBatchLikeAndCollectStatus(params).then(res => {
  382 + console.log(TAG, '查询点赞、收藏状态==', JSON.stringify(res.data))
  383 + if (res.data) {
  384 + if(res.data[0].likeStatus) {
  385 + this.likeStatus = res.data[0].likeStatus ? true : false
339 } else { 386 } else {
340 this.likeStatus = false 387 this.likeStatus = false
341 } 388 }
  389 + }
342 }).catch(() => { 390 }).catch(() => {
343 this.likeStatus = false 391 this.likeStatus = false
344 }) 392 })
@@ -36,6 +36,7 @@ const TAG = 'OperRowListView'; @@ -36,6 +36,7 @@ const TAG = 'OperRowListView';
36 * 注意:外层需注册 @Provide contentDetailData:contentDetailData = {} as contentDetailData 36 * 注意:外层需注册 @Provide contentDetailData:contentDetailData = {} as contentDetailData
37 * 传值示例: 37 * 传值示例:
38 OperRowListView({ 38 OperRowListView({
  39 +
39 contentDetailData: this.contentDetailData[0], 40 contentDetailData: this.contentDetailData[0],
40 operationButtonList: ['comment', 'like', 'collect', 'listen', 'share'] 41 operationButtonList: ['comment', 'like', 'collect', 'listen', 'share']
41 }) 42 })
@@ -123,11 +124,25 @@ export struct OperRowListView { @@ -123,11 +124,25 @@ export struct OperRowListView {
123 await this.queryContentInteractCount() 124 await this.queryContentInteractCount()
124 // 点赞需要数据 125 // 点赞需要数据
125 this.likeBean['contentId'] = this.contentDetailData.newsId + '' 126 this.likeBean['contentId'] = this.contentDetailData.newsId + ''
  127 + if(this.contentDetailData.userInfo?.userName) {
126 this.likeBean['userName'] = this.contentDetailData.userInfo?.userName + '' 128 this.likeBean['userName'] = this.contentDetailData.userInfo?.userName + ''
  129 + }
127 this.likeBean['contentType'] = this.contentDetailData.newsType + '' 130 this.likeBean['contentType'] = this.contentDetailData.newsType + ''
  131 + if(this.contentDetailData.newsTitle) {
128 this.likeBean['title'] = this.contentDetailData.newsTitle + '' 132 this.likeBean['title'] = this.contentDetailData.newsTitle + ''
  133 + }
  134 + if(this.contentDetailData.userInfo?.headPhotoUrl) {
129 this.likeBean['userHeaderUrl'] = this.contentDetailData.userInfo?.headPhotoUrl + '' 135 this.likeBean['userHeaderUrl'] = this.contentDetailData.userInfo?.headPhotoUrl + ''
  136 + }
  137 + if(this.contentDetailData.reLInfo?.channelId) {
130 this.likeBean['channelId'] = this.contentDetailData.reLInfo?.channelId + '' 138 this.likeBean['channelId'] = this.contentDetailData.reLInfo?.channelId + ''
  139 + }
  140 + if(this.contentDetailData?.reLInfo?.relType) {
  141 + this.likeBean['relType'] = this.contentDetailData?.reLInfo?.relType + ''
  142 + }
  143 + if(this.contentDetailData?.reLInfo?.relId) {
  144 + this.likeBean['contentRelId'] = this.contentDetailData?.reLInfo?.relId + ''
  145 + }
131 console.info(TAG, 'contentDetailData----', JSON.stringify(this.contentDetailData)) 146 console.info(TAG, 'contentDetailData----', JSON.stringify(this.contentDetailData))
132 console.info(TAG, 'likeBean----', JSON.stringify(this.likeBean)) 147 console.info(TAG, 'likeBean----', JSON.stringify(this.likeBean))
133 // 评论需要数据 148 // 评论需要数据
@@ -202,7 +217,7 @@ export struct OperRowListView { @@ -202,7 +217,7 @@ export struct OperRowListView {
202 .padding({ 217 .padding({
203 top: 10, 218 top: 10,
204 // bottom: 10 219 // bottom: 10
205 - bottom: px2vp(this.bottomSafeHeight) 220 + bottom: `${this.bottomSafeHeight}px`
206 // bottom: 50 221 // bottom: 50
207 }) 222 })
208 } 223 }
@@ -387,6 +402,7 @@ export struct OperRowListView { @@ -387,6 +402,7 @@ export struct OperRowListView {
387 } 402 }
388 ] 403 ]
389 } 404 }
  405 + console.info(TAG, '查询用户对作品收藏1', JSON.stringify(params))
390 // console.info(TAG, '查询用户对作品收藏11', JSON.stringify(params)) 406 // console.info(TAG, '查询用户对作品收藏11', JSON.stringify(params))
391 let data = await MultiPictureDetailViewModel.getInteractDataStatus(params) 407 let data = await MultiPictureDetailViewModel.getInteractDataStatus(params)
392 console.info(TAG, '查询用户对作品收藏22', JSON.stringify(data)) 408 console.info(TAG, '查询用户对作品收藏22', JSON.stringify(data))
@@ -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')))
@@ -177,9 +177,9 @@ export class ColorUtils { @@ -177,9 +177,9 @@ export class ColorUtils {
177 177
178 public static getMorningEveningPaperRgb(color: ColorRgb): ColorRgb{ 178 public static getMorningEveningPaperRgb(color: ColorRgb): ColorRgb{
179 // RGB颜色取值范围是0~255,需要转换为0~1的浮点数 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; 180 + const red: number = color.red ;
  181 + const green: number = color.green ;
  182 + const blue: number = color.blue;
183 183
184 const max: number = Math.max(red, green, blue); 184 const max: number = Math.max(red, green, blue);
185 const min: number = Math.min(red, green, blue); 185 const min: number = Math.min(red, green, blue);
@@ -34,7 +34,7 @@ @@ -34,7 +34,7 @@
34 }, 34 },
35 { 35 {
36 "name": "image_request_success", 36 "name": "image_request_success",
37 - "value": "图片下载到图库成功" 37 + "value": "已保存到相册"
38 }, 38 },
39 { 39 {
40 "name": "image_request_fail", 40 "name": "image_request_fail",
@@ -119,7 +119,7 @@ export interface postBatchAttentionStatusResult { @@ -119,7 +119,7 @@ export interface postBatchAttentionStatusResult {
119 119
120 120
121 export interface postExecuteLikeParams { 121 export interface postExecuteLikeParams {
122 - status: string; 122 + status: number;
123 contentId: string; 123 contentId: string;
124 contentType: string; 124 contentType: string;
125 relType?: string; 125 relType?: string;
@@ -112,7 +112,7 @@ export struct DetailPlayShortVideoPage { @@ -112,7 +112,7 @@ export struct DetailPlayShortVideoPage {
112 { 112 {
113 contentId: this.contentDetailData?.newsId + '', 113 contentId: this.contentDetailData?.newsId + '',
114 contentType: this.contentDetailData?.newsType + '', 114 contentType: this.contentDetailData?.newsType + '',
115 - contentRelId: this.contentDetailData?.reLInfo?.relId + '', 115 + contentRelId: this.contentDetailData?.reLInfo?.relId || '' + '',
116 } 116 }
117 ] 117 ]
118 } 118 }
@@ -74,7 +74,7 @@ export struct OperationListView { @@ -74,7 +74,7 @@ export struct OperationListView {
74 return 74 return
75 } 75 }
76 const params: postExecuteLikeParams = { 76 const params: postExecuteLikeParams = {
77 - status: this.newsStatusOfUser?.likeStatus === '1' ? '0' : '1', 77 + status: this.newsStatusOfUser?.likeStatus === '1' ? 0 : 1,
78 contentId: this.contentDetailData?.newsId + '', 78 contentId: this.contentDetailData?.newsId + '',
79 contentType: this.contentDetailData?.newsType + '', 79 contentType: this.contentDetailData?.newsType + '',
80 } 80 }
@@ -56,15 +56,22 @@ export struct PlayerRightView { @@ -56,15 +56,22 @@ export struct PlayerRightView {
56 return 56 return
57 } 57 }
58 const params: postExecuteLikeParams = { 58 const params: postExecuteLikeParams = {
59 - status: this.newsStatusOfUser?.likeStatus === '1' ? '0' : '1', 59 + status: this.newsStatusOfUser?.likeStatus === '1' ? 0 : 1,
60 contentId: this.contentDetailData?.newsId + '', 60 contentId: this.contentDetailData?.newsId + '',
61 contentType: this.contentDetailData?.newsType + '', 61 contentType: this.contentDetailData?.newsType + '',
  62 + userName: this.contentDetailData?.userInfo?.userName || '' + '',
  63 + contentRelId: this.contentDetailData?.reLInfo?.relId || '' + '',
  64 + title: this.contentDetailData?.newsTitle || '' + '',
  65 + channelId: this.contentDetailData?.reLInfo?.channelId + '',
  66 + relType: this.contentDetailData?.reLInfo?.relType || '' + '',
  67 + userHeaderUrl: this.contentDetailData?.userInfo?.headPhotoUrl || '' + '',
62 } 68 }
  69 + console.log(TAG, '点赞params', JSON.stringify(params))
63 ContentDetailRequest.postExecuteLike(params).then(res => { 70 ContentDetailRequest.postExecuteLike(params).then(res => {
64 - 71 + console.log(TAG, '点赞this.newsStatusOfUser', JSON.stringify(this.newsStatusOfUser))
65 if (this.newsStatusOfUser) { 72 if (this.newsStatusOfUser) {
66 - this.newsStatusOfUser.likeStatus = this.newsStatusOfUser?.likeStatus === '1' ? '0' : '1'  
67 - if (this.newsStatusOfUser.likeStatus === '1') { 73 + this.newsStatusOfUser.likeStatus = this.newsStatusOfUser?.likeStatus == '1' ? '0' : '1'
  74 + if (this.newsStatusOfUser.likeStatus == '1') {
68 this.interactData.likeNum = Number(this.interactData.likeNum || 0) + 1 75 this.interactData.likeNum = Number(this.interactData.likeNum || 0) + 1
69 } else { 76 } else {
70 this.interactData.likeNum = Math.max(0, Number(this.interactData.likeNum || 0) - 1) 77 this.interactData.likeNum = Math.max(0, Number(this.interactData.likeNum || 0) - 1)
@@ -237,17 +244,17 @@ export struct PlayerRightView { @@ -237,17 +244,17 @@ export struct PlayerRightView {
237 transLikeStyle(): ILikeStyleResp { 244 transLikeStyle(): ILikeStyleResp {
238 if (this.likesStyle === 1) { 245 if (this.likesStyle === 1) {
239 return { 246 return {
240 - url: this.newsStatusOfUser.likeStatus === '1' ? $r(`app.media.ic_like_check`) : $r(`app.media.ic_like_uncheck`), 247 + url: this.newsStatusOfUser.likeStatus == '1' ? $r(`app.media.ic_like_check`) : $r(`app.media.ic_like_uncheck`),
241 name: '赞' 248 name: '赞'
242 } 249 }
243 } else if (this.likesStyle === 2) { 250 } else if (this.likesStyle === 2) {
244 return { 251 return {
245 - url: this.newsStatusOfUser.likeStatus === '1' ? $r(`app.media.ic_thub_check`) : $r(`app.media.ic_thub_uncheck`), 252 + url: this.newsStatusOfUser.likeStatus == '1' ? $r(`app.media.ic_thub_check`) : $r(`app.media.ic_thub_uncheck`),
246 name: '祈祷' 253 name: '祈祷'
247 } 254 }
248 } else if (this.likesStyle === 3) { 255 } else if (this.likesStyle === 3) {
249 return { 256 return {
250 - url: this.newsStatusOfUser.likeStatus === '1' ? $r(`app.media.ic_candle_check`) : 257 + url: this.newsStatusOfUser.likeStatus == '1' ? $r(`app.media.ic_candle_check`) :
251 $r(`app.media.ic_candle_uncheck`), 258 $r(`app.media.ic_candle_uncheck`),
252 name: '默哀' 259 name: '默哀'
253 } 260 }
@@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
13 "wdKit": "file:../../commons/wdKit", 13 "wdKit": "file:../../commons/wdKit",
14 "wdBean": "file:../../features/wdBean", 14 "wdBean": "file:../../features/wdBean",
15 "wdRouter": "file:../../commons/wdRouter", 15 "wdRouter": "file:../../commons/wdRouter",
  16 + "wdTracking": "file:../../features/wdTracking",
16 "wdNetwork": "file:../../commons/wdNetwork" 17 "wdNetwork": "file:../../commons/wdNetwork"
17 } 18 }
18 } 19 }
@@ -11,6 +11,7 @@ import { notificationManager } from '@kit.NotificationKit'; @@ -11,6 +11,7 @@ import { notificationManager } from '@kit.NotificationKit';
11 import { BusinessError } from '@kit.BasicServicesKit'; 11 import { BusinessError } from '@kit.BasicServicesKit';
12 import { SpConstants } from 'wdConstant/Index'; 12 import { SpConstants } from 'wdConstant/Index';
13 import { PushContentBean, PushContentParser } from './PushContentParser'; 13 import { PushContentBean, PushContentParser } from './PushContentParser';
  14 +import { ParamType, Tracking } from 'wdTracking/Index';
14 15
15 const TAG = "GetuiPush" 16 const TAG = "GetuiPush"
16 17
@@ -220,6 +221,15 @@ export class GetuiPush { @@ -220,6 +221,15 @@ export class GetuiPush {
220 this.lastPushContent = undefined 221 this.lastPushContent = undefined
221 } 222 }
222 223
  224 + private trackingClick(content: PushContentBean) {
  225 + let param: ParamType = {
  226 + "pushResourceId": "",
  227 + "pushTitle": content.notifyTitle || "",
  228 + "pushContent": content.notifyContent || "",
  229 + }
  230 + Tracking.event("push_click", param)
  231 + }
  232 +
223 private dealWithCmdMessage(result: GTCmdMessage) { 233 private dealWithCmdMessage(result: GTCmdMessage) {
224 let action: Number = result.action; 234 let action: Number = result.action;
225 if (action === PushConst.BIND_ALIAS_RESULT) { 235 if (action === PushConst.BIND_ALIAS_RESULT) {
@@ -9,6 +9,8 @@ export interface PushContentBean { @@ -9,6 +9,8 @@ export interface PushContentBean {
9 want?: Want // want参数 (用来在消费时,回执) 9 want?: Want // want参数 (用来在消费时,回执)
10 online: boolean // 解析want,是否为在线消息(在线走的是个推通道,离线走的是华为厂商通道) 10 online: boolean // 解析want,是否为在线消息(在线走的是个推通道,离线走的是华为厂商通道)
11 pushLink?: string // 解析want,对应pushLink参数 11 pushLink?: string // 解析want,对应pushLink参数
  12 + notifyTitle?: string
  13 + notifyContent?: string
12 } 14 }
13 15
14 /* 16 /*
@@ -66,7 +68,9 @@ export class PushContentParser { @@ -66,7 +68,9 @@ export class PushContentParser {
66 if (want.parameters[PushContentParser.PUSH_PARAM_PUSH_LINK]) { 68 if (want.parameters[PushContentParser.PUSH_PARAM_PUSH_LINK]) {
67 let pushLink = want.parameters[PushContentParser.PUSH_PARAM_PUSH_LINK] as string 69 let pushLink = want.parameters[PushContentParser.PUSH_PARAM_PUSH_LINK] as string
68 return { 70 return {
69 - isPush: true, online: true, pushLink: pushLink, want: want 71 + isPush: true, online: true, pushLink: pushLink, want: want,
  72 + notifyTitle: gtData["title"] as string,
  73 + notifyContent: gtData["content"] as string,
70 } 74 }
71 } 75 }
72 } 76 }
@@ -105,7 +109,9 @@ export class PushContentParser { @@ -105,7 +109,9 @@ export class PushContentParser {
105 if (want.parameters[PushContentParser.PUSH_PARAM_PUSH_LINK]) { 109 if (want.parameters[PushContentParser.PUSH_PARAM_PUSH_LINK]) {
106 let pushLink = want.parameters[PushContentParser.PUSH_PARAM_PUSH_LINK] as string 110 let pushLink = want.parameters[PushContentParser.PUSH_PARAM_PUSH_LINK] as string
107 return { 111 return {
108 - isPush: true, online: false, pushLink: pushLink, want: want 112 + isPush: true, online: false, pushLink: pushLink, want: want,
  113 + notifyTitle: want.parameters["title"] as string,
  114 + notifyContent: want.parameters["content"] as string,
109 } 115 }
110 } 116 }
111 } 117 }
  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、登录->忘记密码 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 //协议勾选状态
@@ -33,9 +33,6 @@ export struct LoginInputComponent { @@ -33,9 +33,6 @@ export struct LoginInputComponent {
33 } 33 }
34 34
35 async aboutToAppear(){ 35 async aboutToAppear(){
36 - if (this.pageType == 1 ) {  
37 - this.phoneContent = await SPHelper.default.get(SpConstants.USER_PHONE,"") as string;  
38 - }  
39 if(this.pageType == 0 ){ 36 if(this.pageType == 0 ){
40 let phone = await SPHelper.default.get(SpConstants.USER_PHONE,"") as string 37 let phone = await SPHelper.default.get(SpConstants.USER_PHONE,"") as string
41 if(StringUtils.isNotEmpty(phone)){ 38 if(StringUtils.isNotEmpty(phone)){
@@ -43,29 +40,9 @@ export struct LoginInputComponent { @@ -43,29 +40,9 @@ export struct LoginInputComponent {
43 } 40 }
44 } 41 }
45 } 42 }
  43 +
46 @Builder 44 @Builder
47 addCodeLayout() { 45 addCodeLayout() {
48 - if (this.pageType == 1){  
49 - TextInput({ text: this.securityPhone(this.phoneContent) })  
50 - .placeholderColor("#CCCCCC")  
51 - .fontSize(16)  
52 - .height(48)  
53 - .maxLength(11)  
54 - .margin({ top: 36 })  
55 - .backgroundColor("#F5F5F5")  
56 - .borderRadius(4)  
57 - .enabled(false)  
58 - .type(InputType.PhoneNumber)  
59 - .onChange((content) => {  
60 - this.phoneContent = content  
61 - this.isSubmit = (this.phoneContent.length >= 11 && this.codeContent.length >= 4)  
62 - if (content.length >= 11) {  
63 - this.codeBtnState = true  
64 - } else {  
65 - this.codeBtnState = false  
66 - }  
67 - })  
68 - }else{  
69 //修改密码 里面的 忘记密码(已登录) 46 //修改密码 里面的 忘记密码(已登录)
70 if(StringUtils.isNotEmpty(this.phoneContent) && this.phoneContent.indexOf("****")!=-1 && this.pageType == 0){ 47 if(StringUtils.isNotEmpty(this.phoneContent) && this.phoneContent.indexOf("****")!=-1 && this.pageType == 0){
71 TextInput({ text: this.securityPhone(this.phoneContent) }) 48 TextInput({ text: this.securityPhone(this.phoneContent) })
@@ -115,7 +92,6 @@ export struct LoginInputComponent { @@ -115,7 +92,6 @@ export struct LoginInputComponent {
115 } 92 }
116 }) 93 })
117 } 94 }
118 - }  
119 95
120 96
121 Row() { 97 Row() {
@@ -378,6 +378,7 @@ struct LoginPage { @@ -378,6 +378,7 @@ struct LoginPage {
378 TrackingButton.click("loginPageLoginButton",TrackConstants.PageName.Phone_Login_Page,TrackConstants.PageName.Phone_Login_Page) 378 TrackingButton.click("loginPageLoginButton",TrackConstants.PageName.Phone_Login_Page,TrackConstants.PageName.Phone_Login_Page)
379 this.loginViewModel.appLogin(this.phoneContent, 2, this.codeContent).then((data) => { 379 this.loginViewModel.appLogin(this.phoneContent, 2, this.codeContent).then((data) => {
380 Logger.debug(TAG, "requestLogin: " + data.jwtToken) 380 Logger.debug(TAG, "requestLogin: " + data.jwtToken)
  381 + this.showToastTip('登录成功')
381 ///同步兴趣tag 382 ///同步兴趣tag
382 let interestsModel = new InterestsHobbiesModel() 383 let interestsModel = new InterestsHobbiesModel()
383 interestsModel.updateInterests() 384 interestsModel.updateInterests()
@@ -29,10 +29,12 @@ struct LoginProtocolWebview { @@ -29,10 +29,12 @@ struct LoginProtocolWebview {
29 this.contentID = params.contentID 29 this.contentID = params.contentID
30 } 30 }
31 if (params.contentID == "1") { //"人民日报客户端网络服务使用协议" 31 if (params.contentID == "1") { //"人民日报客户端网络服务使用协议"
  32 + this.webUrl = this.userProtocol
32 this.webUrl = await SPHelper.default.get(SpConstants.NET_SERVICE_PROTOCOL, this.userProtocol) as string 33 this.webUrl = await SPHelper.default.get(SpConstants.NET_SERVICE_PROTOCOL, this.userProtocol) as string
33 this.webviewController.loadUrl(this.webUrl) 34 this.webviewController.loadUrl(this.webUrl)
34 35
35 } else if(params.contentID == "2"){ //"人民日报客户端用户隐私协议" 36 } else if(params.contentID == "2"){ //"人民日报客户端用户隐私协议"
  37 + this.webUrl = this.privateProtocol
36 this.webUrl = await SPHelper.default.get(SpConstants.PRIVATE_PROTOCOL, this.privateProtocol) as string 38 this.webUrl = await SPHelper.default.get(SpConstants.PRIVATE_PROTOCOL, this.privateProtocol) as string
37 this.webviewController.loadUrl(this.webUrl) 39 this.webviewController.loadUrl(this.webUrl)
38 }else if(params.contentID == "3"){ //注销协议 40 }else if(params.contentID == "3"){ //注销协议
@@ -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 })
@@ -6,6 +6,7 @@ import { BusinessError } from '@kit.BasicServicesKit' @@ -6,6 +6,7 @@ import { BusinessError } from '@kit.BasicServicesKit'
6 import { Logger, ToastUtils, CustomToast, EmitterUtils, EmitterEventId } from 'wdKit/Index' 6 import { Logger, ToastUtils, CustomToast, EmitterUtils, EmitterEventId } from 'wdKit/Index'
7 import { LoginViewModel } from './LoginViewModel' 7 import { LoginViewModel } from './LoginViewModel'
8 import {InterestsHobbiesModel} from '../../../../../../../products/phone/src/main/ets/pages/viewModel/InterestsHobbiesModel' 8 import {InterestsHobbiesModel} from '../../../../../../../products/phone/src/main/ets/pages/viewModel/InterestsHobbiesModel'
  9 +import { TrackConstants, TrackingButton, TrackingPageBrowse } from 'wdTracking/Index'
9 10
10 const TAG = "OneKeyLoginPage" 11 const TAG = "OneKeyLoginPage"
11 12
@@ -28,10 +29,35 @@ struct OneKeyLoginPage { @@ -28,10 +29,35 @@ struct OneKeyLoginPage {
28 maskColor:"#00000000" 29 maskColor:"#00000000"
29 }) 30 })
30 31
  32 + // 埋点计算页面浏览时长
  33 + private pageStartDate: number = 0
  34 + private pageName = TrackConstants.PageName.OneClick_Login
  35 +
31 aboutToAppear(): void { 36 aboutToAppear(): void {
32 this.anonymousPhone = HuaweiAuth.sharedInstance().anonymousPhone||"" 37 this.anonymousPhone = HuaweiAuth.sharedInstance().anonymousPhone||""
33 } 38 }
34 39
  40 + onPageShow(): void {
  41 + this.pageStartDate = Date.now()
  42 + }
  43 +
  44 + onPageHide(): void {
  45 + const duration = (Date.now() - this.pageStartDate!)
  46 + TrackingPageBrowse.trackCommonPageExposureEnd(this.pageName, this.pageName, duration)
  47 + }
  48 +
  49 + // pageTransition() {
  50 + // // 为目标页面时,进入:从右边侧滑入,退出:是右侧划出;跳转别的页面:左侧划出,返回:左侧划入。
  51 + // PageTransitionEnter({ type: RouteType.Push, duration: 300 })
  52 + // .slide(SlideEffect.Right)
  53 + // PageTransitionEnter({ type: RouteType.Pop, duration: 300 })
  54 + // .slide(SlideEffect.Left)
  55 + // PageTransitionExit({ type: RouteType.Push, duration: 300 })
  56 + // .slide(SlideEffect.Left)
  57 + // PageTransitionExit({ type: RouteType.Pop, duration: 300 })
  58 + // .slide(SlideEffect.Right)
  59 + // }
  60 +
35 build() { 61 build() {
36 Column() { 62 Column() {
37 this.CloseRow() 63 this.CloseRow()
@@ -39,14 +65,21 @@ struct OneKeyLoginPage { @@ -39,14 +65,21 @@ struct OneKeyLoginPage {
39 Image($r("app.media.login_logo")) 65 Image($r("app.media.login_logo"))
40 .width(120) 66 .width(120)
41 .height(66) 67 .height(66)
42 - .margin({ top: 78, bottom: 74}) 68 + .margin({ top: 34, bottom: 64})
43 .align(Alignment.Center) 69 .align(Alignment.Center)
44 70
45 Text(this.anonymousPhone) 71 Text(this.anonymousPhone)
46 .fontSize(30) 72 .fontSize(30)
47 .fontWeight(600) 73 .fontWeight(600)
48 .fontColor("#222222") 74 .fontColor("#222222")
49 - .margin({bottom: 10}) 75 + .margin({bottom: 12})
  76 + .align(Alignment.Center)
  77 +
  78 + Text("华为账号绑定号码")
  79 + .fontSize(12)
  80 + .fontWeight(400)
  81 + .fontColor("#999999")
  82 + .margin({bottom: 40})
50 .align(Alignment.Center) 83 .align(Alignment.Center)
51 84
52 this.ProtocolRow() 85 this.ProtocolRow()
@@ -68,21 +101,26 @@ struct OneKeyLoginPage { @@ -68,21 +101,26 @@ struct OneKeyLoginPage {
68 if (!this.agreeProtocol) { 101 if (!this.agreeProtocol) {
69 return 102 return
70 } 103 }
  104 +
  105 + TrackingButton.click("oneClickLoginPageLoginButton", this.pageName, this.pageName)
71 this.requestLogin() 106 this.requestLogin()
72 }) 107 })
73 } 108 }
74 .padding({ left: 25, right: 25 }) 109 .padding({ left: 25, right: 25 })
75 - .margin({top: 15}) 110 + .margin({top: 20})
76 111
77 Button("账号密码登录") 112 Button("账号密码登录")
78 .type(ButtonType.Normal) 113 .type(ButtonType.Normal)
79 .align(Alignment.Center) 114 .align(Alignment.Center)
80 .foregroundColor("#666666") 115 .foregroundColor("#666666")
81 .backgroundColor(Color.White) 116 .backgroundColor(Color.White)
  117 + .height(26)
  118 + .margin({top: 20})
82 .onClick((event) => { 119 .onClick((event) => {
83 router.replaceUrl({url: WDRouterPage.loginPage.url()}) 120 router.replaceUrl({url: WDRouterPage.loginPage.url()})
84 }) 121 })
85 } 122 }
  123 + .backgroundColor("#FFFFFF")
86 } 124 }
87 125
88 @Builder ProtocolRow() { 126 @Builder ProtocolRow() {
@@ -126,8 +164,9 @@ struct OneKeyLoginPage { @@ -126,8 +164,9 @@ struct OneKeyLoginPage {
126 .width(24) 164 .width(24)
127 .height(24) 165 .height(24)
128 .onClick(() => router.back()) 166 .onClick(() => router.back())
129 - }.margin({ top: 15, right: 15 }) 167 + }.margin({ top: 10, right: 16 })
130 .width("100%") 168 .width("100%")
  169 + .height(44)
131 } 170 }
132 171
133 async requestLogin() { 172 async requestLogin() {
  1 +import { CustomToast, DateTimeUtils, Logger, SPHelper } from 'wdKit/Index'
  2 +import { WDRouterRule, WDRouterPage } from 'wdRouter/Index'
  3 +import { LoginViewModel } from './LoginViewModel'
  4 +import { SettingPasswordParams } from './SettingPasswordLayout'
  5 +import { router } from '@kit.ArkUI'
  6 +import { SpConstants } from 'wdConstant/Index'
  7 +import { TrackingPageBrowse, TrackConstants, TrackingButton } from 'wdTracking/Index'
  8 +
  9 +const TAG = 'VerifyPhoneNumberPage'
  10 +//设置密码(第一次) 验证当前手机号 页面
  11 +@Entry
  12 +@Component
  13 +struct VerifyPhoneNumberPage {
  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 + lastTime: number = 0
  22 + @State codeBtnState: boolean = false
  23 + @State timeCount: number = 60
  24 + isFirst:boolean=true//是否第一次获取验证码
  25 + pageShowTime:number = 0;
  26 + pageHideTime:number = 0;
  27 +
  28 + onCodeSend() {
  29 + if (this.isCodeSend) {
  30 + TrackingButton.click("checkingPhoneNumberPageSendVerificationCode",TrackConstants.PageName.Checking_PhoneNum,TrackConstants.PageName.Checking_PhoneNum)
  31 + this.sendVerifyCode()
  32 + }
  33 + }
  34 +
  35 + onPageShow() {
  36 + this.pageShowTime = DateTimeUtils.getTimeStamp()
  37 + }
  38 +
  39 + onPageHide(): void {
  40 + this.pageHideTime = DateTimeUtils.getTimeStamp()
  41 + let duration = 0
  42 + duration = Math.floor((this.pageHideTime - this.pageShowTime)/1000)
  43 + TrackingPageBrowse.trackCommonPageExposureEnd(TrackConstants.PageName.Checking_PhoneNum,TrackConstants.PageName.Checking_PhoneNum,duration)
  44 + }
  45 +
  46 + async aboutToAppear(): Promise<void> {
  47 + this.phoneContent = await SPHelper.default.get(SpConstants.USER_PHONE,"") as string;
  48 + }
  49 +
  50 + @State toastText:string = ""
  51 + dialogToast: CustomDialogController = new CustomDialogController({
  52 + builder: CustomToast({
  53 + msg: this.toastText,
  54 + }),
  55 + autoCancel: false,
  56 + alignment: DialogAlignment.Center,
  57 + customStyle: true,
  58 + maskColor:"#00000000"
  59 + })
  60 +
  61 +
  62 + build() {
  63 + Column() {
  64 + Image($r('app.media.login_back_icon')).width(24).height(24).margin({ left: 15, top: 10 }).onClick(() => {
  65 + router.back()
  66 + })
  67 +
  68 + Text(this.pageTitle).fontSize(22).fontColor('#333333').fontWeight(FontWeight.Bold).margin({ left: 25, top: 112 })
  69 +
  70 + Column() {
  71 + TextInput({ text: this.securityPhone(this.phoneContent) })
  72 + .placeholderColor("#CCCCCC")
  73 + .fontSize(16)
  74 + .height(48)
  75 + .maxLength(11)
  76 + .margin({ top: 36 })
  77 + .backgroundColor("#F5F5F5")
  78 + .borderRadius(4)
  79 + .enabled(false)
  80 + .type(InputType.PhoneNumber)
  81 + .onChange((content) => {
  82 + this.phoneContent = content
  83 + this.isSubmit = (this.phoneContent.length >= 11 && this.codeContent.length >= 4)
  84 + if (content.length >= 11) {
  85 + this.codeBtnState = true
  86 + } else {
  87 + this.codeBtnState = false
  88 + }
  89 + })
  90 +
  91 + Row() {
  92 + TextInput({ text: this.codeContent,placeholder: "验证码" })
  93 + .placeholderColor("#CCCCCC")
  94 + .layoutWeight(1)
  95 + .fontSize(16)
  96 + .height(48)
  97 + .type(InputType.Number)
  98 + .fontColor("#222222")
  99 + .backgroundColor("#00000000")
  100 + .borderRadius({ topLeft: 4, bottomLeft: 4 })
  101 + .onChange((value) => {
  102 + this.codeContent = value
  103 + this.isSubmit = (this.phoneContent.length >= 11 && this.codeContent.length >= 4)
  104 + })
  105 +
  106 + Text(this.codeStateSuccess ? this.timeCount + "s" : this.isFirst?"发送验证码":'重新获取')
  107 + .fontColor(this.codeBtnState?'#ED2800':'#80ED2800')
  108 + .width(110)
  109 + .fontSize(14)
  110 + .fontWeight( FontWeight.Bold)
  111 + .height(48)
  112 + .textAlign(TextAlign.Center)
  113 + .enabled(this.codeStateSuccess?false:true)
  114 + .onClick(() => {
  115 + if (this.phoneContent.length < 11) {
  116 + return
  117 + }
  118 +
  119 + let currentTime = DateTimeUtils.getTimeStamp()
  120 + if (currentTime - this.lastTime < 500) {
  121 + return
  122 + }
  123 + this.lastTime = currentTime;
  124 + this.isCodeSend = true
  125 +
  126 + })
  127 +
  128 +
  129 + }.margin({ top: 12 })
  130 + .height(48)
  131 + .alignItems(VerticalAlign.Center)
  132 + .justifyContent(FlexAlign.Start)
  133 + .backgroundImage($r('app.media.code_login_bg'))
  134 + .backgroundImageSize({width:'100%',height:48})
  135 +
  136 +
  137 +
  138 + }.width('100%').padding({ left: 25, right: 25 })
  139 +
  140 + Row() {
  141 + Text("确认")
  142 + .layoutWeight(1)
  143 + .fontColor(this.isSubmit ?"#FFFFFFFF":"#66FFFFFF")
  144 + .borderRadius(4)
  145 + .fontSize(18)
  146 + .textAlign(TextAlign.Center)
  147 + .fontWeight(FontWeight.Medium)
  148 + .margin({ top: 26 })
  149 + .height(44)
  150 + .backgroundColor(this.isSubmit ?"#ED2800":"#99ED2800")
  151 + .enabled(this.isSubmit ? true : false)
  152 + .onClick(() => {
  153 + this.checkVerifyCode()
  154 + })
  155 + }.padding({ left: 25, right: 25 }).width('100%')
  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.sendVerifyCodeByToken().then(()=>{
  167 + this.showToastTip("已发送")
  168 + this.codeStateSuccess=true
  169 + this.isCodeSend=false
  170 + }).catch((message: string)=>{
  171 + this.showToastTip(message)
  172 + this.codeStateSuccess=false
  173 + this.isCodeSend=false
  174 + })
  175 + }
  176 +
  177 +
  178 + //校验验证码
  179 + checkVerifyCode() {
  180 + TrackingButton.click("checkingPhoneNumberPageConfirm",TrackConstants.PageName.Checking_PhoneNum,TrackConstants.PageName.Checking_PhoneNum)
  181 + if (!this.isSubmit) {
  182 + return
  183 + }
  184 + if (this.isEmpty(this.phoneContent)) {
  185 + return
  186 + }
  187 + if (this.isEmpty(this.codeContent)) {
  188 + return
  189 + }
  190 +
  191 + this.loginViewModel.checkVerifyCodeByToken(this.codeContent).then(()=>{
  192 + let params: SettingPasswordParams = {
  193 + pageID:'1',
  194 + phoneContent:this.phoneContent,
  195 + codeContent:this.codeContent,
  196 + pageType:1
  197 + }
  198 + WDRouterRule.jumpWithPage(WDRouterPage.settingPasswordPage, params)
  199 + }).catch((message: string)=>{
  200 + this.showToastTip(message)
  201 + })
  202 + }
  203 +
  204 + isEmpty(obj: undefined|null|string): boolean {
  205 + return (obj == undefined || obj == null || obj == '');
  206 + }
  207 +
  208 + showToastTip(msg:string){
  209 + this.toastText = msg
  210 + this.dialogToast.open()
  211 + }
  212 +
  213 + securityPhone(phoneNum:string):string{
  214 + let securityNum:string;
  215 + let needSecurityString = phoneNum.substring(3, phoneNum.length - 4);
  216 + securityNum = phoneNum.replace(needSecurityString,'****')
  217 + return securityNum;
  218 + }
  219 +
  220 + startCount() {
  221 + this.isFirst = false
  222 + let time = setInterval(() => {
  223 + Logger.debug("倒计时:" + this.timeCount)
  224 + this.timeCount--
  225 + if (this.timeCount < 1) {
  226 + this.codeStateSuccess = false
  227 + this.timeCount = 60
  228 + clearInterval(time)
  229 + }
  230 + }, 1000)
  231 + }
  232 +}
@@ -8,6 +8,8 @@ @@ -8,6 +8,8 @@
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",
  13 + "pages/login/VerifyPhoneNumberPage"
12 ] 14 ]
13 } 15 }
@@ -2,7 +2,8 @@ export namespace TrackConstants { @@ -2,7 +2,8 @@ export namespace TrackConstants {
2 2
3 export enum EventType { 3 export enum EventType {
4 Show = 0, 4 Show = 0,
5 - Click = 1 5 + Click = 1,
  6 + CurrentNumberPanelContentExposure = 2,
6 } 7 }
7 8
8 // 行为类型 9 // 行为类型
@@ -24,7 +25,8 @@ export namespace TrackConstants { @@ -24,7 +25,8 @@ export namespace TrackConstants {
24 UnSubscribe = "unSubscribe", 25 UnSubscribe = "unSubscribe",
25 CloseInterestCard = "closeInterestCard", 26 CloseInterestCard = "closeInterestCard",
26 SelectInterestCard = "selectInterestCard", 27 SelectInterestCard = "selectInterestCard",
27 - 28 + //电子报当前页曝光
  29 + CurrentNumberPanelContentExposure = "current_Number_Panel_content_exposure",
28 } 30 }
29 31
30 // 分享聚道 32 // 分享聚道
@@ -208,5 +210,11 @@ export namespace TrackConstants { @@ -208,5 +210,11 @@ export namespace TrackConstants {
208 210
209 ///兴趣偏好页 211 ///兴趣偏好页
210 Interest = "preferenceSelectionPage", 212 Interest = "preferenceSelectionPage",
  213 + //意见反馈
  214 + FeedbackPage = 'feedbackPage',
  215 + //动态详情
  216 + DynamicDetailPage = 'dynamicDetailPage',
  217 + //早晚报
  218 + NewsPaperPage = 'newsPaperPage',
211 } 219 }
212 } 220 }
@@ -22,7 +22,15 @@ export class TrackParamConvert { @@ -22,7 +22,15 @@ export class TrackParamConvert {
22 22
23 static pageCompProgram(pageInfo?: PageInfoDTO, comp?: CompInfoBean, program?: ContentDTO) : ParamType { 23 static pageCompProgram(pageInfo?: PageInfoDTO, comp?: CompInfoBean, program?: ContentDTO) : ParamType {
24 let params = TrackingUtils.generateParams() 24 let params = TrackingUtils.generateParams()
25 - 25 + if (program) {
  26 + params["contentType"] = program.objectType
  27 + params["contentId"] = program.objectId
  28 + params["contentName"] = program.newsTitle
  29 + params["channelSourceId"] = program.channelId
  30 + params["rmhPlatform"] = program.rmhPlatform
  31 +
  32 + TrackParamConvert.appendRecommend(program, params)
  33 + }
26 //TODO: 转换参数 34 //TODO: 转换参数
27 35
28 return params 36 return params
@@ -29,6 +29,10 @@ export class TrackingContent { @@ -29,6 +29,10 @@ export class TrackingContent {
29 params["action"] = TrackConstants.ActionType.Show 29 params["action"] = TrackConstants.ActionType.Show
30 TrackingUtils.fillPositionWith(params) 30 TrackingUtils.fillPositionWith(params)
31 Tracking.event("content_exposure", params) 31 Tracking.event("content_exposure", params)
  32 + }else if(eventType === TrackConstants.EventType.CurrentNumberPanelContentExposure){
  33 + params["action"] = TrackConstants.ActionType.Show
  34 + TrackingUtils.fillPositionWith(params)
  35 + Tracking.event(TrackConstants.ActionType.CurrentNumberPanelContentExposure, params)
32 } 36 }
33 } 37 }
34 38
@@ -82,6 +86,10 @@ export class TrackingContent { @@ -82,6 +86,10 @@ export class TrackingContent {
82 } 86 }
83 87
84 static commentClick(pageId: string, pageName: string, extParams?: ParamType) { 88 static commentClick(pageId: string, pageName: string, extParams?: ParamType) {
  89 + TrackingContent.commentClickWithEvent("content_comment_click",pageId,pageName,extParams);
  90 + }
  91 +
  92 + static commentClickWithEvent(event: string,pageId: string, pageName: string, extParams?: ParamType) {
85 let params = TrackingUtils.generateParams(extParams) 93 let params = TrackingUtils.generateParams(extParams)
86 if (pageId.length) { 94 if (pageId.length) {
87 params["pageId"] = pageId 95 params["pageId"] = pageId
@@ -91,7 +99,7 @@ export class TrackingContent { @@ -91,7 +99,7 @@ export class TrackingContent {
91 } 99 }
92 params["action"] =TrackConstants.ActionType.Comment 100 params["action"] =TrackConstants.ActionType.Comment
93 TrackingUtils.fillPositionWith(params) 101 TrackingUtils.fillPositionWith(params)
94 - Tracking.event("content_comment_click", params) 102 + Tracking.event(event, params)
95 } 103 }
96 104
97 static commentShare(pageId: string, pageName: string, extParams?: ParamType) { 105 static commentShare(pageId: string, pageName: string, extParams?: ParamType) {
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 ,TrackConstants} 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;
11 // 获取UIAbility上下文 13 // 获取UIAbility上下文
12 context: common.UIAbilityContext = getContext(this) as common.UIAbilityContext 14 context: common.UIAbilityContext = getContext(this) as common.UIAbilityContext
13 15
@@ -46,6 +48,7 @@ struct ENewspaper { @@ -46,6 +48,7 @@ struct ENewspaper {
46 } 48 }
47 49
48 onPageShow() { 50 onPageShow() {
  51 + this.pageShowTime = DateTimeUtils.getTimeStamp()
49 this.setSystemBar('#80000000','#80000000', '#FFFFFFFF') 52 this.setSystemBar('#80000000','#80000000', '#FFFFFFFF')
50 Logger.info(TAG, 'onPageShow'); 53 Logger.info(TAG, 'onPageShow');
51 } 54 }
@@ -53,6 +56,8 @@ struct ENewspaper { @@ -53,6 +56,8 @@ struct ENewspaper {
53 onPageHide() { 56 onPageHide() {
54 this.setSystemBar('#FFFFFFFF','#00000000', '#000000') 57 this.setSystemBar('#FFFFFFFF','#00000000', '#000000')
55 Logger.info(TAG, 'onPageHide'); 58 Logger.info(TAG, 'onPageHide');
  59 + //页面浏览
  60 + TrackingPageBrowse.trackCommonPageExposureEnd(TrackConstants.PageName.NewsPaperPage,TrackConstants.PageName.NewsPaperPage,Math.floor((DateTimeUtils.getTimeStamp() - this.pageShowTime)/1000))
56 } 61 }
57 62
58 onBackPress() { 63 onBackPress() {
1 import { MorningEveningPaperComponent } from 'wdComponent'; 1 import { MorningEveningPaperComponent } from 'wdComponent';
2 -import { Logger, WindowModel } from 'wdKit'; 2 +import { DateTimeUtils, Logger, WindowModel } from 'wdKit';
  3 +import { TrackConstants, TrackingPageBrowse} from 'wdTracking/Index';
3 4
4 const TAG = 'MorningEveningPaperPage'; 5 const TAG = 'MorningEveningPaperPage';
5 6
@@ -7,6 +8,8 @@ const TAG = 'MorningEveningPaperPage'; @@ -7,6 +8,8 @@ const TAG = 'MorningEveningPaperPage';
7 @Component 8 @Component
8 struct MorningEveningPaperPage { 9 struct MorningEveningPaperPage {
9 @State isPageShow: boolean = false 10 @State isPageShow: boolean = false
  11 + pageShowTime:number = 0;
  12 + pageHideTime:number = 0;
10 build() { 13 build() {
11 Column() { 14 Column() {
12 MorningEveningPaperComponent() 15 MorningEveningPaperComponent()
@@ -43,6 +46,7 @@ struct MorningEveningPaperPage { @@ -43,6 +46,7 @@ struct MorningEveningPaperPage {
43 WindowModel.shared.setWindowLayoutFullScreen(true) 46 WindowModel.shared.setWindowLayoutFullScreen(true)
44 WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#ffffff', }) 47 WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#ffffff', })
45 } 48 }
  49 + this.pageShowTime = DateTimeUtils.getTimeStamp()
46 } 50 }
47 51
48 onPageHide() { 52 onPageHide() {
@@ -50,6 +54,12 @@ struct MorningEveningPaperPage { @@ -50,6 +54,12 @@ struct MorningEveningPaperPage {
50 WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#000000', }) 54 WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#000000', })
51 this.isPageShow = true 55 this.isPageShow = true
52 Logger.info(TAG, 'onPageHide'); 56 Logger.info(TAG, 'onPageHide');
  57 +
  58 + //早晚报埋点
  59 + this.pageHideTime = DateTimeUtils.getTimeStamp()
  60 + let duration = 0
  61 + duration = Math.floor((this.pageHideTime - this.pageShowTime)/1000)
  62 + TrackingPageBrowse.trackCommonPageExposureEnd(TrackConstants.SummaryType.MorningAndEveningNews,TrackConstants.SummaryType.MorningAndEveningNews,duration)
53 } 63 }
54 64
55 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,TrackConstants } 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;
10 @State relId: string = '' 12 @State relId: string = ''
11 @State contentId: string = '' 13 @State contentId: string = ''
12 @State relType: string = '' 14 @State relType: string = ''
@@ -30,4 +32,12 @@ struct DynamicDetailPage { @@ -30,4 +32,12 @@ struct DynamicDetailPage {
30 this.relType = params?.extra?.relType || ''; 32 this.relType = params?.extra?.relType || '';
31 this.contentId = params?.contentID || ''; 33 this.contentId = params?.contentID || '';
32 } 34 }
  35 + onPageShow() {
  36 + this.pageShowTime = DateTimeUtils.getTimeStamp()
  37 + }
  38 + onPageHide() {
  39 + //页面浏览
  40 + TrackingPageBrowse.trackCommonPageExposureEnd(TrackConstants.PageName.DynamicDetailPage,TrackConstants.PageName.DynamicDetailPage,Math.floor((DateTimeUtils.getTimeStamp() - this.pageShowTime)/1000))
  41 +
  42 + }
33 } 43 }
@@ -4,6 +4,7 @@ import { WDRouterPage } from 'wdRouter'; @@ -4,6 +4,7 @@ import { WDRouterPage } from 'wdRouter';
4 import { SPHelper } from 'wdKit/Index'; 4 import { SPHelper } from 'wdKit/Index';
5 import { SpConstants } from 'wdConstant/Index'; 5 import { SpConstants } from 'wdConstant/Index';
6 import { ButtonOptions, promptAction } from '@kit.ArkUI'; 6 import { ButtonOptions, promptAction } from '@kit.ArkUI';
  7 +import { ParamType, TrackConstants, TrackingContent } from 'wdTracking/Index';
7 8
8 @Entry 9 @Entry
9 @Component 10 @Component
@@ -34,6 +35,8 @@ struct LaunchInterestsHobbiesPage { @@ -34,6 +35,8 @@ struct LaunchInterestsHobbiesPage {
34 //直接跳过到首页 35 //直接跳过到首页
35 //跳转首页 36 //跳转首页
36 WDRouterRule.jumpWithReplacePage(WDRouterPage.mainPage) 37 WDRouterRule.jumpWithReplacePage(WDRouterPage.mainPage)
  38 +
  39 + this.trackingLaunchJumpOver(false)
37 }) 40 })
38 } 41 }
39 .width('100%') 42 .width('100%')
@@ -148,6 +151,9 @@ struct LaunchInterestsHobbiesPage { @@ -148,6 +151,9 @@ struct LaunchInterestsHobbiesPage {
148 this.saveTagIds() 151 this.saveTagIds()
149 //跳转首页 152 //跳转首页
150 WDRouterRule.jumpWithReplacePage(WDRouterPage.mainPage) 153 WDRouterRule.jumpWithReplacePage(WDRouterPage.mainPage)
  154 +
  155 + this.trackingLaunchJumpOver(true)
  156 +
151 }) 157 })
152 } 158 }
153 .width('100%') 159 .width('100%')
@@ -185,4 +191,17 @@ struct LaunchInterestsHobbiesPage { @@ -185,4 +191,17 @@ struct LaunchInterestsHobbiesPage {
185 } 191 }
186 SPHelper.default.saveSync(SpConstants.PUBLICVISUTORMODE_INTERESTTAGS,tags) 192 SPHelper.default.saveSync(SpConstants.PUBLICVISUTORMODE_INTERESTTAGS,tags)
187 } 193 }
  194 +
  195 + trackingLaunchJumpOver(selectOrJump:boolean){
  196 + let tags = SPHelper.default.getSync(SpConstants.PUBLICVISUTORMODE_INTERESTTAGS,'') as string
  197 + let action = selectOrJump?TrackConstants.ActionType.SelectInterestCard:TrackConstants.ActionType.CloseInterestCard
  198 + let pageParam: ParamType = {
  199 + 'interestContentOptions':tags,
  200 + 'itemId':tags,
  201 + 'action':action,
  202 + 'sceneId':'9999',
  203 + 'cnsTraceId':'selfHold',
  204 + }
  205 + TrackingContent.common(TrackConstants.EventType.Click,TrackConstants.PageName.Interest,TrackConstants.PageName.Interest,pageParam)
  206 + }
188 } 207 }
1 import { DeviceUtil, DisplayUtils, UpgradeTipContent } from 'wdKit/Index' 1 import { DeviceUtil, DisplayUtils, UpgradeTipContent } from 'wdKit/Index'
  2 +import { TrackConstants, TrackingButton } from 'wdTracking/Index'
2 3
3 @Preview 4 @Preview
4 @CustomDialog 5 @CustomDialog
@@ -35,6 +36,8 @@ export struct UpgradeTipDialog { @@ -35,6 +36,8 @@ export struct UpgradeTipDialog {
35 .margin({top: 24}) 36 .margin({top: 24})
36 .onClick(() => { 37 .onClick(() => {
37 this.controller.close() 38 this.controller.close()
  39 +
  40 + TrackingButton.click("notUpdatedTemporarily", TrackConstants.PageName.Update, TrackConstants.PageName.Update)
38 if (this.cancel) { 41 if (this.cancel) {
39 this.cancel() 42 this.cancel()
40 } 43 }
@@ -88,6 +91,8 @@ export struct UpgradeTipDialog { @@ -88,6 +91,8 @@ export struct UpgradeTipDialog {
88 }) 91 })
89 .onClick(() => { 92 .onClick(() => {
90 this.controller.close() 93 this.controller.close()
  94 +
  95 + TrackingButton.click("immediateUpdating", TrackConstants.PageName.Update, TrackConstants.PageName.Update)
91 if (this.confirm) { 96 if (this.confirm) {
92 this.confirm() 97 this.confirm()
93 } 98 }
@@ -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}`);
@@ -25,7 +25,9 @@ import { EmptyComponent, @@ -25,7 +25,9 @@ import { EmptyComponent,
25 viewBlogItemInsightIntentShare} from 'wdComponent/Index'; 25 viewBlogItemInsightIntentShare} from 'wdComponent/Index';
26 26
27 const TAG = 'MultiPictureDetailPageComponent'; 27 const TAG = 'MultiPictureDetailPageComponent';
28 - 28 +/**
  29 + * 多图(图集详情页)UI
  30 + */
29 @Component 31 @Component
30 export struct MultiPictureDetailPageComponent { 32 export struct MultiPictureDetailPageComponent {
31 private relId: string = '' 33 private relId: string = ''
@@ -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 }