Showing
2 changed files
with
14 additions
and
9 deletions
| @@ -4,7 +4,7 @@ import { AccountAndSecurityLayout } from '../setting/AccountAndSecurityLayout'; | @@ -4,7 +4,7 @@ import { AccountAndSecurityLayout } from '../setting/AccountAndSecurityLayout'; | ||
| 4 | import router from '@ohos.router'; | 4 | import router from '@ohos.router'; |
| 5 | import { Action, Params } from 'wdBean'; | 5 | import { Action, Params } from 'wdBean'; |
| 6 | import { DateTimeUtils } from 'wdKit/Index'; | 6 | import { DateTimeUtils } from 'wdKit/Index'; |
| 7 | -import { TrackingPageBrowse, TrackConstants } from 'wdTracking/Index'; | 7 | +import { TrackingPageBrowse, TrackConstants, TrackingButton } from 'wdTracking/Index'; |
| 8 | 8 | ||
| 9 | @Entry | 9 | @Entry |
| 10 | @Component | 10 | @Component |
| @@ -67,6 +67,4 @@ struct SettingPage { | @@ -67,6 +67,4 @@ struct SettingPage { | ||
| 67 | 67 | ||
| 68 | export { SettingPage }; | 68 | export { SettingPage }; |
| 69 | 69 | ||
| 70 | -/* | ||
| 71 | 70 | ||
| 72 | -* */ |
| @@ -15,6 +15,7 @@ import common from '@ohos.app.ability.common'; | @@ -15,6 +15,7 @@ import common from '@ohos.app.ability.common'; | ||
| 15 | import dataPreferences from '@ohos.data.preferences'; | 15 | import dataPreferences from '@ohos.data.preferences'; |
| 16 | import { TitleBackComponent } from './TitleBackComponent'; | 16 | import { TitleBackComponent } from './TitleBackComponent'; |
| 17 | import { MyCustomDialog } from '../reusable/MyCustomDialog'; | 17 | import { MyCustomDialog } from '../reusable/MyCustomDialog'; |
| 18 | +import { TrackingButton, TrackConstants } from 'wdTracking/Index'; | ||
| 18 | 19 | ||
| 19 | @Component | 20 | @Component |
| 20 | export struct MineSettingComponent { | 21 | export struct MineSettingComponent { |
| @@ -74,11 +75,6 @@ export struct MineSettingComponent { | @@ -74,11 +75,6 @@ export struct MineSettingComponent { | ||
| 74 | } | 75 | } |
| 75 | 76 | ||
| 76 | build() { | 77 | build() { |
| 77 | - // Navigation() { | ||
| 78 | - // //滑动区域 | ||
| 79 | - // this.settingList() | ||
| 80 | - // }.titleMode(NavigationTitleMode.Mini) | ||
| 81 | - // .title('设置') | ||
| 82 | Column(){ | 78 | Column(){ |
| 83 | TitleBackComponent({title:"设置"}) | 79 | TitleBackComponent({title:"设置"}) |
| 84 | this.settingList() | 80 | this.settingList() |
| @@ -154,15 +150,19 @@ export struct MineSettingComponent { | @@ -154,15 +150,19 @@ export struct MineSettingComponent { | ||
| 154 | .selectedColor("#ED2800") | 150 | .selectedColor("#ED2800") |
| 155 | .onChange((isOn: boolean) => { | 151 | .onChange((isOn: boolean) => { |
| 156 | if(item.itemType=='push_switch'){ | 152 | if(item.itemType=='push_switch'){ |
| 153 | + trackButtonClick("settingPagePushSwitch") | ||
| 157 | //推送 | 154 | //推送 |
| 158 | SPHelper.default.save(SpConstants.SETTING_PUSH_SWITCH,isOn) | 155 | SPHelper.default.save(SpConstants.SETTING_PUSH_SWITCH,isOn) |
| 159 | }else if(item.itemType=='wifi_switch'){ | 156 | }else if(item.itemType=='wifi_switch'){ |
| 157 | + trackButtonClick("settingPageOnlyWifiNetworkLoadPicture") | ||
| 160 | //wifi 图片 | 158 | //wifi 图片 |
| 161 | SPHelper.default.save(SpConstants.SETTING_WIFI_IMAGE_SWITCH,isOn) | 159 | SPHelper.default.save(SpConstants.SETTING_WIFI_IMAGE_SWITCH,isOn) |
| 162 | }else if(item.itemType=='video_switch'){ | 160 | }else if(item.itemType=='video_switch'){ |
| 161 | + trackButtonClick("settingPageAutomaticallyPlayVideoOnWifiNetwork") | ||
| 163 | //wifi 视频 | 162 | //wifi 视频 |
| 164 | SPHelper.default.save(SpConstants.SETTING_WIFI_VIDEO_SWITCH,isOn) | 163 | SPHelper.default.save(SpConstants.SETTING_WIFI_VIDEO_SWITCH,isOn) |
| 165 | }else if(item.itemType=='suspensionState_switch'){ | 164 | }else if(item.itemType=='suspensionState_switch'){ |
| 165 | + trackButtonClick("settingPagePlayerFloatingWindowSwitchClick") | ||
| 166 | //悬浮窗 | 166 | //悬浮窗 |
| 167 | SPHelper.default.save(SpConstants.SETTING_SUSPENSION_SWITCH,isOn) | 167 | SPHelper.default.save(SpConstants.SETTING_SUSPENSION_SWITCH,isOn) |
| 168 | } | 168 | } |
| @@ -214,13 +214,16 @@ export struct MineSettingComponent { | @@ -214,13 +214,16 @@ export struct MineSettingComponent { | ||
| 214 | .height('54lpx') | 214 | .height('54lpx') |
| 215 | .onClick(() => { | 215 | .onClick(() => { |
| 216 | if (item.itemType == 'account') { | 216 | if (item.itemType == 'account') { |
| 217 | + trackButtonClick("settingPageAccountManagement") | ||
| 217 | let params: Params = { | 218 | let params: Params = { |
| 218 | pageID: 'AccountAndSecurityLayout' | 219 | pageID: 'AccountAndSecurityLayout' |
| 219 | } | 220 | } |
| 220 | WDRouterRule.jumpWithPage(WDRouterPage.settingPage, params) | 221 | WDRouterRule.jumpWithPage(WDRouterPage.settingPage, params) |
| 221 | } else if (item.itemType == 'private_setting') { | 222 | } else if (item.itemType == 'private_setting') { |
| 222 | WDRouterRule.jumpWithPage(WDRouterPage.privacySettingPage) | 223 | WDRouterRule.jumpWithPage(WDRouterPage.privacySettingPage) |
| 224 | + trackButtonClick("settingPagePrivacySettings") | ||
| 223 | } else if (item.itemType == 'clear_cache') { | 225 | } else if (item.itemType == 'clear_cache') { |
| 226 | + trackButtonClick("settingPageClearCache") | ||
| 224 | this.dialogController.open() | 227 | this.dialogController.open() |
| 225 | } | 228 | } |
| 226 | }) | 229 | }) |
| @@ -263,4 +266,8 @@ export struct MineSettingComponent { | @@ -263,4 +266,8 @@ export struct MineSettingComponent { | ||
| 263 | } | 266 | } |
| 264 | this.preferences.on('change', observer); | 267 | this.preferences.on('change', observer); |
| 265 | } | 268 | } |
| 266 | -} | ||
| 269 | +} | ||
| 270 | + | ||
| 271 | +function trackButtonClick(buttonName: string){ | ||
| 272 | + TrackingButton.click(buttonName, TrackConstants.PageName.Setting, TrackConstants.PageName.Setting) | ||
| 273 | +} |
-
Please register or login to post a comment