Showing
1 changed file
with
7 additions
and
5 deletions
| @@ -2,14 +2,15 @@ import { ENewspaperPageComponent } from 'wdComponent'; | @@ -2,14 +2,15 @@ import { ENewspaperPageComponent } from 'wdComponent'; | ||
| 2 | import { DateTimeUtils, Logger } from 'wdKit'; | 2 | import { DateTimeUtils, Logger } from 'wdKit'; |
| 3 | import common from '@ohos.app.ability.common'; | 3 | import common from '@ohos.app.ability.common'; |
| 4 | import window from '@ohos.window'; | 4 | import window from '@ohos.window'; |
| 5 | -import { TrackingPageBrowse ,TrackConstants} from 'wdTracking/Index'; | 5 | +import { TrackingPageBrowse, TrackConstants } from 'wdTracking/Index'; |
| 6 | 6 | ||
| 7 | const TAG = 'ENewspaper'; | 7 | const TAG = 'ENewspaper'; |
| 8 | + | ||
| 8 | //电子报主页面 | 9 | //电子报主页面 |
| 9 | @Entry | 10 | @Entry |
| 10 | @Component | 11 | @Component |
| 11 | struct ENewspaper { | 12 | struct ENewspaper { |
| 12 | - pageShowTime:number = 0; | 13 | + pageShowTime: number = 0; |
| 13 | // 获取UIAbility上下文 | 14 | // 获取UIAbility上下文 |
| 14 | context: common.UIAbilityContext = getContext(this) as common.UIAbilityContext | 15 | context: common.UIAbilityContext = getContext(this) as common.UIAbilityContext |
| 15 | 16 | ||
| @@ -49,15 +50,16 @@ struct ENewspaper { | @@ -49,15 +50,16 @@ struct ENewspaper { | ||
| 49 | 50 | ||
| 50 | onPageShow() { | 51 | onPageShow() { |
| 51 | this.pageShowTime = DateTimeUtils.getTimeStamp() | 52 | this.pageShowTime = DateTimeUtils.getTimeStamp() |
| 52 | - this.setSystemBar('#80000000','#80000000', '#FFFFFFFF') | 53 | + this.setSystemBar('#00000000', '#00000000', '#FFFFFFFF') |
| 53 | Logger.info(TAG, 'onPageShow'); | 54 | Logger.info(TAG, 'onPageShow'); |
| 54 | } | 55 | } |
| 55 | 56 | ||
| 56 | onPageHide() { | 57 | onPageHide() { |
| 57 | - this.setSystemBar('#FFFFFFFF','#00000000', '#000000') | 58 | + this.setSystemBar('#FFFFFFFF', '#00000000', '#000000') |
| 58 | Logger.info(TAG, 'onPageHide'); | 59 | Logger.info(TAG, 'onPageHide'); |
| 59 | //页面浏览 | 60 | //页面浏览 |
| 60 | - TrackingPageBrowse.trackCommonPageExposureEnd(TrackConstants.PageName.NewsPaperPage,TrackConstants.PageName.NewsPaperPage,Math.floor((DateTimeUtils.getTimeStamp() - this.pageShowTime)/1000)) | 61 | + TrackingPageBrowse.trackCommonPageExposureEnd(TrackConstants.PageName.NewsPaperPage, |
| 62 | + TrackConstants.PageName.NewsPaperPage, Math.floor((DateTimeUtils.getTimeStamp() - this.pageShowTime) / 1000)) | ||
| 61 | } | 63 | } |
| 62 | 64 | ||
| 63 | onBackPress() { | 65 | onBackPress() { |
-
Please register or login to post a comment