Toggle navigation
Toggle navigation
This project
Loading...
Sign in
developOne
/
harmonyPool
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
陈剑华
2024-05-24 17:53:32 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
d21529c133b44b64ad3eee7e0e91957f74b0800c
d21529c1
2 parents
bf65da48
c8b2cb5f
Merge remote-tracking branch 'origin/main'
Show whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
466 additions
and
105 deletions
sight_harmony/commons/wdRouter/src/main/ets/router/WDRouterPage.ets
sight_harmony/features/wdComponent/src/main/ets/components/DynamicDetailComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/ENewspaperItemComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/ENewspaperPageComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/FeedBackActivity.ets
sight_harmony/features/wdComponent/src/main/ets/components/MorningEveningPaper/MorningEveningPaperComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/MorningEveningPaper/topicInfoView.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card2Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card6Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/comment/view/CommentComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/comment/view/CommentTabComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/comment/view/QualityCommentsComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhCarouselLayout01.ets
sight_harmony/features/wdComponent/src/main/ets/components/setting/AccountAndSecurityLayout.ets
sight_harmony/features/wdComponent/src/main/ets/utils/ColorUtils.ets
sight_harmony/features/wdLogin/src/main/ets/pages/login/LoginInputComponent.ets
sight_harmony/features/wdLogin/src/main/ets/pages/login/LoginPage.ets
sight_harmony/features/wdLogin/src/main/ets/pages/login/LoginProtocolWebview.ets
sight_harmony/features/wdLogin/src/main/ets/pages/login/VerifyPhoneNumberPage.ets
sight_harmony/features/wdLogin/src/main/resources/base/profile/main_pages.json
sight_harmony/features/wdTracking/src/main/ets/common/TrackConstants.ets
sight_harmony/features/wdTracking/src/main/ets/common/TrackParamConvert.ets
sight_harmony/features/wdTracking/src/main/ets/tracking/TrackingContent.ets
sight_harmony/products/phone/src/main/ets/pages/ENewspaper.ets
sight_harmony/products/phone/src/main/ets/pages/detail/DynamicDetailPage.ets
sight_harmony/products/phone/src/main/ets/pages/launchPage/LaunchInterestsHobbiesPage.ets
sight_harmony/commons/wdRouter/src/main/ets/router/WDRouterPage.ets
View file @
d21529c
...
...
@@ -68,6 +68,7 @@ export class WDRouterPage {
static loginPage = new WDRouterPage("wdLogin", "ets/pages/login/LoginPage");
static oneKeyLoginPage = new WDRouterPage("wdLogin", "ets/pages/login/OneKeyLoginPage");
static forgetPasswordPage = new WDRouterPage("wdLogin", "ets/pages/login/ForgetPasswordPage");
static verifyPhoneNumberPage = new WDRouterPage("wdLogin", "ets/pages/login/VerifyPhoneNumberPage");
static changeBindPhonePage = new WDRouterPage("wdLogin", "ets/pages/login/ChangeBindPhonePage");
static modifyPasswordPage = new WDRouterPage("wdLogin", "ets/pages/login/ModifyPasswordPage");
//我的 预约
...
...
sight_harmony/features/wdComponent/src/main/ets/components/DynamicDetailComponent.ets
View file @
d21529c
...
...
@@ -49,6 +49,7 @@ const PATTERN_DATE_CN_RN: string = 'yyyy年MM月dd日 HH:mm';
/**
* 动态详情页UI
* @author wd-zsz
* */
// @Preview
...
...
@@ -533,6 +534,8 @@ export struct DynamicDetailComponent {
}
//点赞操作
this.toggleLikeStatus()
//内容点赞/取消点赞埋点
})
// 评论
...
...
sight_harmony/features/wdComponent/src/main/ets/components/ENewspaperItemComponent.ets
View file @
d21529c
import { ContentDTO, NewspaperListItemBean, NewspaperPositionItemBean, Params } from 'wdBean';
import { StringUtils } from 'wdKit';
import { ProcessUtils } from 'wdRouter';
import { TrackingContent,TrackConstants } from 'wdTracking/Index';
import { newsSkeleton } from './skeleton/newsSkeleton';
@Component
...
...
@@ -13,6 +14,20 @@ export struct ENewspaperItemComponent {
private itemBeanClicked: NewspaperPositionItemBean = {} as NewspaperPositionItemBean
@State isShowSkeleton: boolean = true
aboutToAppear(): void {
for (let index = 0; index < this.newspaperListItemBean.items.length; index++) {
const element = this.newspaperListItemBean.items[index];
TrackingContent.common(TrackConstants.EventType.Show,TrackConstants.PageName.NewsPaperPage,TrackConstants.PageName.NewsPaperPage
,{
'contentName':element.title,
'contentType':element.newsType,
'contentId':element.newsId,
'panelNumber':this.newspaperListItemBean.pageNum,
'panelName':this.newspaperListItemBean.pageName,
'readMode':'1',
})
}
}
build() {
Stack() {
newsSkeleton()
...
...
@@ -70,6 +85,16 @@ export struct ENewspaperItemComponent {
relType:this.itemBeanClicked.relType ?? '0'
} as ContentDTO
ProcessUtils.processPage(content)
//内容点击
TrackingContent.commentClickWithEvent('current_Number_Panel_content_click',TrackConstants.PageName.NewsPaperPage,TrackConstants.PageName.NewsPaperPage
,{
'contentName':this.itemBeanClicked.title,
'contentType':this.itemBeanClicked.newsType,
'contentId':this.itemBeanClicked.newsId,
'panelNumber':this.newspaperListItemBean.pageNum,
'panelName':this.newspaperListItemBean.pageName,
'readMode':'1',
})
this.itemBeanClicked = {} as NewspaperPositionItemBean
}
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/ENewspaperPageComponent.ets
View file @
d21529c
...
...
@@ -10,7 +10,7 @@ import { ENewspaperPageDialog } from '../dialog/ENewspaperPageDialog';
import { RMCalendarBean } from './calendar/RMCalendarBean';
import { newsSkeleton } from './skeleton/newsSkeleton';
import { Logger, ToastUtils, NetworkUtil } from 'wdKit/Index';
import {
promptAction } from '@kit.ArkUI
';
import {
TrackingContent,TrackConstants, TrackingButton } from 'wdTracking/Index
';
@Component
export struct ENewspaperPageComponent {
...
...
@@ -34,6 +34,15 @@ export struct ENewspaperPageComponent {
let _swiperIndex = Number.parseInt(this.currentPageNum)
console.log("ENewspaperPageComponent-onCurrentPageNumUpdated", "_swiperIndex:", _swiperIndex)
this.swiperIndex = _swiperIndex > 0 ? _swiperIndex - 1 : _swiperIndex
//电子报--版面序号选择点击
TrackingContent.commentClickWithEvent('panel_number_selection_click',TrackConstants.PageName.NewsPaperPage,TrackConstants.PageName.NewsPaperPage
,{
'panelNumber':this.newspaperListBean?.list[this.swiperIndex].pageNum,
'panelName':this.newspaperListBean?.list[this.swiperIndex].pageName,
'currentPanelDate':this.selectDate.toDateString(),
'currentNumber':this.swiperIndex,
})
}
//日历选择弹框
...
...
@@ -51,6 +60,14 @@ export struct ENewspaperPageComponent {
this.selectDate =
new Date(date.fullYear ? date.fullYear : 0, date.month ? date.month : 0, date.date ? date.date : 0)
}
//日历选择点击
TrackingContent.commentClickWithEvent('date_selection_click',TrackConstants.PageName.NewsPaperPage,TrackConstants.PageName.NewsPaperPage
,{
'panelNumber':this.newspaperListBean?.list[this.swiperIndex].pageNum,
'panelName':this.newspaperListBean?.list[this.swiperIndex].pageName,
'currentPanelDate':this.selectDate.toDateString(),
'currentNumber':this.swiperIndex,
})
}
}),
alignment: DialogAlignment.Top,
...
...
@@ -190,7 +207,7 @@ export struct ENewspaperPageComponent {
if (this.newspaperListBean && this.newspaperListBean.list && this.newspaperListBean.list.length > 0) {
Swiper(this.swiperController) {
ForEach(this.newspaperListBean?.list, (item: NewspaperListItemBean, index: number) => {
ENewspaperItemComponent({ newspaperListItemBean: item
})
ENewspaperItemComponent({ newspaperListItemBean: item})
})
}
.index(this.swiperIndex)
...
...
@@ -245,6 +262,12 @@ export struct ENewspaperPageComponent {
.id('e_newspaper_next')
.onClick((event: ClickEvent) => {
this.swiperController.showNext()
// 电子报--滑动查看下一版
TrackingButton.click('panelPageViewNextPanel',TrackConstants.PageName.NewsPaperPage,TrackConstants.PageName.NewsPaperPage
,{
'panelNumber':this.newspaperListBean?.list[this.swiperIndex].pageNum,
'panelName':this.newspaperListBean?.list[this.swiperIndex].pageName,
})
})
}
...
...
@@ -316,6 +339,14 @@ export struct ENewspaperPageComponent {
}
if (this.newspaperListBean.list && this.newspaperListBean.list.length > 0) {
this.isOpenListDialog = true
//电子报--读报纸点击
TrackingContent.commentClickWithEvent('read_newspaper_click',TrackConstants.PageName.NewsPaperPage,TrackConstants.PageName.NewsPaperPage
,{
'panelNumber':this.newspaperListBean?.list[this.swiperIndex].pageNum,
'panelName':this.newspaperListBean?.list[this.swiperIndex].pageName,
'currentPanelDate':this.selectDate.toDateString(),
'currentNumber':this.swiperIndex,
})
}else {
ToastUtils.showToast('暂无数据', 1000)
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/FeedBackActivity.ets
View file @
d21529c
...
...
@@ -10,7 +10,7 @@ import { BusinessError } from '@kit.BasicServicesKit';
import { router } from '@kit.ArkUI';
import { CommonConstants } from 'wdConstant/Index';
import { ProcessUtils } from 'wdRouter/Index';
import { TrackingPageBrowse } from 'wdTracking/Index';
import { Track
Constants, TrackingButton, Track
ingPageBrowse } from 'wdTracking/Index';
const TAG = 'FeedBackActivity'
...
...
@@ -22,8 +22,6 @@ const TAG = 'FeedBackActivity'
@Component
export struct FeedBackActivity {
pageShowTime:number = 0;
pageId:string = 'feedbackPage';
pageName:string=this.pageId;
@State canSubmit: boolean = false;
@State textNumLabel: string = '0/500';
contact: string = "";
...
...
@@ -66,6 +64,11 @@ export struct FeedBackActivity {
.onChange((select) => {
feedbackTypeBean.isSelect = select
this.canSubmit = this.checkSubmit()
TrackingButton.click('submit_feedback',TrackConstants.PageName.FeedbackPage,TrackConstants.PageName.FeedbackPage,{
'feedback_type':feedbackTypeBean.id+''
})
})
Text(feedbackTypeBean.classifyName)
.fontColor($r('app.color.color_222222'))
...
...
@@ -342,9 +345,13 @@ export struct FeedBackActivity {
})
if(!StringUtils.isEmpty(selectType)){
selectType = selectType.substring(0,selectType.length-1)
TrackingButton.click('feedbackPageSubmitFeedback',TrackConstants.PageName.FeedbackPage,TrackConstants.PageName.FeedbackPage,{
'feedbackTypeId':selectType
})
}else{
//
ToastUtils.shortToast($r('app.string.feedback_opinion_type'))
TrackingButton.click('feedbackPageSubmitFeedback',TrackConstants.PageName.FeedbackPage,TrackConstants.PageName.FeedbackPage)
return
}
//内容必填
...
...
@@ -389,7 +396,7 @@ export struct FeedBackActivity {
}
onPageHide() {
//页面浏览
TrackingPageBrowse.trackCommonPageExposureEnd(
this.pageId,this.pageNam
e,Math.floor((DateTimeUtils.getTimeStamp() - this.pageShowTime)/1000))
TrackingPageBrowse.trackCommonPageExposureEnd(
TrackConstants.PageName.FeedbackPage,TrackConstants.PageName.FeedbackPag
e,Math.floor((DateTimeUtils.getTimeStamp() - this.pageShowTime)/1000))
}
}
\ No newline at end of file
...
...
sight_harmony/features/wdComponent/src/main/ets/components/MorningEveningPaper/MorningEveningPaperComponent.ets
View file @
d21529c
...
...
@@ -144,7 +144,8 @@ export struct MorningEveningPaperComponent {
Logger.info(TAG, "pageInfoBean dateTime = " + dateTime)
Logger.info(TAG, "pageInfoBean subTitle = " + this.subTitle)
this.setComponentBgColor(pageInfoBean.backgroundImgUrl)
this.setComponentBgColor(this.pageInfoBean?.topicInfo?.frontLinkObject?.coverUrl as string)
let compInfoBean = await MorningEveningViewModel.getMorningEveningCompInfo(pageInfoBean?.id, pageInfoBean?.groups[0]?.id, currentTime + "", pageInfoBean?.topicInfo?.topicId)
// this.compInfoBean = compInfoBean
...
...
@@ -223,8 +224,7 @@ export struct MorningEveningPaperComponent {
effectKit.createColorPicker(pixelMap, (err, colorPicker) => {
let color = colorPicker.getMainColorSync();
Logger.debug(TAG, "compInfoBean compStyle = " + color)
color = ColorUtils.getMorningEveningPaperRgb({red:color.red,green:color.green,blue:color.blue,alpha:color.alpha})
// color = ColorUtils.getMorningEveningPaperRgb({red:color.red,green:color.green,blue:color.blue,alpha:color.alpha})
// 将取色器选取的color示例转换为十六进制颜色代码
this.mixedBgColor = "#" + color.alpha.toString(16) + color.red.toString(16) + color.green.toString(16) + color.blue.toString(16);
Logger.debug(TAG, "compInfoBean compStyle = " + this.mixedBgColor)
...
...
@@ -272,18 +272,17 @@ export struct MorningEveningPaperComponent {
}
.height(`calc(100% - ${this.bottomSafeHeight + this.topSafeHeight + 'vp'})`).scrollBar(BarState.Off)
PaperTitleComponent()
PaperTitleComponent()
.margin({top:this.topSafeHeight})
}
.width('100%')
.height('100%')
.padding({
top: this.topSafeHeight,
bottom: this.bottomSafeHeight
})
// .padding({
// top: this.topSafeHeight,
// bottom: this.bottomSafeHeight
// })
// .backgroundColor(Color.Black)
// .backgroundColor(this.pageInfoBean?.backgroundColor ?? Color.Black)
.backgroundColor(this.mixedBgColor ?? Color.Black)
}
@Builder
...
...
sight_harmony/features/wdComponent/src/main/ets/components/MorningEveningPaper/topicInfoView.ets
View file @
d21529c
...
...
@@ -32,6 +32,7 @@ export struct topicInfoView {
})
.id('img_cover')
if (this.frontLinkObject) {
Row() {
Text("查看详情")
.fontSize(14)
...
...
@@ -49,19 +50,19 @@ export struct topicInfoView {
.margin({ top: 8, left: 16, right: 16, bottom: 16 })
.borderRadius(2)
.onClick(()=>{
if (this.frontLinkObject) {
let contentDTO :ContentDTO = new ContentDTO();
contentDTO.objectType = this.frontLinkObject?.newsType.toString()
contentDTO.objectId = this.frontLinkObject?.newsId
contentDTO.linkUrl = this.frontLinkObject?.linkUrl
ProcessUtils.processPage(contentDTO)
}
}).width(80)
.alignRules({
left: { anchor: "__container__", align: HorizontalAlign.Start },
bottom: { anchor: "__container__", align: VerticalAlign.Bottom }
})
.id('row_detail')
}
Text(this.frontLinkObject?.summary ?? "")
.margin({ top: 10 })
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card2Component.ets
View file @
d21529c
...
...
@@ -50,17 +50,27 @@ export struct Card2Component {
Column() {
Column() {
Stack() {
// if(this.contentDTO.objectType == '5'){
// Notes({ objectType: this.contentDTO.objectType }).height(30).align(Alignment.Center)
// }else if(this.contentDTO.objectType == '2'){
// if(this.contentDTO.seoTags){
// Notes({ newTags: this.contentDTO.seoTags }).height(30).align(Alignment.Center)
// }else if(this.contentDTO.newTags){
// Notes({ newTags: this.contentDTO.newTags }).height(30).align(Alignment.Center)
//
// }
// }else {
// if(this.contentDTO.newTags){
// Notes({ newTags: this.contentDTO.newTags }).height(30).align(Alignment.Center)
// }
// }
if(this.contentDTO.objectType == '5'){
Notes({ objectType: this.contentDTO.objectType }).height(30).align(Alignment.Center)
}else if(this.contentDTO.objectType == '2'){
if(this.contentDTO.seoTags){
} else {
if (this.contentDTO.seoTags) {
Notes({ newTags: this.contentDTO.seoTags }).height(30).align(Alignment.Center)
}else if(this.contentDTO.newTags){
Notes({ newTags: this.contentDTO.newTags }).height(30).align(Alignment.Center)
}
}else {
if(this.contentDTO.newTags){
if (this.contentDTO.newTags) {
Notes({ newTags: this.contentDTO.newTags }).height(30).align(Alignment.Center)
}
}
...
...
@@ -89,8 +99,9 @@ export struct Card2Component {
.lineHeight(27)
.textOverflow({ overflow: TextOverflow.Ellipsis }) // 超出的部分显示省略号。
.align(Alignment.Start)
.textIndent( (this.contentDTO.objectType === '2' && (this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) > 2 && (this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) < 5) ? 58 :
(this.contentDTO.objectType === '2' && (this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) > 0 || this.contentDTO.objectType === '5') ? 35 :
.textIndent((this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) > 2 &&
(this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) < 5 ? 58 :
((this.contentDTO.newTags?.length > 0 || this.contentDTO.seoTags?.length > 0) || this.contentDTO.objectType == '5') ? 35 :
0 )
}.alignContent(Alignment.TopStart)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card6Component.ets
View file @
d21529c
...
...
@@ -32,19 +32,6 @@ export struct Card6Component {
this.loadImg = await onlyWifiLoadImg();
this.clicked = hasClicked(this.contentDTO.objectId)
}
calculateTextIndent() {
if (this.contentDTO?.newTags?.length < 5 && this.contentDTO?.newTags?.length > 2) {
return 58;
} else if ((this.contentDTO.newTags?.length !== 0) || (this.contentDTO.seoTags?.length !== 0)) {
// 当newTags或seoTags存在时,应用相同的缩进
return 35;
} else if (this.contentDTO.objectType == '5') {
return 35;
} else {
return 0;
}
}
titleInit() {
if (this.contentDTO.title?.includes('<em>') && this.contentDTO.title?.includes('</em>')) {
this.titleMarked = true;
...
...
@@ -74,7 +61,8 @@ export struct Card6Component {
} else {
if (this.contentDTO.seoTags) {
Notes({ newTags: this.contentDTO.seoTags }).height(30).align(Alignment.Center)
} else if (this.contentDTO.newTags) {
}
if (this.contentDTO.newTags) {
Notes({ newTags: this.contentDTO.newTags }).height(30).align(Alignment.Center)
}
}
...
...
@@ -97,7 +85,10 @@ export struct Card6Component {
.maxLines(3)
.alignSelf(ItemAlign.Start)
.textOverflow({ overflow: TextOverflow.Ellipsis }) // 超出的部分显示省略号。
.textIndent(this.calculateTextIndent())
.textIndent((this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) > 2 &&
(this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) < 5 ? 58 :
((this.contentDTO.newTags?.length > 0 || this.contentDTO.seoTags?.length > 0) || this.contentDTO.objectType == '5') ? 35 :
0 )
}.alignContent(Alignment.TopStart)
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/comment/view/CommentComponent.ets
View file @
d21529c
...
...
@@ -279,6 +279,7 @@ export struct CommentComponent {
if (commentListModel && commentListModel.list && commentListModel.list.length > 0) {
this.allDatas.clearAllData() // 防止数据重复问题
commentListModel.list.forEach(element => {
element.hasMore = Number.parseInt(element.childCommentNum) ? true : false
let newModel = commentViewModel.deepCopyCommentItemModel(element)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/comment/view/CommentTabComponent.ets
View file @
d21529c
import { DisplayUtils, EmitterEventId, EmitterUtils } from 'wdKit/Index'
import { DisplayUtils, EmitterEventId, EmitterUtils
, ToastUtils
} from 'wdKit/Index'
import { publishCommentModel } from '../model/PublishCommentModel'
import { CommentCustomDialog } from './CommentCustomDialog'
import measure from '@ohos.measure'
import { ContentDetailDTO } from 'wdBean/Index'
import { HttpUtils } from 'wdNetwork/Index'
import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'
@Preview
@Component
...
...
@@ -120,6 +122,21 @@ export struct CommentTabComponent {
if(this.contentDetail.appstyle === 9) return
this.onCommentFocus && this.onCommentFocus()
// 未登录,游客评论未打开 则先登录
if (!HttpUtils.isLogin()) {
if (this.contentDetail.visitorComment != 1) {
WDRouterRule.jumpWithPage(WDRouterPage.loginPage)
return
}
}
if (this.contentDetail.openComment != 1 && this.contentDetail.commentDisplay != 1) {
ToastUtils.showToast("暂时无法评论", 3000)
return
}
//TODO: 用户被禁言 也不能评论
this.publishCommentModel.rootCommentId = '-1';
this.publishCommentModel.parentId = '-1';
this.publishCommentModel.placeHolderText = "说两句..."
...
...
sight_harmony/features/wdComponent/src/main/ets/components/comment/view/QualityCommentsComponent.ets
View file @
d21529c
import { ViewType } from 'wdConstant/Index'
import { DateTimeUtils, LazyDataSource, ToastUtils, WindowModel } from 'wdKit/Index'
import { DateTimeUtils, LazyDataSource,
Logger,
ToastUtils, WindowModel } from 'wdKit/Index'
import { commentItemModel } from '../model/CommentModel'
import commentViewModel from '../viewmodel/CommentViewModel'
import { router, window } from '@kit.ArkUI'
...
...
@@ -106,8 +106,13 @@ export struct QualityCommentsComponent {
// .aspectRatio(375 / 283);
}
.onAreaChange((oldValue: Area, newValue: Area) => {
let persent = Math.abs(Number(newValue.globalPosition.y)) / 150
if (Number(oldValue.globalPosition.y) == 0 && Number(newValue.globalPosition.y) > 30) {
this.firstPositionY = Number(newValue.globalPosition.y)
return
}
Logger.debug(TAG, "oldValue.globalPosition.y : " + oldValue.globalPosition.y)
Logger.debug(TAG, "newValue.globalPosition.y : " + newValue.globalPosition.y + `,this.topSafeHeight : ` + this.topSafeHeight)
let persent = Math.abs(Number(newValue.globalPosition.y) - this.firstPositionY ) / 150 //- this.topSafeHeight) / 283
if (persent > 1) {
persent = 1
}
...
...
@@ -130,16 +135,17 @@ export struct QualityCommentsComponent {
center: { anchor: "__container__", align: VerticalAlign.Center },
left: { anchor: "__container__", align: HorizontalAlign.Start }
})
.offset({
y: (this.topSafeHeight / 2) + 'px'
})
// .offset({
// y: (this.topSafeHeight / 2) + 'px'
// })
.margin({ left: 16 })
.onClick(() => {
router.back()
})
}
.visibility(this.tileOpacity > 0 ? 1 : 0)
.height(this.topSafeHeight + vp2px(44) + 'px')
// .height(this.topSafeHeight + vp2px(44) + 'px')
.height(44)
.width('100%')
.backgroundColor($r('app.color.color_transparent'))
.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP])
...
...
@@ -159,9 +165,9 @@ export struct QualityCommentsComponent {
center: { anchor: "__container__", align: VerticalAlign.Center },
left: { anchor: "__container__", align: HorizontalAlign.Start }
})
.offset({
y: (this.topSafeHeight / 2) + 'px'
})
// .offset({
// y: (this.topSafeHeight / 2) + 'px'
// })
.margin({ left: 16 })
.onClick(() => {
router.back()
...
...
@@ -178,16 +184,17 @@ export struct QualityCommentsComponent {
center: { anchor: "__container__", align: VerticalAlign.Center },
middle: { anchor: "__container__", align: HorizontalAlign.Center }
})
.offset({
y: (this.topSafeHeight / 2) + 'px'
})
// .offset({
// y: (this.topSafeHeight / 2) + 'px'
// })
}
.visibility(this.tileOpacity > 0 ? 0 : 1)
.opacity(this.tileOpacity)
.height(this.topSafeHeight + vp2px(44) + 'px')
// .height(this.topSafeHeight + vp2px(44) + 'px')
.height(44)
.width('100%')
.backgroundColor($r('app.color.white'))
.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP])
//
.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP])
}
build() {
...
...
@@ -212,7 +219,7 @@ export struct QualityCommentsComponent {
.friction(0.6)
.scrollBar(BarState.Off)
.edgeEffect(EdgeEffect.None)
.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM])
//
.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM])
this.TabbarTransparent()
this.TabbarNormal()
...
...
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhCarouselLayout01.ets
View file @
d21529c
import { CompDTO, ContentDTO
,
} from 'wdBean';
import { CompDTO, ContentDTO } from 'wdBean';
import { BreakpointConstants, CommonConstants } from 'wdConstant';
import { BreakPointType, Logger } from 'wdKit';
import { CompUtils } from '../../utils/CompUtils';
...
...
@@ -11,6 +11,7 @@ import { InfomationCardClick } from '../../utils/infomationCardClick'
const TAG = 'Zh_Carousel_Layout-01';
/**
* 轮播组件,即Banner/轮播大图/焦点图/自动滑动
* 样式:
...
...
@@ -47,9 +48,11 @@ export struct ZhCarouselLayout01 {
@StorageLink('currentBreakpoint') @Watch('watchCurrentBreakpoint') currentBreakpoint: string =
BreakpointConstants.BREAKPOINT_XS;
@State compDTO: CompDTO = {} as CompDTO
@State firstWd: number = 0
@State SecondWd: number = 0
@State swiperIndex: number = 0
private data: MyDataSource = new MyDataSource([])
watchCurrentBreakpoint() {
...
...
@@ -75,6 +78,7 @@ export struct ZhCarouselLayout01 {
}
build() {
if (this.compDTO?.operDataList?.length) {
Stack() {
Swiper() {
...
...
@@ -206,9 +210,19 @@ struct CarouselLayout01CardView {
Blank()
// 文本信息
Stack() {
if
(this.item.objectType == '5' || this.item.objectType == '6')
{
if
(this.item.objectType == '5')
{
Notes({ objectType: this.item.objectType })
} else {
if (this.item.seoTags) {
Notes({ newTags: this.item.seoTags })
}
if (this.item.newTags) {
Notes({ newTags: this.item.newTags })
}
}
// if (this.item.objectType == '5' || this.item.objectType == '6') {
// Notes({ objectType: this.item.objectType })
// }
Text(`${this.item.corner}${this.item.newsTitle}`)
.width(CommonConstants.FULL_PARENT)
.fontColor(Color.White)
...
...
@@ -218,7 +232,10 @@ struct CarouselLayout01CardView {
.align(Alignment.Bottom)
.maxLines(CompUtils.MAX_LINES_2)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.textIndent(this.item.objectType == '5' ? 35 : 0)
.textIndent((this.item.newTags?.length || this.item.seoTags?.length) > 2 &&
(this.item.newTags?.length ||this.item.seoTags?.length) < 5 ? 58 :
((this.item.newTags?.length > 0 || this.item.seoTags?.length > 0) ||this.item.objectType == '5') ? 35 :
0 )
}
// .height(39)
.padding({
...
...
sight_harmony/features/wdComponent/src/main/ets/components/setting/AccountAndSecurityLayout.ets
View file @
d21529c
...
...
@@ -213,8 +213,7 @@ export struct AccountAndSecurityLayout {
WDRouterRule.jumpWithPage(WDRouterPage.modifyPasswordPage)
}else{
//设置密码
let pageType = {'pageType': 1} as Record<string, number>;
WDRouterRule.jumpWithPage(WDRouterPage.forgetPasswordPage, pageType)
WDRouterRule.jumpWithPage(WDRouterPage.verifyPhoneNumberPage)
}
}else if (index == 3) {
trackButtonClick("accountManagementPageAccountCancellation")
...
...
sight_harmony/features/wdComponent/src/main/ets/utils/ColorUtils.ets
View file @
d21529c
...
...
@@ -177,9 +177,9 @@ export class ColorUtils {
public static getMorningEveningPaperRgb(color: ColorRgb): ColorRgb{
// RGB颜色取值范围是0~255,需要转换为0~1的浮点数
const red: number = color.red / MAX_RGB_VALUE;
const green: number = color.green / MAX_RGB_VALUE;
const blue: number = color.blue / MAX_RGB_VALUE;
const red: number = color.red ;
const green: number = color.green ;
const blue: number = color.blue;
const max: number = Math.max(red, green, blue);
const min: number = Math.min(red, green, blue);
...
...
sight_harmony/features/wdLogin/src/main/ets/pages/login/LoginInputComponent.ets
View file @
d21529c
...
...
@@ -10,7 +10,7 @@ export struct LoginInputComponent {
@Link isCodeSend: boolean //验证码控件是否点击 默认没有 发送接口
@Link isSubmit: boolean //是否可以提交
isFirst:boolean=true//是否第一次获取验证码
pageType?:number; //0、登录->忘记密码
1、设置->重置密码
3、设置->更换手机号页面2
pageType?:number; //0、登录->忘记密码 3、设置->更换手机号页面2
lastTime: number = 0
@Link @Watch('startCount') codeStateSuccess: boolean //验证码获取成功与否回调 成功显示倒计时
@Watch('onCheckChange') @Prop protocolState: boolean = false //协议勾选状态
...
...
@@ -33,9 +33,6 @@ export struct LoginInputComponent {
}
async aboutToAppear(){
if (this.pageType == 1 ) {
this.phoneContent = await SPHelper.default.get(SpConstants.USER_PHONE,"") as string;
}
if(this.pageType == 0 ){
let phone = await SPHelper.default.get(SpConstants.USER_PHONE,"") as string
if(StringUtils.isNotEmpty(phone)){
...
...
@@ -43,29 +40,9 @@ export struct LoginInputComponent {
}
}
}
@Builder
addCodeLayout() {
if (this.pageType == 1){
TextInput({ text: this.securityPhone(this.phoneContent) })
.placeholderColor("#CCCCCC")
.fontSize(16)
.height(48)
.maxLength(11)
.margin({ top: 36 })
.backgroundColor("#F5F5F5")
.borderRadius(4)
.enabled(false)
.type(InputType.PhoneNumber)
.onChange((content) => {
this.phoneContent = content
this.isSubmit = (this.phoneContent.length >= 11 && this.codeContent.length >= 4)
if (content.length >= 11) {
this.codeBtnState = true
} else {
this.codeBtnState = false
}
})
}else{
//修改密码 里面的 忘记密码(已登录)
if(StringUtils.isNotEmpty(this.phoneContent) && this.phoneContent.indexOf("****")!=-1 && this.pageType == 0){
TextInput({ text: this.securityPhone(this.phoneContent) })
...
...
@@ -115,7 +92,6 @@ export struct LoginInputComponent {
}
})
}
}
Row() {
...
...
sight_harmony/features/wdLogin/src/main/ets/pages/login/LoginPage.ets
View file @
d21529c
...
...
@@ -378,6 +378,7 @@ struct LoginPage {
TrackingButton.click("loginPageLoginButton",TrackConstants.PageName.Phone_Login_Page,TrackConstants.PageName.Phone_Login_Page)
this.loginViewModel.appLogin(this.phoneContent, 2, this.codeContent).then((data) => {
Logger.debug(TAG, "requestLogin: " + data.jwtToken)
this.showToastTip('登录成功')
///同步兴趣tag
let interestsModel = new InterestsHobbiesModel()
interestsModel.updateInterests()
...
...
sight_harmony/features/wdLogin/src/main/ets/pages/login/LoginProtocolWebview.ets
View file @
d21529c
...
...
@@ -29,10 +29,12 @@ struct LoginProtocolWebview {
this.contentID = params.contentID
}
if (params.contentID == "1") { //"人民日报客户端网络服务使用协议"
this.webUrl = this.userProtocol
this.webUrl = await SPHelper.default.get(SpConstants.NET_SERVICE_PROTOCOL, this.userProtocol) as string
this.webviewController.loadUrl(this.webUrl)
} else if(params.contentID == "2"){ //"人民日报客户端用户隐私协议"
this.webUrl = this.privateProtocol
this.webUrl = await SPHelper.default.get(SpConstants.PRIVATE_PROTOCOL, this.privateProtocol) as string
this.webviewController.loadUrl(this.webUrl)
}else if(params.contentID == "3"){ //注销协议
...
...
sight_harmony/features/wdLogin/src/main/ets/pages/login/VerifyPhoneNumberPage.ets
0 → 100644
View file @
d21529c
import { CustomToast, DateTimeUtils, Logger, SPHelper } from 'wdKit/Index'
import { WDRouterRule, WDRouterPage } from 'wdRouter/Index'
import { LoginViewModel } from './LoginViewModel'
import { SettingPasswordParams } from './SettingPasswordLayout'
import { router } from '@kit.ArkUI'
import { SpConstants } from 'wdConstant/Index'
import { TrackingPageBrowse, TrackConstants, TrackingButton } from 'wdTracking/Index'
const TAG = 'VerifyPhoneNumberPage'
//设置密码(第一次) 验证当前手机号 页面
@Entry
@Component
struct VerifyPhoneNumberPage {
@State phoneContent: string = ''
@State codeContent: string = ''
@State isSubmit: boolean = false //是否可以提交 默认不可以
loginViewModel: LoginViewModel = new LoginViewModel()
@State @Watch('onCodeSend') isCodeSend: boolean = false //验证码点击发送事件
@State pageTitle:string = '验证当前手机号';
@State @Watch('startCount') codeStateSuccess:boolean=false
lastTime: number = 0
@State codeBtnState: boolean = false
@State timeCount: number = 60
isFirst:boolean=true//是否第一次获取验证码
pageShowTime:number = 0;
pageHideTime:number = 0;
onCodeSend() {
if (this.isCodeSend) {
TrackingButton.click("checkingPhoneNumberPageSendVerificationCode",TrackConstants.PageName.Checking_PhoneNum,TrackConstants.PageName.Checking_PhoneNum)
this.sendVerifyCode()
}
}
onPageShow() {
this.pageShowTime = DateTimeUtils.getTimeStamp()
}
onPageHide(): void {
this.pageHideTime = DateTimeUtils.getTimeStamp()
let duration = 0
duration = Math.floor((this.pageHideTime - this.pageShowTime)/1000)
TrackingPageBrowse.trackCommonPageExposureEnd(TrackConstants.PageName.Checking_PhoneNum,TrackConstants.PageName.Checking_PhoneNum,duration)
}
async aboutToAppear(): Promise<void> {
this.phoneContent = await SPHelper.default.get(SpConstants.USER_PHONE,"") as string;
}
@State toastText:string = ""
dialogToast: CustomDialogController = new CustomDialogController({
builder: CustomToast({
msg: this.toastText,
}),
autoCancel: false,
alignment: DialogAlignment.Center,
customStyle: true,
maskColor:"#00000000"
})
build() {
Column() {
Image($r('app.media.login_back_icon')).width(24).height(24).margin({ left: 15, top: 10 }).onClick(() => {
router.back()
})
Text(this.pageTitle).fontSize(22).fontColor('#333333').fontWeight(FontWeight.Bold).margin({ left: 25, top: 112 })
Column() {
TextInput({ text: this.securityPhone(this.phoneContent) })
.placeholderColor("#CCCCCC")
.fontSize(16)
.height(48)
.maxLength(11)
.margin({ top: 36 })
.backgroundColor("#F5F5F5")
.borderRadius(4)
.enabled(false)
.type(InputType.PhoneNumber)
.onChange((content) => {
this.phoneContent = content
this.isSubmit = (this.phoneContent.length >= 11 && this.codeContent.length >= 4)
if (content.length >= 11) {
this.codeBtnState = true
} else {
this.codeBtnState = false
}
})
Row() {
TextInput({ text: this.codeContent,placeholder: "验证码" })
.placeholderColor("#CCCCCC")
.layoutWeight(1)
.fontSize(16)
.height(48)
.type(InputType.Number)
.fontColor("#222222")
.backgroundColor("#00000000")
.borderRadius({ topLeft: 4, bottomLeft: 4 })
.onChange((value) => {
this.codeContent = value
this.isSubmit = (this.phoneContent.length >= 11 && this.codeContent.length >= 4)
})
Text(this.codeStateSuccess ? this.timeCount + "s" : this.isFirst?"发送验证码":'重新获取')
.fontColor(this.codeBtnState?'#ED2800':'#80ED2800')
.width(110)
.fontSize(14)
.fontWeight( FontWeight.Bold)
.height(48)
.textAlign(TextAlign.Center)
.enabled(this.codeStateSuccess?false:true)
.onClick(() => {
if (this.phoneContent.length < 11) {
return
}
let currentTime = DateTimeUtils.getTimeStamp()
if (currentTime - this.lastTime < 500) {
return
}
this.lastTime = currentTime;
this.isCodeSend = true
})
}.margin({ top: 12 })
.height(48)
.alignItems(VerticalAlign.Center)
.justifyContent(FlexAlign.Start)
.backgroundImage($r('app.media.code_login_bg'))
.backgroundImageSize({width:'100%',height:48})
}.width('100%').padding({ left: 25, right: 25 })
Row() {
Text("确认")
.layoutWeight(1)
.fontColor(this.isSubmit ?"#FFFFFFFF":"#66FFFFFF")
.borderRadius(4)
.fontSize(18)
.textAlign(TextAlign.Center)
.fontWeight(FontWeight.Medium)
.margin({ top: 26 })
.height(44)
.backgroundColor(this.isSubmit ?"#ED2800":"#99ED2800")
.enabled(this.isSubmit ? true : false)
.onClick(() => {
this.checkVerifyCode()
})
}.padding({ left: 25, right: 25 }).width('100%')
}.width('100%').height('100%').alignItems(HorizontalAlign.Start)
}
//发送验证码
sendVerifyCode() {
if (this.isEmpty(this.phoneContent)) {
return
}
this.loginViewModel.sendVerifyCodeByToken().then(()=>{
this.showToastTip("已发送")
this.codeStateSuccess=true
this.isCodeSend=false
}).catch((message: string)=>{
this.showToastTip(message)
this.codeStateSuccess=false
this.isCodeSend=false
})
}
//校验验证码
checkVerifyCode() {
TrackingButton.click("checkingPhoneNumberPageConfirm",TrackConstants.PageName.Checking_PhoneNum,TrackConstants.PageName.Checking_PhoneNum)
if (!this.isSubmit) {
return
}
if (this.isEmpty(this.phoneContent)) {
return
}
if (this.isEmpty(this.codeContent)) {
return
}
this.loginViewModel.checkVerifyCodeByToken(this.codeContent).then(()=>{
let params: SettingPasswordParams = {
pageID:'1',
phoneContent:this.phoneContent,
codeContent:this.codeContent,
pageType:1
}
WDRouterRule.jumpWithPage(WDRouterPage.settingPasswordPage, params)
}).catch((message: string)=>{
this.showToastTip(message)
})
}
isEmpty(obj: undefined|null|string): boolean {
return (obj == undefined || obj == null || obj == '');
}
showToastTip(msg:string){
this.toastText = msg
this.dialogToast.open()
}
securityPhone(phoneNum:string):string{
let securityNum:string;
let needSecurityString = phoneNum.substring(3, phoneNum.length - 4);
securityNum = phoneNum.replace(needSecurityString,'****')
return securityNum;
}
startCount() {
this.isFirst = false
let time = setInterval(() => {
Logger.debug("倒计时:" + this.timeCount)
this.timeCount--
if (this.timeCount < 1) {
this.codeStateSuccess = false
this.timeCount = 60
clearInterval(time)
}
}, 1000)
}
}
\ No newline at end of file
...
...
sight_harmony/features/wdLogin/src/main/resources/base/profile/main_pages.json
View file @
d21529c
...
...
@@ -9,6 +9,7 @@
"pages/guide/GuidePages"
,
"pages/login/OneKeyLoginPage"
,
"pages/login/ModifyPasswordPage"
,
"pages/login/ChangeBindPhonePage"
"pages/login/ChangeBindPhonePage"
,
"pages/login/VerifyPhoneNumberPage"
]
}
\ No newline at end of file
...
...
sight_harmony/features/wdTracking/src/main/ets/common/TrackConstants.ets
View file @
d21529c
...
...
@@ -2,7 +2,8 @@ export namespace TrackConstants {
export enum EventType {
Show = 0,
Click = 1
Click = 1,
CurrentNumberPanelContentExposure = 2,
}
// 行为类型
...
...
@@ -24,7 +25,8 @@ export namespace TrackConstants {
UnSubscribe = "unSubscribe",
CloseInterestCard = "closeInterestCard",
SelectInterestCard = "selectInterestCard",
//电子报当前页曝光
CurrentNumberPanelContentExposure = "current_Number_Panel_content_exposure",
}
// 分享聚道
...
...
@@ -208,5 +210,11 @@ export namespace TrackConstants {
///兴趣偏好页
Interest = "preferenceSelectionPage",
//意见反馈
FeedbackPage = 'feedbackPage',
//动态详情
DynamicDetailPage = 'dynamicDetailPage',
//早晚报
NewsPaperPage = 'newsPaperPage',
}
}
\ No newline at end of file
...
...
sight_harmony/features/wdTracking/src/main/ets/common/TrackParamConvert.ets
View file @
d21529c
...
...
@@ -22,7 +22,15 @@ export class TrackParamConvert {
static pageCompProgram(pageInfo?: PageInfoDTO, comp?: CompInfoBean, program?: ContentDTO) : ParamType {
let params = TrackingUtils.generateParams()
if (program) {
params["contentType"] = program.objectType
params["contentId"] = program.objectId
params["contentName"] = program.newsTitle
params["channelSourceId"] = program.channelId
params["rmhPlatform"] = program.rmhPlatform
TrackParamConvert.appendRecommend(program, params)
}
//TODO: 转换参数
return params
...
...
sight_harmony/features/wdTracking/src/main/ets/tracking/TrackingContent.ets
View file @
d21529c
...
...
@@ -29,6 +29,10 @@ export class TrackingContent {
params["action"] = TrackConstants.ActionType.Show
TrackingUtils.fillPositionWith(params)
Tracking.event("content_exposure", params)
}else if(eventType === TrackConstants.EventType.CurrentNumberPanelContentExposure){
params["action"] = TrackConstants.ActionType.Show
TrackingUtils.fillPositionWith(params)
Tracking.event(TrackConstants.ActionType.CurrentNumberPanelContentExposure, params)
}
}
...
...
@@ -82,6 +86,10 @@ export class TrackingContent {
}
static commentClick(pageId: string, pageName: string, extParams?: ParamType) {
TrackingContent.commentClickWithEvent("content_comment_click",pageId,pageName,extParams);
}
static commentClickWithEvent(event: string,pageId: string, pageName: string, extParams?: ParamType) {
let params = TrackingUtils.generateParams(extParams)
if (pageId.length) {
params["pageId"] = pageId
...
...
@@ -91,7 +99,7 @@ export class TrackingContent {
}
params["action"] =TrackConstants.ActionType.Comment
TrackingUtils.fillPositionWith(params)
Tracking.event(
"content_comment_click"
, params)
Tracking.event(
event
, params)
}
static commentShare(pageId: string, pageName: string, extParams?: ParamType) {
...
...
sight_harmony/products/phone/src/main/ets/pages/ENewspaper.ets
View file @
d21529c
...
...
@@ -2,7 +2,7 @@ import { ENewspaperPageComponent } from 'wdComponent';
import { DateTimeUtils, Logger } from 'wdKit';
import common from '@ohos.app.ability.common';
import window from '@ohos.window';
import { TrackingPageBrowse } from 'wdTracking/Index';
import { TrackingPageBrowse
,TrackConstants
} from 'wdTracking/Index';
const TAG = 'ENewspaper';
...
...
@@ -10,8 +10,6 @@ const TAG = 'ENewspaper';
@Component
struct ENewspaper {
pageShowTime:number = 0;
pageId:string = 'newsPaperPage';
pageName:string=this.pageId;
// 获取UIAbility上下文
context: common.UIAbilityContext = getContext(this) as common.UIAbilityContext
...
...
@@ -59,7 +57,7 @@ struct ENewspaper {
this.setSystemBar('#FFFFFFFF','#00000000', '#000000')
Logger.info(TAG, 'onPageHide');
//页面浏览
TrackingPageBrowse.trackCommonPageExposureEnd(
this.pageId,this.pageNam
e,Math.floor((DateTimeUtils.getTimeStamp() - this.pageShowTime)/1000))
TrackingPageBrowse.trackCommonPageExposureEnd(
TrackConstants.PageName.NewsPaperPage,TrackConstants.PageName.NewsPaperPag
e,Math.floor((DateTimeUtils.getTimeStamp() - this.pageShowTime)/1000))
}
onBackPress() {
...
...
sight_harmony/products/phone/src/main/ets/pages/detail/DynamicDetailPage.ets
View file @
d21529c
...
...
@@ -2,15 +2,13 @@ import { DateTimeUtils, Logger } from 'wdKit';
import { DynamicDetailComponent } from 'wdComponent';
import router from '@ohos.router';
import { Params, Action } from 'wdBean';
import { TrackingPageBrowse } from 'wdTracking/Index';
import { TrackingPageBrowse
,TrackConstants
} from 'wdTracking/Index';
const TAG = 'DynamicDetailPage';
@Entry
@Component
struct DynamicDetailPage {
pageShowTime:number = 0;
pageId:string = 'dynamicDetailPage';
pageName:string=this.pageId;
@State relId: string = ''
@State contentId: string = ''
@State relType: string = ''
...
...
@@ -39,7 +37,7 @@ struct DynamicDetailPage {
}
onPageHide() {
//页面浏览
TrackingPageBrowse.trackCommonPageExposureEnd(
this.pageId,this.pageNam
e,Math.floor((DateTimeUtils.getTimeStamp() - this.pageShowTime)/1000))
TrackingPageBrowse.trackCommonPageExposureEnd(
TrackConstants.PageName.DynamicDetailPage,TrackConstants.PageName.DynamicDetailPag
e,Math.floor((DateTimeUtils.getTimeStamp() - this.pageShowTime)/1000))
}
}
\ No newline at end of file
...
...
sight_harmony/products/phone/src/main/ets/pages/launchPage/LaunchInterestsHobbiesPage.ets
View file @
d21529c
...
...
@@ -4,6 +4,7 @@ import { WDRouterPage } from 'wdRouter';
import { SPHelper } from 'wdKit/Index';
import { SpConstants } from 'wdConstant/Index';
import { ButtonOptions, promptAction } from '@kit.ArkUI';
import { ParamType, TrackConstants, TrackingContent } from 'wdTracking/Index';
@Entry
@Component
...
...
@@ -34,6 +35,8 @@ struct LaunchInterestsHobbiesPage {
//直接跳过到首页
//跳转首页
WDRouterRule.jumpWithReplacePage(WDRouterPage.mainPage)
this.trackingLaunchJumpOver(false)
})
}
.width('100%')
...
...
@@ -148,6 +151,9 @@ struct LaunchInterestsHobbiesPage {
this.saveTagIds()
//跳转首页
WDRouterRule.jumpWithReplacePage(WDRouterPage.mainPage)
this.trackingLaunchJumpOver(true)
})
}
.width('100%')
...
...
@@ -185,4 +191,17 @@ struct LaunchInterestsHobbiesPage {
}
SPHelper.default.saveSync(SpConstants.PUBLICVISUTORMODE_INTERESTTAGS,tags)
}
trackingLaunchJumpOver(selectOrJump:boolean){
let tags = SPHelper.default.getSync(SpConstants.PUBLICVISUTORMODE_INTERESTTAGS,'') as string
let action = selectOrJump?TrackConstants.ActionType.SelectInterestCard:TrackConstants.ActionType.CloseInterestCard
let pageParam: ParamType = {
'interestContentOptions':tags,
'itemId':tags,
'action':action,
'sceneId':'9999',
'cnsTraceId':'selfHold',
}
TrackingContent.common(TrackConstants.EventType.Click,TrackConstants.PageName.Interest,TrackConstants.PageName.Interest,pageParam)
}
}
\ No newline at end of file
...
...
Please
register
or
login
to post a comment