张善主

Merge remote-tracking branch 'origin/main'

... ... @@ -4,6 +4,8 @@ import MinePageDatasModel from '../../../model/MinePageDatasModel'
import { CommentLikeOperationRequestItem } from '../../../viewmodel/CommentLikeOperationRequestItem'
import { CommentListItem } from '../../../viewmodel/CommentListItem'
import measure from '@ohos.measure'
import { TrackConstants, TrackingContent, TrackParamConvert } from 'wdTracking/Index'
import { ProcessUtils } from 'wdRouter/Index'
@Component
export struct ChildCommentComponent {
... ... @@ -189,6 +191,11 @@ export struct ChildCommentComponent {
.width('100%')
.height('69lpx')
.justifyContent(FlexAlign.SpaceBetween)
.onClick(()=>{
let content = getParams(this.data)
TrackingContent.common(TrackConstants.EventType.Click,TrackConstants.PageName.Customer_Personal,TrackConstants.PageName.Customer_Personal,TrackParamConvert.program(content))
ProcessUtils.processPage(content)
})
}.height('69lpx')
.justifyContent(FlexAlign.Center)
... ...
... ... @@ -90,12 +90,12 @@ export struct HomePageBottomCommentComponent {
isLastItem: index === this.data_comment.totalCount() - 1
})
}
.onClick(()=>{
let content = getParams(item)
TrackingContent.common(TrackConstants.EventType.Click,TrackConstants.PageName.Main_Personal,TrackConstants.PageName.Main_Personal,TrackParamConvert.program(content))
content.customParamTargetLayout = "comment"
ProcessUtils.processPage(content)
})
// .onClick(()=>{
// let content = getParams(item)
// TrackingContent.common(TrackConstants.EventType.Click,TrackConstants.PageName.Main_Personal,TrackConstants.PageName.Main_Personal,TrackParamConvert.program(content))
// content.customParamTargetLayout = "comment"
// ProcessUtils.processPage(content)
// })
.onVisibleAreaChange([0.0, 1.0], (isVisible: boolean, currentRatio: number) => {
if (isVisible) {
let contentDTO = getParams(item)
... ...
... ... @@ -91,11 +91,7 @@ export struct OtherHomePageBottomCommentComponent {
isLastItem: index === this.data_comment.totalCount() - 1,
})
}
.onClick(()=>{
let content = getParams(item)
TrackingContent.common(TrackConstants.EventType.Click,TrackConstants.PageName.Customer_Personal,TrackConstants.PageName.Customer_Personal,TrackParamConvert.program(content))
ProcessUtils.processPage(content)
}).onVisibleAreaChange([0.0, 1.0], (isVisible: boolean, currentRatio: number) => {
.onVisibleAreaChange([0.0, 1.0], (isVisible: boolean, currentRatio: number) => {
if (isVisible) {
let contentDTO = getParams(item)
//埋点crash 后面看看
... ...
... ... @@ -128,18 +128,62 @@ struct OneKeyLoginPage {
.padding({top: `${this.topSafeHeight}px`})
}
// @Builder loginButton() {
// Column() {
// LoginWithHuaweiIDButton({
// params: {
// // LoginWithHuaweiIDButton支持的样式。
// style: loginComponentManager.Style.BUTTON_CUSTOM,
// // LoginWithHuaweiIDButton的边框圆角半径。
// borderRadius: 4,
// // LoginWithHuaweiIDButton支持的登录类型。
// loginType: loginComponentManager.LoginType.QUICK_LOGIN,
// // LoginWithHuaweiIDButton支持按钮的样式跟随系统深浅色模式切换。
// supportDarkMode: true,
// customButtonParams: {
// fontColor: loginComponentManager.FontColor.WHITE,
// // backgroundColor:!this.agreeProtocol ? "#60ED2800" : "#ED2800"
// backgroundColor:"#ED2800"
// }
// },
// controller: this.controller
// })
// }
// .backgroundColor("#ED2800")
// .height(48)
// .margin({ top: 20 ,left: 25, right: 25 })
// }
@Builder loginButton() {
Column() {
Row() {
Stack(){
Button() {
Row() {
Image($r("app.media.huawei_one_key_login_icon"))
.width(24).height(24)
Text("华为账号一键登录")
.fontColor(Color.White)
.margin({left:5})
}
}
.width('100%')
.height(48)
.borderRadius(4)
.type(ButtonType.Normal)
.backgroundColor("#ED2800")
Stack(){
//目前不支持文字和图标同时展示,后面优化
LoginWithHuaweiIDButton({
params: {
// LoginWithHuaweiIDButton支持的样式。
style: loginComponentManager.Style.BUTTON_CUSTOM,
// LoginWithHuaweiIDButton的边框圆角半径。
borderRadius: 4,
// borderRadius: 4,
// LoginWithHuaweiIDButton支持的登录类型。
loginType: loginComponentManager.LoginType.QUICK_LOGIN,
// LoginWithHuaweiIDButton支持按钮的样式跟随系统深浅色模式切换。
supportDarkMode: true,
// supportDarkMode: true,
customButtonParams: {
fontColor: loginComponentManager.FontColor.WHITE,
// backgroundColor:!this.agreeProtocol ? "#60ED2800" : "#ED2800"
... ... @@ -147,39 +191,18 @@ struct OneKeyLoginPage {
}
},
controller: this.controller
})
}).opacity(0)
}
.width('100%')
.height('100%')
}
}
.height(48)
.margin({ top: 20 ,left: 25, right: 25 })
.width("100%")
.padding({ left: 25, right: 25 })
.margin({top: 20})
}
// @Builder loginButton() {
// Row() {
// Button() {
// Row() {
// Image($r("app.media.huawei_one_key_login_icon"))
// .width(24).height(24)
// Text("华为账号一键登录")
// .fontColor(Color.White)
// }
// }
// .type(ButtonType.Normal)
// .height(48)
// .backgroundColor(!this.agreeProtocol ? "#60ED2800" : "#ED2800")
// .width("100%")
// .onClick((event) => {
// if (!this.agreeProtocol) {
// return
// }
//
// TrackingButton.click("oneClickLoginPageLoginButton", this.pageName, this.pageName)
// this.requestLogin()
// })
// }
// .padding({ left: 25, right: 25 })
// .margin({top: 20})
// }
@Builder ProtocolRow() {
Row({space: 4}) {
Image(this.agreeProtocol ? $r('app.media.login_checkbox_select') : $r('app.media.login_checkbox_unselected'))
... ...
... ... @@ -21,7 +21,7 @@ export class PublicParams {
"isSign": AccountManagerUtils.isLoginSync() ? "1" : "0",
"environment": PublicParams.getEnv(),
"os": AppUtils.getOSName(),
"actionTime": Math.log(new Date().getTime() / 1000),
"actionTime": Math.floor(new Date().getTime() / 1000),
"channel": AppUtils.getAppChannel(),
"version": AppUtils.getAppVersionName(),
"deviceId": DeviceUtil.clientId(),
... ...
... ... @@ -24,17 +24,17 @@ export class Tracking {
// Logger.error('yyyy','event track failed')
// })
// let publicParams = new PublicParams()
// publicParams.getPublicParams().then((pubParams) => {
//
// if (params) {
// for (const obj of Object.entries(params)) {
// // Logger.info(TAG, ` ${obj[0]} => ` + `${obj[1]}`);
// pubParams[obj[0]] = obj[1]
// }
// }
// sensors.track(eventId, pubParams)
// })
let publicParams = new PublicParams()
publicParams.getPublicParams().then((pubParams) => {
if (params) {
for (const obj of Object.entries(params)) {
// Logger.info(TAG, ` ${obj[0]} => ` + `${obj[1]}`);
pubParams[obj[0]] = obj[1]
}
}
sensors.track(eventId, pubParams)
})
}
}
... ...