Merge branch 'main' of http://192.168.1.42/developOne/harmonyPool
Showing
20 changed files
with
387 additions
and
147 deletions
| @@ -3,10 +3,13 @@ export struct CustomToast { | @@ -3,10 +3,13 @@ export struct CustomToast { | ||
| 3 | public static LENGTH_LONG = 4000; | 3 | public static LENGTH_LONG = 4000; |
| 4 | public static LENGTH_SHORT = 2000; | 4 | public static LENGTH_SHORT = 2000; |
| 5 | 5 | ||
| 6 | - @State msg: string = "" | 6 | + @State msg: ResourceStr = "" |
| 7 | @State duration: number = CustomToast.LENGTH_SHORT | 7 | @State duration: number = CustomToast.LENGTH_SHORT |
| 8 | @State bgBorderRadius: number = 10 | 8 | @State bgBorderRadius: number = 10 |
| 9 | - | 9 | + opacityValue: number = 0.7 |
| 10 | + bgColor: ResourceColor = $r("app.color.black") | ||
| 11 | + fontSizeValue :number | string | Resource = "27lpx" | ||
| 12 | + lineHeightValue :number | string | Resource = "38lpx" | ||
| 10 | controller: CustomDialogController | 13 | controller: CustomDialogController |
| 11 | 14 | ||
| 12 | dismiss: () => void = () => { | 15 | dismiss: () => void = () => { |
| @@ -27,13 +30,13 @@ export struct CustomToast { | @@ -27,13 +30,13 @@ export struct CustomToast { | ||
| 27 | Text(this.msg) | 30 | Text(this.msg) |
| 28 | .fontWeight(FontWeight.Regular) | 31 | .fontWeight(FontWeight.Regular) |
| 29 | .fontColor($r('app.color.white')) | 32 | .fontColor($r('app.color.white')) |
| 30 | - .fontSize("27lpx") | ||
| 31 | - .lineHeight("38lpx") | 33 | + .fontSize(this.fontSizeValue) |
| 34 | + .lineHeight(this.lineHeightValue) | ||
| 32 | .textAlign(TextAlign.Center) | 35 | .textAlign(TextAlign.Center) |
| 33 | }.borderRadius(`${this.bgBorderRadius}lpx`) | 36 | }.borderRadius(`${this.bgBorderRadius}lpx`) |
| 34 | .constraintSize({maxWidth:"86%"}) | 37 | .constraintSize({maxWidth:"86%"}) |
| 35 | .padding({top:"23lpx",bottom:'23lpx',left:"35lpx",right:"35lpx"}) | 38 | .padding({top:"23lpx",bottom:'23lpx',left:"35lpx",right:"35lpx"}) |
| 36 | - .backgroundColor($r("app.color.black")) | ||
| 37 | - .opacity(0.7) | 39 | + .backgroundColor(this.bgColor) |
| 40 | + .opacity(this.opacityValue) | ||
| 38 | } | 41 | } |
| 39 | } | 42 | } |
| @@ -21,7 +21,7 @@ export enum HostEnum { | @@ -21,7 +21,7 @@ export enum HostEnum { | ||
| 21 | * 环境host管理工具类 | 21 | * 环境host管理工具类 |
| 22 | */ | 22 | */ |
| 23 | export class HostManager { | 23 | export class HostManager { |
| 24 | - private static _hostUrl: HostEnum = HostEnum.HOST_UAT; | 24 | + private static _hostUrl: HostEnum = HostEnum.HOST_PRODUCT; |
| 25 | 25 | ||
| 26 | static changeHost(host: HostEnum) { | 26 | static changeHost(host: HostEnum) { |
| 27 | HostManager._hostUrl = host; | 27 | HostManager._hostUrl = host; |
| @@ -7,6 +7,7 @@ import { MultiPictureDetailViewModel } from '../viewmodel/MultiPictureDetailView | @@ -7,6 +7,7 @@ import { MultiPictureDetailViewModel } from '../viewmodel/MultiPictureDetailView | ||
| 7 | import { SpConstants } from 'wdConstant/Index'; | 7 | import { SpConstants } from 'wdConstant/Index'; |
| 8 | import { WDShare } from 'wdShare/Index'; | 8 | import { WDShare } from 'wdShare/Index'; |
| 9 | import { LikeComponent } from './view/LikeComponent' | 9 | import { LikeComponent } from './view/LikeComponent' |
| 10 | +import { TrackConstants } from 'wdTracking/Index'; | ||
| 10 | 11 | ||
| 11 | const TAG = 'CarderInteraction' | 12 | const TAG = 'CarderInteraction' |
| 12 | 13 | ||
| @@ -22,6 +23,8 @@ export struct CarderInteraction { | @@ -22,6 +23,8 @@ export struct CarderInteraction { | ||
| 22 | @State likeBean: Record<string, string> = {} | 23 | @State likeBean: Record<string, string> = {} |
| 23 | @State likesStyle: number | string = 1 // 赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空 | 24 | @State likesStyle: number | string = 1 // 赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空 |
| 24 | @State openLikes: boolean = false // 是否可以点赞 1:可以 0:不可以 | 25 | @State openLikes: boolean = false // 是否可以点赞 1:可以 0:不可以 |
| 26 | + @Provide pageName: string = TrackConstants.PageName.DynamicDetail | ||
| 27 | + @Provide pageId: string = TrackConstants.PageName.DynamicDetail | ||
| 25 | 28 | ||
| 26 | async aboutToAppear() { | 29 | async aboutToAppear() { |
| 27 | await this.getContentDetailData() | 30 | await this.getContentDetailData() |
| @@ -9,7 +9,7 @@ import font from '@ohos.font'; | @@ -9,7 +9,7 @@ import font from '@ohos.font'; | ||
| 9 | import { ENewspaperPageDialog } from '../dialog/ENewspaperPageDialog'; | 9 | 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, CustomToast } from 'wdKit/Index'; |
| 13 | import { TrackingContent,TrackConstants, TrackingButton } from 'wdTracking/Index'; | 13 | import { TrackingContent,TrackConstants, TrackingButton } from 'wdTracking/Index'; |
| 14 | import { WDShare } from 'wdShare/Index'; | 14 | import { WDShare } from 'wdShare/Index'; |
| 15 | import { window } from '@kit.ArkUI'; | 15 | import { window } from '@kit.ArkUI'; |
| @@ -36,6 +36,25 @@ export struct ENewspaperPageComponent { | @@ -36,6 +36,25 @@ export struct ENewspaperPageComponent { | ||
| 36 | @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0 | 36 | @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0 |
| 37 | @State ratio: string = '100%' | 37 | @State ratio: string = '100%' |
| 38 | 38 | ||
| 39 | + @State toastText:ResourceStr = "" | ||
| 40 | + dialogToast: CustomDialogController = new CustomDialogController({ | ||
| 41 | + builder: CustomToast({ | ||
| 42 | + bgColor:$r("app.color.color_B3000000"), | ||
| 43 | + opacityValue:1, | ||
| 44 | + fontSizeValue:"25lpx", | ||
| 45 | + lineHeightValue:"36lpx", | ||
| 46 | + msg: this.toastText, | ||
| 47 | + }), | ||
| 48 | + autoCancel: false, | ||
| 49 | + alignment: DialogAlignment.Center, | ||
| 50 | + customStyle: true, | ||
| 51 | + maskColor:"#00000000" | ||
| 52 | + }) | ||
| 53 | + | ||
| 54 | + showToastTip(msg:ResourceStr){ | ||
| 55 | + this.toastText = msg | ||
| 56 | + this.dialogToast.open() | ||
| 57 | + } | ||
| 39 | //watch监听报纸页码回调 | 58 | //watch监听报纸页码回调 |
| 40 | onCurrentPageNumUpdated(): void { | 59 | onCurrentPageNumUpdated(): void { |
| 41 | console.log("ENewspaperPageComponent-onCurrentPageNumUpdated", "currentPageNum:", this.currentPageNum) | 60 | console.log("ENewspaperPageComponent-onCurrentPageNumUpdated", "currentPageNum:", this.currentPageNum) |
| @@ -323,7 +342,7 @@ export struct ENewspaperPageComponent { | @@ -323,7 +342,7 @@ export struct ENewspaperPageComponent { | ||
| 323 | .id('e_newspaper_page_num') | 342 | .id('e_newspaper_page_num') |
| 324 | .onClick((event: ClickEvent) => { | 343 | .onClick((event: ClickEvent) => { |
| 325 | if(!NetworkUtil.isNetConnected()){ | 344 | if(!NetworkUtil.isNetConnected()){ |
| 326 | - ToastUtils.showToast('网络出小差了,请检查网络后重试', 1000) | 345 | + this.showToastTip('网络出小差了,请检查网络后重试') |
| 327 | return | 346 | return |
| 328 | } | 347 | } |
| 329 | if (this.newspaperListBean.list && this.newspaperListBean.list.length > 0) { | 348 | if (this.newspaperListBean.list && this.newspaperListBean.list.length > 0) { |
| @@ -334,7 +353,7 @@ export struct ENewspaperPageComponent { | @@ -334,7 +353,7 @@ export struct ENewspaperPageComponent { | ||
| 334 | this.pageDialogController.close() | 353 | this.pageDialogController.close() |
| 335 | } | 354 | } |
| 336 | }else { | 355 | }else { |
| 337 | - ToastUtils.showToast('暂无数据', 1000) | 356 | + this.showToastTip('暂无数据') |
| 338 | } | 357 | } |
| 339 | }) | 358 | }) |
| 340 | 359 | ||
| @@ -362,7 +381,7 @@ export struct ENewspaperPageComponent { | @@ -362,7 +381,7 @@ export struct ENewspaperPageComponent { | ||
| 362 | .id('e_newspaper_read') | 381 | .id('e_newspaper_read') |
| 363 | .onClick((event: ClickEvent) => { | 382 | .onClick((event: ClickEvent) => { |
| 364 | if(!NetworkUtil.isNetConnected()){ | 383 | if(!NetworkUtil.isNetConnected()){ |
| 365 | - ToastUtils.showToast('网络出小差了,请检查网络后重试', 1000) | 384 | + this.showToastTip('网络出小差了,请检查网络后重试') |
| 366 | return | 385 | return |
| 367 | } | 386 | } |
| 368 | if (this.newspaperListBean.list && this.newspaperListBean.list.length > 0) { | 387 | if (this.newspaperListBean.list && this.newspaperListBean.list.length > 0) { |
| @@ -376,7 +395,7 @@ export struct ENewspaperPageComponent { | @@ -376,7 +395,7 @@ export struct ENewspaperPageComponent { | ||
| 376 | 'currentNumber':this.swiperIndex, | 395 | 'currentNumber':this.swiperIndex, |
| 377 | }) | 396 | }) |
| 378 | }else { | 397 | }else { |
| 379 | - ToastUtils.showToast('暂无数据', 1000) | 398 | + this.showToastTip('暂无数据') |
| 380 | } | 399 | } |
| 381 | }) | 400 | }) |
| 382 | } | 401 | } |
| @@ -414,7 +433,7 @@ export struct ENewspaperPageComponent { | @@ -414,7 +433,7 @@ export struct ENewspaperPageComponent { | ||
| 414 | let listBean = await NewspaperViewModel.getNewspaperList(this.calendarDate, this.picWidth + 'x' + this.picHeight) | 433 | let listBean = await NewspaperViewModel.getNewspaperList(this.calendarDate, this.picWidth + 'x' + this.picHeight) |
| 415 | this.newspaperListBean = listBean; | 434 | this.newspaperListBean = listBean; |
| 416 | } else { | 435 | } else { |
| 417 | - ToastUtils.showToast('网络出小差了,请检查网络后重试', 1000) | 436 | + this.showToastTip('网络出小差了,请检查网络后重试') |
| 418 | } | 437 | } |
| 419 | } catch (exception) { | 438 | } catch (exception) { |
| 420 | 439 |
| 1 | import { FeedBackParams, FeedbackTypeBean, PhotoListBean } from 'wdBean/Index'; | 1 | import { FeedBackParams, FeedbackTypeBean, PhotoListBean } from 'wdBean/Index'; |
| 2 | import { AppUtils, | 2 | import { AppUtils, |
| 3 | + CustomToast, | ||
| 3 | DateTimeUtils, | 4 | DateTimeUtils, |
| 4 | DeviceUtil, | 5 | DeviceUtil, |
| 5 | - FastClickUtil, Logger, NetworkUtil, StringUtils, ToastUtils, UserDataLocal } from 'wdKit/Index'; | 6 | + FastClickUtil, Logger, NetworkUtil, StringUtils, UserDataLocal } from 'wdKit/Index'; |
| 6 | import { MultiPictureDetailViewModel } from '../viewmodel/MultiPictureDetailViewModel'; | 7 | import { MultiPictureDetailViewModel } from '../viewmodel/MultiPictureDetailViewModel'; |
| 7 | import { CustomTitleUI } from './reusable/CustomTitleUI' | 8 | import { CustomTitleUI } from './reusable/CustomTitleUI' |
| 8 | import { picker } from '@kit.CoreFileKit'; | 9 | import { picker } from '@kit.CoreFileKit'; |
| @@ -38,6 +39,21 @@ export struct FeedBackActivity { | @@ -38,6 +39,21 @@ export struct FeedBackActivity { | ||
| 38 | addPic: PhotoListBean = {itemType:1} as PhotoListBean | 39 | addPic: PhotoListBean = {itemType:1} as PhotoListBean |
| 39 | @State pics: PhotoListBean[] = [this.addPic] as PhotoListBean[] | 40 | @State pics: PhotoListBean[] = [this.addPic] as PhotoListBean[] |
| 40 | 41 | ||
| 42 | + @State toastText:ResourceStr = "" | ||
| 43 | + dialogToast: CustomDialogController = new CustomDialogController({ | ||
| 44 | + builder: CustomToast({ | ||
| 45 | + bgColor:$r("app.color.color_B3000000"), | ||
| 46 | + opacityValue:1, | ||
| 47 | + fontSizeValue:"25lpx", | ||
| 48 | + lineHeightValue:"36lpx", | ||
| 49 | + msg: this.toastText, | ||
| 50 | + }), | ||
| 51 | + autoCancel: false, | ||
| 52 | + alignment: DialogAlignment.Center, | ||
| 53 | + customStyle: true, | ||
| 54 | + maskColor:"#00000000" | ||
| 55 | + }) | ||
| 56 | + | ||
| 41 | async aboutToAppear() { | 57 | async aboutToAppear() { |
| 42 | await this.getContentDetailData() | 58 | await this.getContentDetailData() |
| 43 | } | 59 | } |
| @@ -124,7 +140,7 @@ export struct FeedBackActivity { | @@ -124,7 +140,7 @@ export struct FeedBackActivity { | ||
| 124 | if(value.length> 500){ | 140 | if(value.length> 500){ |
| 125 | //隐藏键盘 | 141 | //隐藏键盘 |
| 126 | inputMethod.getController().stopInputSession(); | 142 | inputMethod.getController().stopInputSession(); |
| 127 | - ToastUtils.shortToast($r('app.string.res_feedback_commentsFail')) | 143 | + this.showToastTip($r('app.string.res_feedback_commentsFail')) |
| 128 | // Logger.debug(TAG, "onChange > 500 " + value) | 144 | // Logger.debug(TAG, "onChange > 500 " + value) |
| 129 | this.editValue = {classifyName:value.substring(0,500)} as FeedbackTypeBean | 145 | this.editValue = {classifyName:value.substring(0,500)} as FeedbackTypeBean |
| 130 | }else{ | 146 | }else{ |
| @@ -409,13 +425,13 @@ export struct FeedBackActivity { | @@ -409,13 +425,13 @@ export struct FeedBackActivity { | ||
| 409 | }) | 425 | }) |
| 410 | }else{ | 426 | }else{ |
| 411 | // | 427 | // |
| 412 | - ToastUtils.shortToast($r('app.string.feedback_opinion_type')) | 428 | + this.showToastTip($r('app.string.feedback_opinion_type')) |
| 413 | TrackingButton.click('feedbackPageSubmitFeedback',TrackConstants.PageName.FeedbackPage,TrackConstants.PageName.FeedbackPage) | 429 | TrackingButton.click('feedbackPageSubmitFeedback',TrackConstants.PageName.FeedbackPage,TrackConstants.PageName.FeedbackPage) |
| 414 | return | 430 | return |
| 415 | } | 431 | } |
| 416 | //内容必填 | 432 | //内容必填 |
| 417 | if(StringUtils.isEmpty(this.editValue.classifyName) || this.editValue.classifyName.length < 10 || this.editValue.classifyName.length>500){ | 433 | if(StringUtils.isEmpty(this.editValue.classifyName) || this.editValue.classifyName.length < 10 || this.editValue.classifyName.length>500){ |
| 418 | - ToastUtils.shortToast($r('app.string.res_feedback_commentsFail')) | 434 | + this.showToastTip($r('app.string.res_feedback_commentsFail')) |
| 419 | return | 435 | return |
| 420 | } | 436 | } |
| 421 | 437 | ||
| @@ -458,4 +474,9 @@ export struct FeedBackActivity { | @@ -458,4 +474,9 @@ export struct FeedBackActivity { | ||
| 458 | TrackingPageBrowse.trackCommonPageExposureEnd(TrackConstants.PageName.FeedbackPage,TrackConstants.PageName.FeedbackPage,Math.floor((DateTimeUtils.getTimeStamp() - this.pageShowTime)/1000)) | 474 | TrackingPageBrowse.trackCommonPageExposureEnd(TrackConstants.PageName.FeedbackPage,TrackConstants.PageName.FeedbackPage,Math.floor((DateTimeUtils.getTimeStamp() - this.pageShowTime)/1000)) |
| 459 | 475 | ||
| 460 | } | 476 | } |
| 477 | + | ||
| 478 | + showToastTip(msg:ResourceStr){ | ||
| 479 | + this.toastText = msg | ||
| 480 | + this.dialogToast.open() | ||
| 481 | + } | ||
| 461 | } | 482 | } |
| @@ -88,7 +88,7 @@ export struct Card6Component { | @@ -88,7 +88,7 @@ export struct Card6Component { | ||
| 88 | .fontSize(18) | 88 | .fontSize(18) |
| 89 | .lineHeight(27) | 89 | .lineHeight(27) |
| 90 | .fontWeight(FontWeight.Normal) | 90 | .fontWeight(FontWeight.Normal) |
| 91 | - .maxLines(2) | 91 | + .maxLines(this.contentDTO.appStyle === '6' ? 5 : 2) |
| 92 | .alignSelf(ItemAlign.Start) | 92 | .alignSelf(ItemAlign.Start) |
| 93 | .textOverflow({ overflow: TextOverflow.Ellipsis }) // 超出的部分显示省略号。 | 93 | .textOverflow({ overflow: TextOverflow.Ellipsis }) // 超出的部分显示省略号。 |
| 94 | .textIndent((this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) > 2 && | 94 | .textIndent((this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) > 2 && |
| @@ -54,8 +54,7 @@ export struct ZhSingleRow02 { | @@ -54,8 +54,7 @@ export struct ZhSingleRow02 { | ||
| 54 | 54 | ||
| 55 | resetEdgeAnimation() { | 55 | resetEdgeAnimation() { |
| 56 | if (this.moreWidth > this.initMoreWidth) { | 56 | if (this.moreWidth > this.initMoreWidth) { |
| 57 | - this.moreWidth = this.moreWidth - 1 | ||
| 58 | - this.resetEdgeAnimation(); | 57 | + this.moreWidth = 16 |
| 59 | } | 58 | } |
| 60 | this.resetMoreTips() | 59 | this.resetMoreTips() |
| 61 | } | 60 | } |
| @@ -91,21 +90,30 @@ export struct ZhSingleRow02 { | @@ -91,21 +90,30 @@ export struct ZhSingleRow02 { | ||
| 91 | .margin({ right: 8 }) | 90 | .margin({ right: 8 }) |
| 92 | }) | 91 | }) |
| 93 | } | 92 | } |
| 94 | - if (this.compDTO.operDataList.length >= 2) { | ||
| 95 | - Column() { | ||
| 96 | - if (this.moreWidth > this.initMoreWidth + 2) { | ||
| 97 | - Text(this.moreTips) | ||
| 98 | - .fontSize(8) | ||
| 99 | - .fontColor(0x858585) | ||
| 100 | - .width(8) | 93 | + if (this.compDTO.operDataList.length >= 2 && (this.compDTO?.objectType === '0' || this.compDTO?.objectType === '')) { |
| 94 | + Row() { | ||
| 95 | + Ellipse() | ||
| 96 | + .width(2* (this.moreWidth - this.initMoreWidth - 1)) | ||
| 97 | + .height('100%') | ||
| 98 | + .fill(0xe9e9e9) | ||
| 99 | + .position({ left: -(this.moreWidth - this.initMoreWidth - 3) * 0.8 , top: 0 }) | ||
| 100 | + | ||
| 101 | + Column() { | ||
| 102 | + if (this.moreWidth > this.initMoreWidth + 2) { | ||
| 103 | + Text(this.moreTips) | ||
| 104 | + .fontSize(8) | ||
| 105 | + .fontColor(0x858585) | ||
| 106 | + .width(8) | ||
| 107 | + } | ||
| 101 | } | 108 | } |
| 109 | + .justifyContent(FlexAlign.Center) | ||
| 110 | + .align(Alignment.Center) | ||
| 111 | + .height('100%') | ||
| 112 | + .width(this.initMoreWidth) | ||
| 113 | + .backgroundColor(0xe9e9e9) | ||
| 114 | + .borderRadius({ topLeft: 5, bottomLeft: 5 }) | ||
| 102 | } | 115 | } |
| 103 | - .justifyContent(FlexAlign.Center) | ||
| 104 | - .align(Alignment.Center) | ||
| 105 | - .height('100%') | ||
| 106 | - .width(this.moreWidth) | ||
| 107 | - .backgroundColor(0xe9e9e9) | ||
| 108 | - .borderRadius({ topLeft: 5, bottomLeft: 5 }) | 116 | + .margin({left: 1.5 * (this.moreWidth - this.initMoreWidth)}) |
| 109 | } | 117 | } |
| 110 | } | 118 | } |
| 111 | } | 119 | } |
| @@ -78,8 +78,7 @@ export struct ZhSingleRow03 { | @@ -78,8 +78,7 @@ export struct ZhSingleRow03 { | ||
| 78 | 78 | ||
| 79 | resetEdgeAnimation() { | 79 | resetEdgeAnimation() { |
| 80 | if (this.moreWidth > this.initMoreWidth) { | 80 | if (this.moreWidth > this.initMoreWidth) { |
| 81 | - this.moreWidth = this.moreWidth - 1 | ||
| 82 | - this.resetEdgeAnimation(); | 81 | + this.moreWidth = 16 |
| 83 | } | 82 | } |
| 84 | this.resetMoreTips() | 83 | this.resetMoreTips() |
| 85 | } | 84 | } |
| @@ -166,21 +165,30 @@ export struct ZhSingleRow03 { | @@ -166,21 +165,30 @@ export struct ZhSingleRow03 { | ||
| 166 | this.ItemCard(item) | 165 | this.ItemCard(item) |
| 167 | }) | 166 | }) |
| 168 | } | 167 | } |
| 169 | - if (this.compDTO.operDataList.length >= 2) { | ||
| 170 | - Column() { | ||
| 171 | - if (this.moreWidth > this.initMoreWidth + 2) { | ||
| 172 | - Text(this.moreTips) | ||
| 173 | - .fontSize(8) | ||
| 174 | - .fontColor(0x858585) | ||
| 175 | - .width(8) | 168 | + if (this.compDTO.operDataList.length >= 2 && (this.compDTO?.objectType === '0' || this.compDTO?.objectType === '')) { |
| 169 | + Row() { | ||
| 170 | + Ellipse() | ||
| 171 | + .width(2* (this.moreWidth - this.initMoreWidth - 1)) | ||
| 172 | + .height(116) | ||
| 173 | + .fill(0xf9f9f9) | ||
| 174 | + .position({ left: -(this.moreWidth - this.initMoreWidth - 3) * 0.8 , top: 0 }) | ||
| 175 | + | ||
| 176 | + Column() { | ||
| 177 | + if (this.moreWidth > this.initMoreWidth + 2) { | ||
| 178 | + Text(this.moreTips) | ||
| 179 | + .fontSize(8) | ||
| 180 | + .fontColor(0x858585) | ||
| 181 | + .width(8) | ||
| 182 | + } | ||
| 176 | } | 183 | } |
| 184 | + .justifyContent(FlexAlign.Center) | ||
| 185 | + .align(Alignment.Center) | ||
| 186 | + .height(116) | ||
| 187 | + .width(this.initMoreWidth) | ||
| 188 | + .backgroundColor(0xf9f9f9) | ||
| 189 | + .borderRadius({ topLeft: 5, bottomLeft: 5 }) | ||
| 177 | } | 190 | } |
| 178 | - .justifyContent(FlexAlign.Center) | ||
| 179 | - .align(Alignment.Center) | ||
| 180 | - .width(this.moreWidth) | ||
| 181 | - .backgroundColor(0xf9f9f9) | ||
| 182 | - .borderRadius({ topLeft: 5, bottomLeft: 5 }) | ||
| 183 | - .height(116) | 191 | + .margin({left: 1.5 * (this.moreWidth - this.initMoreWidth)}) |
| 184 | } | 192 | } |
| 185 | } | 193 | } |
| 186 | } | 194 | } |
| @@ -393,18 +401,20 @@ export struct ZhSingleRow03 { | @@ -393,18 +401,20 @@ export struct ZhSingleRow03 { | ||
| 393 | .fontWeight(600) | 401 | .fontWeight(600) |
| 394 | } | 402 | } |
| 395 | 403 | ||
| 396 | - Row() { | ||
| 397 | - Text("更多") | ||
| 398 | - .fontSize($r("app.float.font_size_14")) | ||
| 399 | - .fontColor($r("app.color.color_999999")) | ||
| 400 | - .margin({ right: 1 }) | ||
| 401 | - Image($r("app.media.more")) | ||
| 402 | - .width(14) | ||
| 403 | - .height(14) | 404 | + if (this.compDTO?.objectType === '0' || this.compDTO?.objectType === '') { |
| 405 | + Row() { | ||
| 406 | + Text("更多") | ||
| 407 | + .fontSize($r("app.float.font_size_14")) | ||
| 408 | + .fontColor($r("app.color.color_999999")) | ||
| 409 | + .margin({ right: 1 }) | ||
| 410 | + Image($r("app.media.more")) | ||
| 411 | + .width(14) | ||
| 412 | + .height(14) | ||
| 413 | + } | ||
| 414 | + .onClick(() => { | ||
| 415 | + this.jumpToMore(); | ||
| 416 | + }) | ||
| 404 | } | 417 | } |
| 405 | - .onClick(() => { | ||
| 406 | - this.jumpToMore(); | ||
| 407 | - }) | ||
| 408 | } | 418 | } |
| 409 | .justifyContent(FlexAlign.SpaceBetween) | 419 | .justifyContent(FlexAlign.SpaceBetween) |
| 410 | .margin({ top: 8, bottom: 8 }) | 420 | .margin({ top: 8, bottom: 8 }) |
| @@ -14,6 +14,7 @@ import { WDRouterPage, WDRouterRule } from 'wdRouter' | @@ -14,6 +14,7 @@ import { WDRouterPage, WDRouterRule } from 'wdRouter' | ||
| 14 | import { LazyDataSource } from 'wdKit/Index'; | 14 | import { LazyDataSource } from 'wdKit/Index'; |
| 15 | import LoadMoreLayout from '../page/LoadMoreLayout' | 15 | import LoadMoreLayout from '../page/LoadMoreLayout' |
| 16 | import { onlyWifiLoadImg } from '../../utils/lazyloadImg'; | 16 | import { onlyWifiLoadImg } from '../../utils/lazyloadImg'; |
| 17 | +import { TrackConstants, Tracking, TrackingContent, TrackingPageBrowse, TrackParamConvert } from 'wdTracking/Index'; | ||
| 17 | 18 | ||
| 18 | const TAG: string = 'ReserveMorePage'; | 19 | const TAG: string = 'ReserveMorePage'; |
| 19 | 20 | ||
| @@ -47,6 +48,9 @@ struct ReserveMorePage { | @@ -47,6 +48,9 @@ struct ReserveMorePage { | ||
| 47 | @State private liveId: string = '' | 48 | @State private liveId: string = '' |
| 48 | @State isLoadingAttention: boolean = false | 49 | @State isLoadingAttention: boolean = false |
| 49 | @State loadImg: boolean = false; | 50 | @State loadImg: boolean = false; |
| 51 | + private pageId: string = TrackConstants.PageName.Live_Appointment_List | ||
| 52 | + private pageName: string = TrackConstants.PageName.Live_Appointment_List | ||
| 53 | + private pageShowStartTime: number = 0 | ||
| 50 | 54 | ||
| 51 | build() { | 55 | build() { |
| 52 | Column() { | 56 | Column() { |
| @@ -249,8 +253,24 @@ struct ReserveMorePage { | @@ -249,8 +253,24 @@ struct ReserveMorePage { | ||
| 249 | top: index == 0 ? '12vp' : '8vp' | 253 | top: index == 0 ? '12vp' : '8vp' |
| 250 | }) | 254 | }) |
| 251 | .onClick(() => { | 255 | .onClick(() => { |
| 256 | + | ||
| 257 | + // 内容点击埋点 | ||
| 258 | + TrackingContent.common(TrackConstants.EventType.Click, | ||
| 259 | + item.pageId, | ||
| 260 | + item.pageId, | ||
| 261 | + TrackParamConvert.program(item)) | ||
| 262 | + | ||
| 252 | ProcessUtils.processPage(item) | 263 | ProcessUtils.processPage(item) |
| 253 | }) | 264 | }) |
| 265 | + .onVisibleAreaChange([0, 1], (isVisiable: boolean, ratio: number) => { | ||
| 266 | + if (isVisiable) { | ||
| 267 | + // 内容曝光埋点 | ||
| 268 | + TrackingContent.common(TrackConstants.EventType.Show, | ||
| 269 | + item.pageId, | ||
| 270 | + item.pageId, | ||
| 271 | + TrackParamConvert.program(item)) | ||
| 272 | + } | ||
| 273 | + }) | ||
| 254 | } | 274 | } |
| 255 | 275 | ||
| 256 | /*导航栏*/ | 276 | /*导航栏*/ |
| @@ -358,12 +378,18 @@ struct ReserveMorePage { | @@ -358,12 +378,18 @@ struct ReserveMorePage { | ||
| 358 | } | 378 | } |
| 359 | 379 | ||
| 360 | onPageShow(): void { | 380 | onPageShow(): void { |
| 381 | + this.pageShowStartTime = Date.now() | ||
| 361 | if (this.isShow) { | 382 | if (this.isShow) { |
| 362 | this.data.reloadData() | 383 | this.data.reloadData() |
| 363 | this.isShow = false | 384 | this.isShow = false |
| 364 | } | 385 | } |
| 365 | } | 386 | } |
| 366 | 387 | ||
| 388 | + onPageHide(): void { | ||
| 389 | + const duration = Date.now() - this.pageShowStartTime | ||
| 390 | + TrackingPageBrowse.trackCommonPageExposureEnd(this.pageId, this.pageName, duration) | ||
| 391 | + } | ||
| 392 | + | ||
| 367 | private async getData(resolve?: (value: string | PromiseLike<string>) => void) { | 393 | private async getData(resolve?: (value: string | PromiseLike<string>) => void) { |
| 368 | if (this.isLoading) { | 394 | if (this.isLoading) { |
| 369 | if (resolve) { | 395 | if (resolve) { |
| @@ -386,6 +412,8 @@ struct ReserveMorePage { | @@ -386,6 +412,8 @@ struct ReserveMorePage { | ||
| 386 | this.reserveList = [] | 412 | this.reserveList = [] |
| 387 | this.reservedIds = [] | 413 | this.reservedIds = [] |
| 388 | } | 414 | } |
| 415 | + | ||
| 416 | + liveReviewDTO.list.forEach((content) => { content.pageId = this.pageId }) | ||
| 389 | this.data.push(...liveReviewDTO.list) | 417 | this.data.push(...liveReviewDTO.list) |
| 390 | //批量查询关注状态 | 418 | //批量查询关注状态 |
| 391 | this.getAppointmentInfo(liveReviewDTO.list) | 419 | this.getAppointmentInfo(liveReviewDTO.list) |
| @@ -488,6 +516,11 @@ struct ReserveMorePage { | @@ -488,6 +516,11 @@ struct ReserveMorePage { | ||
| 488 | this.isLoadingAttention = true | 516 | this.isLoadingAttention = true |
| 489 | this.liveId = reserveItem.liveId.toString() | 517 | this.liveId = reserveItem.liveId.toString() |
| 490 | try { | 518 | try { |
| 519 | + | ||
| 520 | + // 埋点 | ||
| 521 | + Tracking.event(!reserveItem.subscribe ? "live_subscribe_click":"cancel_live_subscribe_click", | ||
| 522 | + TrackParamConvert.program(item)) | ||
| 523 | + | ||
| 491 | const res = await LiveModel.liveAppointment(reserveItem.relationId, reserveItem.liveId.toString(), | 524 | const res = await LiveModel.liveAppointment(reserveItem.relationId, reserveItem.liveId.toString(), |
| 492 | !reserveItem.subscribe); | 525 | !reserveItem.subscribe); |
| 493 | if (res.code == 0) { | 526 | if (res.code == 0) { |
| @@ -43,8 +43,7 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent { | @@ -43,8 +43,7 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent { | ||
| 43 | 43 | ||
| 44 | resetEdgeAnimation() { | 44 | resetEdgeAnimation() { |
| 45 | if (this.moreWidth > this.initMoreWidth) { | 45 | if (this.moreWidth > this.initMoreWidth) { |
| 46 | - this.moreWidth = this.moreWidth - 1 | ||
| 47 | - this.resetEdgeAnimation(); | 46 | + this.moreWidth = 16 |
| 48 | } | 47 | } |
| 49 | this.resetMoreTips() | 48 | this.resetMoreTips() |
| 50 | } | 49 | } |
| @@ -141,21 +140,31 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent { | @@ -141,21 +140,31 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent { | ||
| 141 | }) | 140 | }) |
| 142 | }) | 141 | }) |
| 143 | } | 142 | } |
| 144 | - if (this.compDTO.operDataList.length > 2) { | ||
| 145 | - Column() { | ||
| 146 | - if (this.moreWidth > this.initMoreWidth + 2) { | ||
| 147 | - Text(this.moreTips) | ||
| 148 | - .fontSize(8) | ||
| 149 | - .fontColor(0x858585) | ||
| 150 | - .width(8) | 143 | + |
| 144 | + if (this.compDTO.operDataList.length >= 2 && (this.compDTO?.objectType === '0' || this.compDTO?.objectType === '')) { | ||
| 145 | + Row() { | ||
| 146 | + Ellipse() | ||
| 147 | + .width(2* (this.moreWidth - this.initMoreWidth - 1)) | ||
| 148 | + .height(this.compDTO.operDataList.length == 2 ? 180 : 146) | ||
| 149 | + .fill(0xf1f3f4) | ||
| 150 | + .position({ left: -(this.moreWidth - this.initMoreWidth - 3) * 0.8 }) | ||
| 151 | + | ||
| 152 | + Column() { | ||
| 153 | + if (this.moreWidth > this.initMoreWidth + 2) { | ||
| 154 | + Text(this.moreTips) | ||
| 155 | + .fontSize(8) | ||
| 156 | + .fontColor(0x858585) | ||
| 157 | + .width(8) | ||
| 158 | + } | ||
| 151 | } | 159 | } |
| 160 | + .justifyContent(FlexAlign.Center) | ||
| 161 | + .align(Alignment.Center) | ||
| 162 | + .height(this.compDTO.operDataList.length == 2 ? 180 : 146) | ||
| 163 | + .width(this.initMoreWidth) | ||
| 164 | + .backgroundColor(0xf1f3f4) | ||
| 165 | + .borderRadius({ topLeft: 5, bottomLeft: 5 }) | ||
| 152 | } | 166 | } |
| 153 | - .justifyContent(FlexAlign.Center) | ||
| 154 | - .align(Alignment.Center) | ||
| 155 | - .width(this.moreWidth) | ||
| 156 | - .backgroundColor(0xf1f3f4) | ||
| 157 | - .borderRadius({ topLeft: 5, bottomLeft: 5 }) | ||
| 158 | - .height(this.compDTO.operDataList.length == 2 ? 180 : 146) | 167 | + .margin({left: 1.5 * (this.moreWidth - this.initMoreWidth)}) |
| 159 | } | 168 | } |
| 160 | } | 169 | } |
| 161 | } | 170 | } |
| @@ -33,7 +33,8 @@ export struct LikeComponent { | @@ -33,7 +33,8 @@ export struct LikeComponent { | ||
| 33 | styleType: number = 1 //1: 白色背景(图文底部栏) 2: 黑色背景(图集底部栏) 3 透明背景 | 33 | styleType: number = 1 //1: 白色背景(图文底部栏) 2: 黑色背景(图集底部栏) 3 透明背景 |
| 34 | @State likeCount: number = 0 //点赞数 | 34 | @State likeCount: number = 0 //点赞数 |
| 35 | pageParam: ParamType = {} | 35 | pageParam: ParamType = {} |
| 36 | - PageName: string = '' | 36 | + @Consume pageName: string |
| 37 | + @Consume pageId: string | ||
| 37 | 38 | ||
| 38 | //上层传值 样例 | 39 | //上层传值 样例 |
| 39 | // this.data['contentId'] = '30035444649' //必须 | 40 | // this.data['contentId'] = '30035444649' //必须 |
| @@ -81,19 +82,6 @@ export struct LikeComponent { | @@ -81,19 +82,6 @@ export struct LikeComponent { | ||
| 81 | 'contentId': `${this.contentDetailData.newsId}`, | 82 | 'contentId': `${this.contentDetailData.newsId}`, |
| 82 | 'contentName': `${this.contentDetailData.newsTitle || ''}`, | 83 | 'contentName': `${this.contentDetailData.newsTitle || ''}`, |
| 83 | } | 84 | } |
| 84 | - if(this.contentDetailData.newsType == 1) { | ||
| 85 | - this.PageName = TrackConstants.PageName.VideoDetail // 点播 | ||
| 86 | - } else if(this.contentDetailData.newsType == 2) { | ||
| 87 | - this.PageName = TrackConstants.PageName.Live_Detail // 直播 | ||
| 88 | - } else if(this.contentDetailData.newsType == 5) { | ||
| 89 | - this.PageName = TrackConstants.PageName.Summary_Detail // 专题详情页 | ||
| 90 | - } else if(this.contentDetailData.newsType == 8) { | ||
| 91 | - this.PageName = TrackConstants.PageName.Article_Detail // 图文详情页 | ||
| 92 | - } else if(this.contentDetailData.newsType == 9) { | ||
| 93 | - this.PageName = TrackConstants.PageName.Atlas_Detail // 图集详情页 | ||
| 94 | - } else if(this.contentDetailData.newsType == 14 || this.contentDetailData.newsType == 15) { | ||
| 95 | - this.PageName = TrackConstants.PageName.DynamicDetail // 动态图文/动态视频 | ||
| 96 | - } | ||
| 97 | } | 85 | } |
| 98 | 86 | ||
| 99 | build() { | 87 | build() { |
| @@ -378,16 +366,16 @@ export struct LikeComponent { | @@ -378,16 +366,16 @@ export struct LikeComponent { | ||
| 378 | if (this.contentDetailData.liveInfo) { | 366 | if (this.contentDetailData.liveInfo) { |
| 379 | this.likeStatus = true | 367 | this.likeStatus = true |
| 380 | this.likeCount++ | 368 | this.likeCount++ |
| 381 | - TrackingContent.like(true,this.PageName,this.PageName,this.pageParam) | 369 | + TrackingContent.like(true,this.pageId,this.pageName,this.pageParam) |
| 382 | } else { | 370 | } else { |
| 383 | this.likeStatus = !this.likeStatus | 371 | this.likeStatus = !this.likeStatus |
| 384 | //点赞和取消点赞成功后更新点赞数 | 372 | //点赞和取消点赞成功后更新点赞数 |
| 385 | if (this.likeStatus) { | 373 | if (this.likeStatus) { |
| 386 | this.likeCount++ | 374 | this.likeCount++ |
| 387 | - TrackingContent.like(true,this.PageName,this.PageName,this.pageParam) | 375 | + TrackingContent.like(true,this.pageId,this.pageName,this.pageParam) |
| 388 | } else { | 376 | } else { |
| 389 | this.likeCount-- | 377 | this.likeCount-- |
| 390 | - TrackingContent.like(false,this.PageName,this.PageName,this.pageParam) | 378 | + TrackingContent.like(false,this.pageId,this.pageName,this.pageParam) |
| 391 | } | 379 | } |
| 392 | } | 380 | } |
| 393 | 381 |
| @@ -53,8 +53,7 @@ export struct LiveHorizontalCardComponent { | @@ -53,8 +53,7 @@ export struct LiveHorizontalCardComponent { | ||
| 53 | 53 | ||
| 54 | resetEdgeAnimation() { | 54 | resetEdgeAnimation() { |
| 55 | if (this.moreWidth > this.initMoreWidth) { | 55 | if (this.moreWidth > this.initMoreWidth) { |
| 56 | - this.moreWidth = this.moreWidth - 1 | ||
| 57 | - this.resetEdgeAnimation(); | 56 | + this.moreWidth = 16 |
| 58 | } | 57 | } |
| 59 | this.resetMoreTips() | 58 | this.resetMoreTips() |
| 60 | } | 59 | } |
| @@ -94,7 +93,7 @@ export struct LiveHorizontalCardComponent { | @@ -94,7 +93,7 @@ export struct LiveHorizontalCardComponent { | ||
| 94 | .fontWeight(600) | 93 | .fontWeight(600) |
| 95 | } | 94 | } |
| 96 | 95 | ||
| 97 | - if (this.compDTO.dataSourceType === 'LIVE_HORIZONTAL_CARD' || this.compDTO.dataSourceType === 'LIVE_MONTHLY_RANKING' || this.compDTO.dataSourceType === 'OBJECT_POS') { | 96 | + if (this.compDTO?.objectType === '0' || this.compDTO?.objectType === '') { |
| 98 | Row() { | 97 | Row() { |
| 99 | Text("更多") | 98 | Text("更多") |
| 100 | .fontSize($r("app.float.font_size_14")) | 99 | .fontSize($r("app.float.font_size_14")) |
| @@ -216,6 +215,84 @@ export struct LiveHorizontalCardComponent { | @@ -216,6 +215,84 @@ export struct LiveHorizontalCardComponent { | ||
| 216 | } | 215 | } |
| 217 | }.padding({left:10}) | 216 | }.padding({left:10}) |
| 218 | 217 | ||
| 218 | + Text(item.newsTitle) | ||
| 219 | + .fontSize($r("app.float.font_size_14")) | ||
| 220 | + .fontColor($r("app.color.color_212228")) | ||
| 221 | + .fontWeight(400) | ||
| 222 | + .maxLines(2) | ||
| 223 | + .textOverflow({ overflow: TextOverflow.Ellipsis })// 超出的部分显示省略号。 | ||
| 224 | + .textAlign(TextAlign.Start) | ||
| 225 | + .margin({ top: 8 }) | ||
| 226 | + .width(this.compDTO.operDataList.length == 2 ? 210 : 150) | ||
| 227 | + .height(42) | ||
| 228 | + .lineHeight(21) | ||
| 229 | + } | ||
| 230 | + .padding({ right: 16 }) | ||
| 231 | + .onClick(() => { | ||
| 232 | + InfomationCardClick.track(this.compDTO, item, this.pageId, this.pageName) | ||
| 233 | + if (item.objectType != '0') { | ||
| 234 | + console.log(item.objectId) | ||
| 235 | + this.gotoLive(item) | ||
| 236 | + } | ||
| 237 | + }) | ||
| 238 | + }) | ||
| 239 | + } | ||
| 240 | + if (this.compDTO.operDataList.length >= 2 && (this.compDTO?.objectType === '0' || this.compDTO?.objectType === '')) { | ||
| 241 | + Row() { | ||
| 242 | + Ellipse() | ||
| 243 | + .width(2* (this.moreWidth - this.initMoreWidth - 1)) | ||
| 244 | + .height(this.compDTO.operDataList.length == 2 ? 180 : 146) | ||
| 245 | + .fill(0xf1f3f4) | ||
| 246 | + .position({ left: -(this.moreWidth - this.initMoreWidth - 3) * 0.8 }) | ||
| 247 | + | ||
| 248 | + Column() { | ||
| 249 | + if (this.moreWidth > this.initMoreWidth + 2) { | ||
| 250 | + Text(this.moreTips) | ||
| 251 | + .fontSize(8) | ||
| 252 | + .fontColor(0x858585) | ||
| 253 | + .width(8) | ||
| 254 | + } | ||
| 255 | + } | ||
| 256 | + .justifyContent(FlexAlign.Center) | ||
| 257 | + .align(Alignment.Center) | ||
| 258 | + .height(this.compDTO.operDataList.length == 2 ? 180 : 146) | ||
| 259 | + .width(this.initMoreWidth) | ||
| 260 | + .backgroundColor(0xf1f3f4) | ||
| 261 | + .borderRadius({ topLeft: 5, bottomLeft: 5 }) | ||
| 262 | + } | ||
| 263 | + .margin({left: 1.5 * (this.moreWidth - this.initMoreWidth)}) | ||
| 264 | + } | ||
| 265 | + } | ||
| 266 | + } | ||
| 267 | + .align(Alignment.Start) | ||
| 268 | + .scrollable(this.compDTO.operDataList.length >= 2 ? ScrollDirection.Horizontal : ScrollDirection.None) | ||
| 269 | + .scrollBar(BarState.Off) | ||
| 270 | + .edgeEffect(EdgeEffect.None) | ||
| 271 | + .onReachEnd(() => { | ||
| 272 | + this.edgeAnimation() | ||
| 273 | + }) | ||
| 274 | + .onScrollStop(() => { | ||
| 275 | + // this.resetEdgeAnimation(); | ||
| 276 | + }) | ||
| 277 | + .onScroll((xOffset: number, yOffset: number) => { | ||
| 278 | + if (xOffset < 0) { | ||
| 279 | + this.reverseEdgeAnimation(); | ||
| 280 | + } | ||
| 281 | + }) | ||
| 282 | + .onTouch((event?: TouchEvent) => { | ||
| 283 | + if(event) { | ||
| 284 | + if (event.type === TouchType.Up) { | ||
| 285 | + this.toMore(); | ||
| 286 | + this.resetEdgeAnimation(); | ||
| 287 | + } | ||
| 288 | + } | ||
| 289 | + }) | ||
| 290 | + .width(CommonConstants.FULL_WIDTH) | ||
| 291 | + .height(this.compDTO.operDataList.length == 2 ? 180 : 136) | ||
| 292 | + } else if (this.compDTO.operDataList.length) { | ||
| 293 | + // 一个 | ||
| 294 | + LiveHorizontalCardForOneComponent({ contentDTO: this.compDTO.operDataList[0] }) | ||
| 295 | + } | ||
| 219 | } | 296 | } |
| 220 | // .width(CommonConstants.FULL_WIDTH) | 297 | // .width(CommonConstants.FULL_WIDTH) |
| 221 | .padding({ | 298 | .padding({ |
| @@ -29,7 +29,6 @@ export struct LiveLikeComponent { | @@ -29,7 +29,6 @@ export struct LiveLikeComponent { | ||
| 29 | @State likeCount: number = 0 //点赞数 | 29 | @State likeCount: number = 0 //点赞数 |
| 30 | @State likeBean: Record<string, string> = {} | 30 | @State likeBean: Record<string, string> = {} |
| 31 | pageParam: ParamType = {} | 31 | pageParam: ParamType = {} |
| 32 | - PageName: string = '' | ||
| 33 | 32 | ||
| 34 | //上层传值 样例 | 33 | //上层传值 样例 |
| 35 | // this.data['contentId'] = '30035444649' //必须 | 34 | // this.data['contentId'] = '30035444649' //必须 |
| @@ -66,9 +65,6 @@ export struct LiveLikeComponent { | @@ -66,9 +65,6 @@ export struct LiveLikeComponent { | ||
| 66 | 'contentId': `${this.contentDetailData.newsId}`, | 65 | 'contentId': `${this.contentDetailData.newsId}`, |
| 67 | 'contentName': `${this.contentDetailData.newsTitle || ''}`, | 66 | 'contentName': `${this.contentDetailData.newsTitle || ''}`, |
| 68 | } | 67 | } |
| 69 | - if (this.contentDetailData.newsType == 2) { | ||
| 70 | - this.PageName = TrackConstants.PageName.Live_Detail // 直播 | ||
| 71 | - } | ||
| 72 | } | 68 | } |
| 73 | 69 | ||
| 74 | build() { | 70 | build() { |
| @@ -64,7 +64,8 @@ export struct LiveOperRowListView { | @@ -64,7 +64,8 @@ export struct LiveOperRowListView { | ||
| 64 | @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0 | 64 | @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0 |
| 65 | @State dialogController: CustomDialogController | null = null; | 65 | @State dialogController: CustomDialogController | null = null; |
| 66 | pageParam: ParamType = {} | 66 | pageParam: ParamType = {} |
| 67 | - PageName: string = '' | 67 | + @Consume pageName: string |
| 68 | + @Consume pageId: string | ||
| 68 | @State likesStyle: number | string = "love" // 点赞样式 love爱心型 thumb点赞手势 mourning 蜡烛(默哀) pray 祈福 | 69 | @State likesStyle: number | string = "love" // 点赞样式 love爱心型 thumb点赞手势 mourning 蜡烛(默哀) pray 祈福 |
| 69 | @State openLikes: boolean = false // 是否可以点赞 1:可以 0:不可以 | 70 | @State openLikes: boolean = false // 是否可以点赞 1:可以 0:不可以 |
| 70 | 71 | ||
| @@ -88,9 +89,6 @@ export struct LiveOperRowListView { | @@ -88,9 +89,6 @@ export struct LiveOperRowListView { | ||
| 88 | 'contentId': `${this.contentDetailData.newsId}`, | 89 | 'contentId': `${this.contentDetailData.newsId}`, |
| 89 | 'contentName': `${this.contentDetailData.newsTitle || ''}`, | 90 | 'contentName': `${this.contentDetailData.newsTitle || ''}`, |
| 90 | } | 91 | } |
| 91 | - if(this.contentDetailData.newsType == 2) { | ||
| 92 | - this.PageName = TrackConstants.PageName.Live_Detail // 直播 | ||
| 93 | - } | ||
| 94 | } | 92 | } |
| 95 | 93 | ||
| 96 | async onDetailUpdated() { | 94 | async onDetailUpdated() { |
| @@ -425,9 +423,9 @@ export struct LiveOperRowListView { | @@ -425,9 +423,9 @@ export struct LiveOperRowListView { | ||
| 425 | this.newsStatusOfUser.collectStatus = this.newsStatusOfUser?.collectStatus === 1 ? 0 : 1 | 423 | this.newsStatusOfUser.collectStatus = this.newsStatusOfUser?.collectStatus === 1 ? 0 : 1 |
| 426 | if (this.newsStatusOfUser.collectStatus === 1) { | 424 | if (this.newsStatusOfUser.collectStatus === 1) { |
| 427 | promptAction.showToast({ message: '收藏成功' }) | 425 | promptAction.showToast({ message: '收藏成功' }) |
| 428 | - TrackingContent.collect(true,this.PageName,this.PageName,this.pageParam) | 426 | + TrackingContent.collect(true,this.pageId,this.pageName,this.pageParam) |
| 429 | } else { | 427 | } else { |
| 430 | - TrackingContent.collect(false,this.PageName,this.PageName,this.pageParam) | 428 | + TrackingContent.collect(false,this.pageId,this.pageName,this.pageParam) |
| 431 | } | 429 | } |
| 432 | this.queryContentInteractCount() | 430 | this.queryContentInteractCount() |
| 433 | } | 431 | } |
| @@ -89,7 +89,8 @@ export struct OperRowListView { | @@ -89,7 +89,8 @@ export struct OperRowListView { | ||
| 89 | @State name: string = 'audio_recommend_status_wait' | 89 | @State name: string = 'audio_recommend_status_wait' |
| 90 | @State dialogController: CustomDialogController | null = null; | 90 | @State dialogController: CustomDialogController | null = null; |
| 91 | pageParam: ParamType = {} | 91 | pageParam: ParamType = {} |
| 92 | - PageName: string = '' | 92 | + @Consume pageName: string |
| 93 | + @Consume pageId: string | ||
| 93 | @State likesStyle: number | string = 1 // 赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空 | 94 | @State likesStyle: number | string = 1 // 赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空 |
| 94 | @State openLikes: boolean = false // 是否可以点赞 1:可以 0:不可以 | 95 | @State openLikes: boolean = false // 是否可以点赞 1:可以 0:不可以 |
| 95 | 96 | ||
| @@ -119,19 +120,6 @@ export struct OperRowListView { | @@ -119,19 +120,6 @@ export struct OperRowListView { | ||
| 119 | 'contentId': `${this.contentDetailData.newsId}`, | 120 | 'contentId': `${this.contentDetailData.newsId}`, |
| 120 | 'contentName': `${this.contentDetailData.newsTitle || ''}`, | 121 | 'contentName': `${this.contentDetailData.newsTitle || ''}`, |
| 121 | } | 122 | } |
| 122 | - if(this.contentDetailData.newsType == 1) { | ||
| 123 | - this.PageName = TrackConstants.PageName.VideoDetail // 点播 | ||
| 124 | - } else if(this.contentDetailData.newsType == 2) { | ||
| 125 | - this.PageName = TrackConstants.PageName.Live_Detail // 直播 | ||
| 126 | - } else if(this.contentDetailData.newsType == 5) { | ||
| 127 | - this.PageName = TrackConstants.PageName.Summary_Detail // 专题详情页 | ||
| 128 | - } else if(this.contentDetailData.newsType == 8) { | ||
| 129 | - this.PageName = TrackConstants.PageName.Article_Detail // 图文详情页 | ||
| 130 | - } else if(this.contentDetailData.newsType == 9) { | ||
| 131 | - this.PageName = TrackConstants.PageName.Atlas_Detail // 图集详情页 | ||
| 132 | - } else if(this.contentDetailData.newsType == 14 || this.contentDetailData.newsType == 15) { | ||
| 133 | - this.PageName = TrackConstants.PageName.DynamicDetail // 动态图文/动态视频 | ||
| 134 | - } | ||
| 135 | } | 123 | } |
| 136 | 124 | ||
| 137 | async onDetailUpdated() { | 125 | async onDetailUpdated() { |
| @@ -376,7 +364,7 @@ export struct OperRowListView { | @@ -376,7 +364,7 @@ export struct OperRowListView { | ||
| 376 | TapGesture() | 364 | TapGesture() |
| 377 | .onAction((event: GestureEvent) => { | 365 | .onAction((event: GestureEvent) => { |
| 378 | this.AudioSuspension.setPlayerUrl(this.audioUrl, this.audioTitle) | 366 | this.AudioSuspension.setPlayerUrl(this.audioUrl, this.audioTitle) |
| 379 | - TrackingButton.click('suspendedWindow',this.PageName,this.PageName) | 367 | + TrackingButton.click('suspendedWindow',this.pageId,this.pageName) |
| 380 | })) | 368 | })) |
| 381 | } | 369 | } |
| 382 | .height(36) | 370 | .height(36) |
| @@ -473,9 +461,9 @@ export struct OperRowListView { | @@ -473,9 +461,9 @@ export struct OperRowListView { | ||
| 473 | this.newsStatusOfUser.collectStatus = this.newsStatusOfUser?.collectStatus === 1 ? 0 : 1 | 461 | this.newsStatusOfUser.collectStatus = this.newsStatusOfUser?.collectStatus === 1 ? 0 : 1 |
| 474 | if (this.newsStatusOfUser.collectStatus === 1) { | 462 | if (this.newsStatusOfUser.collectStatus === 1) { |
| 475 | promptAction.showToast({ message: '收藏成功' }) | 463 | promptAction.showToast({ message: '收藏成功' }) |
| 476 | - TrackingContent.collect(true,this.PageName,this.PageName,this.pageParam) | 464 | + TrackingContent.collect(true,this.pageId,this.pageName,this.pageParam) |
| 477 | } else { | 465 | } else { |
| 478 | - TrackingContent.collect(false,this.PageName,this.PageName,this.pageParam) | 466 | + TrackingContent.collect(false,this.pageId,this.pageName,this.pageParam) |
| 479 | } | 467 | } |
| 480 | this.queryContentInteractCount() | 468 | this.queryContentInteractCount() |
| 481 | } | 469 | } |
| @@ -157,6 +157,10 @@ | @@ -157,6 +157,10 @@ | ||
| 157 | "value": "#0D000000" | 157 | "value": "#0D000000" |
| 158 | }, | 158 | }, |
| 159 | { | 159 | { |
| 160 | + "name": "color_B3000000", | ||
| 161 | + "value": "#B3000000" | ||
| 162 | + }, | ||
| 163 | + { | ||
| 160 | "name": "res_color_general_000000_30", | 164 | "name": "res_color_general_000000_30", |
| 161 | "value": "#4D000000" | 165 | "value": "#4D000000" |
| 162 | } | 166 | } |
| @@ -41,7 +41,8 @@ export struct PlayerRightView { | @@ -41,7 +41,8 @@ export struct PlayerRightView { | ||
| 41 | @State likesStyle: number | string = 1 // 赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空 | 41 | @State likesStyle: number | string = 1 // 赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空 |
| 42 | @State openLikes: boolean = false // 是否可以点赞 1:可以 0:不可以 | 42 | @State openLikes: boolean = false // 是否可以点赞 1:可以 0:不可以 |
| 43 | pageParam: ParamType = {} | 43 | pageParam: ParamType = {} |
| 44 | - PageName: string = '' | 44 | + @Consume pageName: string |
| 45 | + @Consume pageId: string | ||
| 45 | followUserId: string = '' | 46 | followUserId: string = '' |
| 46 | followUserName: string = '' | 47 | followUserName: string = '' |
| 47 | 48 | ||
| @@ -59,19 +60,6 @@ export struct PlayerRightView { | @@ -59,19 +60,6 @@ export struct PlayerRightView { | ||
| 59 | 'contentId': `${this.contentDetailData.newsId}`, | 60 | 'contentId': `${this.contentDetailData.newsId}`, |
| 60 | 'contentName': `${this.contentDetailData.newsTitle || ''}`, | 61 | 'contentName': `${this.contentDetailData.newsTitle || ''}`, |
| 61 | } | 62 | } |
| 62 | - if(this.contentDetailData.newsType == 1) { | ||
| 63 | - this.PageName = TrackConstants.PageName.VideoDetail // 点播 | ||
| 64 | - } else if(this.contentDetailData.newsType == 2) { | ||
| 65 | - this.PageName = TrackConstants.PageName.Live_Detail // 直播 | ||
| 66 | - } else if(this.contentDetailData.newsType == 5) { | ||
| 67 | - this.PageName = TrackConstants.PageName.Summary_Detail // 专题详情页 | ||
| 68 | - } else if(this.contentDetailData.newsType == 8) { | ||
| 69 | - this.PageName = TrackConstants.PageName.Article_Detail // 图文详情页 | ||
| 70 | - } else if(this.contentDetailData.newsType == 9) { | ||
| 71 | - this.PageName = TrackConstants.PageName.Atlas_Detail // 图集详情页 | ||
| 72 | - } else if(this.contentDetailData.newsType == 14 || this.contentDetailData.newsType == 15) { | ||
| 73 | - this.PageName = TrackConstants.PageName.DynamicDetail // 动态图文/动态视频 | ||
| 74 | - } | ||
| 75 | this.followUserId = this.contentDetailData?.rmhInfo?.rmhId || '' | 63 | this.followUserId = this.contentDetailData?.rmhInfo?.rmhId || '' |
| 76 | this.followUserName = this.contentDetailData?.rmhInfo?.rmhName || '' | 64 | this.followUserName = this.contentDetailData?.rmhInfo?.rmhName || '' |
| 77 | } | 65 | } |
| @@ -104,11 +92,11 @@ export struct PlayerRightView { | @@ -104,11 +92,11 @@ export struct PlayerRightView { | ||
| 104 | this.newsStatusOfUser.likeStatus = this.newsStatusOfUser?.likeStatus == '1' ? '0' : '1' | 92 | this.newsStatusOfUser.likeStatus = this.newsStatusOfUser?.likeStatus == '1' ? '0' : '1' |
| 105 | if (this.newsStatusOfUser.likeStatus == '1') { | 93 | if (this.newsStatusOfUser.likeStatus == '1') { |
| 106 | this.interactData.likeNum = Number(this.interactData.likeNum || 0) + 1 | 94 | this.interactData.likeNum = Number(this.interactData.likeNum || 0) + 1 |
| 107 | - TrackingContent.like(true,this.PageName,this.PageName,this.pageParam) | 95 | + TrackingContent.like(true,this.pageId,this.pageName,this.pageParam) |
| 108 | console.log(TAG, '点赞') | 96 | console.log(TAG, '点赞') |
| 109 | } else { | 97 | } else { |
| 110 | this.interactData.likeNum = Math.max(0, Number(this.interactData.likeNum || 0) - 1) | 98 | this.interactData.likeNum = Math.max(0, Number(this.interactData.likeNum || 0) - 1) |
| 111 | - TrackingContent.like(false,this.PageName,this.PageName,this.pageParam) | 99 | + TrackingContent.like(false,this.pageId,this.pageName,this.pageParam) |
| 112 | console.log(TAG, '取消点赞') | 100 | console.log(TAG, '取消点赞') |
| 113 | } | 101 | } |
| 114 | console.log(TAG, '点赞、取消点赞==', this.newsStatusOfUser?.likeStatus, this.interactData?.likeNum) | 102 | console.log(TAG, '点赞、取消点赞==', this.newsStatusOfUser?.likeStatus, this.interactData?.likeNum) |
| @@ -144,11 +132,11 @@ export struct PlayerRightView { | @@ -144,11 +132,11 @@ export struct PlayerRightView { | ||
| 144 | // this.queryContentInteractCount() | 132 | // this.queryContentInteractCount() |
| 145 | if (this.newsStatusOfUser.collectStatus === 1) { | 133 | if (this.newsStatusOfUser.collectStatus === 1) { |
| 146 | this.interactData.collectNum = Number(this.interactData.collectNum || 0) + 1 | 134 | this.interactData.collectNum = Number(this.interactData.collectNum || 0) + 1 |
| 147 | - TrackingContent.collect(true,this.PageName,this.PageName,this.pageParam) | 135 | + TrackingContent.collect(true,this.pageId,this.pageName,this.pageParam) |
| 148 | console.log(TAG, '收藏') | 136 | console.log(TAG, '收藏') |
| 149 | } else { | 137 | } else { |
| 150 | this.interactData.collectNum = Math.max(0, Number(this.interactData.collectNum || 0) - 1) | 138 | this.interactData.collectNum = Math.max(0, Number(this.interactData.collectNum || 0) - 1) |
| 151 | - TrackingContent.collect(false,this.PageName,this.PageName,this.pageParam) | 139 | + TrackingContent.collect(false,this.pageId,this.pageName,this.pageParam) |
| 152 | console.log(TAG, '取消收藏') | 140 | console.log(TAG, '取消收藏') |
| 153 | } | 141 | } |
| 154 | console.log(TAG, '收藏、取消收藏==', this.newsStatusOfUser?.collectStatus, this.interactData?.collectNum) | 142 | console.log(TAG, '收藏、取消收藏==', this.newsStatusOfUser?.collectStatus, this.interactData?.collectNum) |
| @@ -212,7 +200,7 @@ export struct PlayerRightView { | @@ -212,7 +200,7 @@ export struct PlayerRightView { | ||
| 212 | } | 200 | } |
| 213 | }) | 201 | }) |
| 214 | console.log(TAG, '关注号主') | 202 | console.log(TAG, '关注号主') |
| 215 | - TrackingContent.follow(true,this.followUserId,this.followUserName,TrackConstants.PageName.Atlas_Detail,TrackConstants.PageName.Atlas_Detail,this.pageParam) | 203 | + TrackingContent.follow(true,this.followUserId,this.followUserName,this.pageId,this.pageName,this.pageParam) |
| 216 | } | 204 | } |
| 217 | }) | 205 | }) |
| 218 | } | 206 | } |
| @@ -135,6 +135,9 @@ export namespace TrackConstants { | @@ -135,6 +135,9 @@ export namespace TrackConstants { | ||
| 135 | /// 我的预约 | 135 | /// 我的预约 |
| 136 | My_Saved_Live = "mySavedLivePage", | 136 | My_Saved_Live = "mySavedLivePage", |
| 137 | 137 | ||
| 138 | + /// 直播预约更多列表 | ||
| 139 | + Live_Appointment_List = "liveSubscribeListPage", | ||
| 140 | + | ||
| 138 | /// 兴趣选择 | 141 | /// 兴趣选择 |
| 139 | Preference_Selection = "preferenceSelectionPage", | 142 | Preference_Selection = "preferenceSelectionPage", |
| 140 | /// 升级页面 | 143 | /// 升级页面 |
| 1 | import { CompInfoBean, ContentDetailDTO, ContentDTO, PageInfoBean, PageInfoDTO } from 'wdBean/Index'; | 1 | import { CompInfoBean, ContentDetailDTO, ContentDTO, PageInfoBean, PageInfoDTO } from 'wdBean/Index'; |
| 2 | +import { StringUtils } from 'wdKit/Index'; | ||
| 2 | import { ParamType } from './PublicParams'; | 3 | import { ParamType } from './PublicParams'; |
| 3 | import { TrackConstants } from './TrackConstants'; | 4 | import { TrackConstants } from './TrackConstants'; |
| 4 | import { TrackingUtils } from './TrackingUtils'; | 5 | import { TrackingUtils } from './TrackingUtils'; |
| @@ -22,17 +23,40 @@ export class TrackParamConvert { | @@ -22,17 +23,40 @@ export class TrackParamConvert { | ||
| 22 | 23 | ||
| 23 | static pageCompProgram(pageInfo?: PageInfoDTO, comp?: CompInfoBean, program?: ContentDTO) : ParamType { | 24 | static pageCompProgram(pageInfo?: PageInfoDTO, comp?: CompInfoBean, program?: ContentDTO) : ParamType { |
| 24 | let params = TrackingUtils.generateParams() | 25 | let params = TrackingUtils.generateParams() |
| 26 | + | ||
| 27 | + //TODO: 转换参数 | ||
| 28 | + if (pageInfo) { | ||
| 29 | + params["pageName"] = pageInfo.name | ||
| 30 | + params["pageId"] = pageInfo.id + '' | ||
| 31 | + TrackParamConvert.appendRecommendPageInfo(pageInfo, params) | ||
| 32 | + } | ||
| 33 | + | ||
| 25 | if (program) { | 34 | if (program) { |
| 35 | + | ||
| 26 | params["contentType"] = program.objectType | 36 | params["contentType"] = program.objectType |
| 27 | params["contentId"] = program.objectId | 37 | params["contentId"] = program.objectId |
| 28 | params["contentName"] = program.newsTitle | 38 | params["contentName"] = program.newsTitle |
| 29 | params["channelSourceId"] = program.channelId | 39 | params["channelSourceId"] = program.channelId |
| 30 | params["rmhPlatform"] = program.rmhPlatform | 40 | params["rmhPlatform"] = program.rmhPlatform |
| 31 | 41 | ||
| 32 | - TrackParamConvert.appendRecommend(program, params) | ||
| 33 | - } | ||
| 34 | - //TODO: 转换参数 | 42 | + if (program.liveInfo) { |
| 43 | + params["liveType"] = program.liveInfo.liveState | ||
| 44 | + params["liveStreamType"] = ((program.liveInfo.vrType + '') == "1") ? "2" : "1" | ||
| 45 | + params["vliveId"] = program.objectId | ||
| 46 | + params["vliveName"] = program.newsTitle | ||
| 47 | + } | ||
| 48 | + | ||
| 49 | + if (!StringUtils.isEmpty(program.linkUrl)) { | ||
| 50 | + params["linkUrl"] = program.linkUrl | ||
| 51 | + } | ||
| 52 | + | ||
| 53 | + if (program.rmhInfo && program.rmhInfo.rmhId) { | ||
| 54 | + params["saAuthorId"] = program.rmhInfo.rmhId || "" | ||
| 55 | + params["saAuthorName"] = program.rmhInfo.rmhName || "" | ||
| 56 | + } | ||
| 35 | 57 | ||
| 58 | + TrackParamConvert.appendRecommendProgram(program, params) | ||
| 59 | + } | ||
| 36 | return params | 60 | return params |
| 37 | } | 61 | } |
| 38 | 62 | ||
| @@ -79,10 +103,68 @@ export class TrackParamConvert { | @@ -79,10 +103,68 @@ export class TrackParamConvert { | ||
| 79 | return param | 103 | return param |
| 80 | } | 104 | } |
| 81 | 105 | ||
| 82 | - private static appendRecommend(detail: object, to: ParamType) { | ||
| 83 | - | 106 | + private static appendRecommend(detail: ContentDetailDTO, to: ParamType) { |
| 84 | //TODO: ContentDetailDTO 增加推荐字段 | 107 | //TODO: ContentDetailDTO 增加推荐字段 |
| 85 | 108 | ||
| 109 | + to["sceneId"] = !StringUtils.isEmpty(detail.sceneId) ? detail.sceneId : "9999" | ||
| 110 | + to["subSceneId"] = !StringUtils.isEmpty(detail.subSceneId) ? detail.subSceneId : "" | ||
| 111 | + //to["cnsTraceId"] = !StringUtils.isEmpty(detail.cnsTraceId) ? detail.cnsTraceId : "selfHold" | ||
| 112 | + to["cnsTraceId"] = "selfHold" | ||
| 113 | + to["itemId"] = !StringUtils.isEmpty(detail.itemId) ? detail.itemId : "" | ||
| 114 | + // to["expIds"] = !StringUtils.isEmpty(detail.expIds) ? detail.expIds : "" | ||
| 115 | + to["expIds"] = "" | ||
| 116 | + | ||
| 117 | + /// 这里填写默认值,后续在分享处 再重写 | ||
| 118 | + to["shareChannel"] = "" | ||
| 119 | + /// 这里填写默认值,后续在action=browse时,再重写 | ||
| 120 | + to["duration"] = 0 | ||
| 121 | + } | ||
| 122 | + | ||
| 123 | + private static appendRecommendProgram(program: ContentDTO, to: ParamType) { | ||
| 124 | + | ||
| 125 | + to["sceneId"] = !StringUtils.isEmpty(program.itemId) ? program.itemId : "9999" | ||
| 126 | + to["subSceneId"] = !StringUtils.isEmpty(program.itemId) ? program.itemId : "" | ||
| 127 | + to["cnsTraceId"] = !StringUtils.isEmpty(program.itemId) ? program.itemId : "selfHold" | ||
| 128 | + to["itemId"] = !StringUtils.isEmpty(program.itemId) ? program.itemId : "" | ||
| 129 | + to["expIds"] = !StringUtils.isEmpty(program.itemId) ? program.itemId : "" | ||
| 130 | + | ||
| 131 | + /// 这里填写默认值,后续在分享处 再重写 | ||
| 132 | + to["shareChannel"] = "" | ||
| 133 | + /// 这里填写默认值,后续在action=browse时,再重写 | ||
| 134 | + to["duration"] = 0 | ||
| 135 | + } | ||
| 136 | + | ||
| 137 | + private static appendRecommendCompInfo(program: CompInfoBean, to: ParamType) { | ||
| 138 | + | ||
| 139 | + // TODO: | ||
| 140 | + // to["sceneId"] = !StringUtils.isEmpty(program.itemId) ? program.itemId : "9999" | ||
| 141 | + // to["subSceneId"] = !StringUtils.isEmpty(program.itemId) ? program.itemId : "" | ||
| 142 | + // to["cnsTraceId"] = !StringUtils.isEmpty(program.itemId) ? program.itemId : "selfHold" | ||
| 143 | + // to["itemId"] = !StringUtils.isEmpty(program.itemId) ? program.itemId : "" | ||
| 144 | + // to["expIds"] = !StringUtils.isEmpty(program.itemId) ? program.itemId : "" | ||
| 145 | + | ||
| 146 | + /// 这里填写默认值,后续在分享处 再重写 | ||
| 147 | + to["shareChannel"] = "" | ||
| 148 | + /// 这里填写默认值,后续在action=browse时,再重写 | ||
| 149 | + to["duration"] = 0 | ||
| 150 | + } | ||
| 151 | + | ||
| 152 | + private static appendRecommendPageInfo(program: PageInfoDTO, to: ParamType) { | ||
| 153 | + | ||
| 154 | + // TODO: | ||
| 155 | + // to["sceneId"] = !StringUtils.isEmpty(program.itemId) ? program.itemId : "9999" | ||
| 156 | + // to["subSceneId"] = !StringUtils.isEmpty(program.itemId) ? program.itemId : "" | ||
| 157 | + // to["cnsTraceId"] = !StringUtils.isEmpty(program.itemId) ? program.itemId : "selfHold" | ||
| 158 | + // to["itemId"] = !StringUtils.isEmpty(program.itemId) ? program.itemId : "" | ||
| 159 | + // to["expIds"] = !StringUtils.isEmpty(program.itemId) ? program.itemId : "" | ||
| 160 | + | ||
| 161 | + /// 这里填写默认值,后续在分享处 再重写 | ||
| 162 | + to["shareChannel"] = "" | ||
| 163 | + /// 这里填写默认值,后续在action=browse时,再重写 | ||
| 164 | + to["duration"] = 0 | ||
| 165 | + } | ||
| 166 | + | ||
| 167 | + private static appendRecommendPageInfoBean(program: PageInfoBean, to: ParamType) { | ||
| 86 | to["sceneId"] = "9999" | 168 | to["sceneId"] = "9999" |
| 87 | to["subSceneId"] = "" | 169 | to["subSceneId"] = "" |
| 88 | to["cnsTraceId"] = "selfHold" | 170 | to["cnsTraceId"] = "selfHold" |
| @@ -95,6 +177,13 @@ export class TrackParamConvert { | @@ -95,6 +177,13 @@ export class TrackParamConvert { | ||
| 95 | to["duration"] = 0 | 177 | to["duration"] = 0 |
| 96 | } | 178 | } |
| 97 | 179 | ||
| 180 | + // 'sceneId': contentDTO.sceneId, | ||
| 181 | + // 'subSceneId': contentDTO.subSceneId, | ||
| 182 | + // 'cnsTraceId': contentDTO.cnsTraceId, | ||
| 183 | + // 'cardItemId': compDTO.cardItemId, | ||
| 184 | + // 'itemId': compDTO.itemId || contentDTO.itemId, | ||
| 185 | + // 'expIds': compDTO.expIds || contentDTO.expIds | ||
| 186 | + | ||
| 98 | 187 | ||
| 99 | ///早晚报 专题 | 188 | ///早晚报 专题 |
| 100 | static pageInfoBean_ParamType(pageInfo: PageInfoBean) : ParamType { | 189 | static pageInfoBean_ParamType(pageInfo: PageInfoBean) : ParamType { |
| @@ -128,7 +217,8 @@ export class TrackParamConvert { | @@ -128,7 +217,8 @@ export class TrackParamConvert { | ||
| 128 | "channelSourceId": pageInfo.name, | 217 | "channelSourceId": pageInfo.name, |
| 129 | "pageId": 'summaryDetailPage', | 218 | "pageId": 'summaryDetailPage', |
| 130 | } | 219 | } |
| 131 | - TrackParamConvert.appendRecommend(pageInfo, param) | 220 | + |
| 221 | + TrackParamConvert.appendRecommendPageInfoBean(pageInfo, param) | ||
| 132 | 222 | ||
| 133 | return param | 223 | return param |
| 134 | } | 224 | } |
| @@ -179,7 +179,9 @@ export struct VideoChannelPage { | @@ -179,7 +179,9 @@ export struct VideoChannelPage { | ||
| 179 | pageId: item.pageId + '', | 179 | pageId: item.pageId + '', |
| 180 | channelId: item.channelId + '', | 180 | channelId: item.channelId + '', |
| 181 | autoRefresh: this.autoRefresh | 181 | autoRefresh: this.autoRefresh |
| 182 | - }).margin({ top: 40 }) | 182 | + }) |
| 183 | + .margin({ top: 40 }) | ||
| 184 | + .backgroundColor(Color.White) | ||
| 183 | } | 185 | } |
| 184 | }, (item: TopNavDTO) => item.channelId + '') | 186 | }, (item: TopNavDTO) => item.channelId + '') |
| 185 | } | 187 | } |
-
Please register or login to post a comment