yuzhilin

webview 获取App公共信息 补充

@@ -9,13 +9,17 @@ import router from '@ohos.router'; @@ -9,13 +9,17 @@ import router from '@ohos.router';
9 import Url from '@ohos.url' 9 import Url from '@ohos.url'
10 import { ContentDTO, PhotoListBean } from 'wdBean'; 10 import { ContentDTO, PhotoListBean } from 'wdBean';
11 import { handleJsCallAppService } from './JsCallAppService' 11 import { handleJsCallAppService } from './JsCallAppService'
12 - 12 +import { HttpUtils } from 'wdNetwork/Index';
13 const TAG = 'JsBridgeBiz' 13 const TAG = 'JsBridgeBiz'
14 14
15 class AppInfo { 15 class AppInfo {
16 plat: string = '' 16 plat: string = ''
17 system: string = '' 17 system: string = ''
18 networkStatus: number = 1 18 networkStatus: number = 1
  19 + screenStatusBarHeight: number = 40 // TODO 这里需要动态获取
  20 + screenTabbarSafeHeight: number = 42 // TODO 这里需要动态获取
  21 + imei: string = HttpUtils.getImei()
  22 + device_id: string = HttpUtils.getDeviceId()
19 // TODO 完善 23 // TODO 完善
20 } 24 }
21 25
1 import { Action } from 'wdBean'; 1 import { Action } from 'wdBean';
2 import { SpacialTopicPageComponent } from 'wdComponent' 2 import { SpacialTopicPageComponent } from 'wdComponent'
3 import { CommonConstants } from 'wdConstant' 3 import { CommonConstants } from 'wdConstant'
4 -import { Logger } from 'wdKit' 4 +import { Logger, WindowModel } from 'wdKit'
5 import router from '@ohos.router'; 5 import router from '@ohos.router';
6 6
7 const TAG = 'SpacialTopicPage'; 7 const TAG = 'SpacialTopicPage';
@@ -27,6 +27,7 @@ struct SpacialTopicPage { @@ -27,6 +27,7 @@ struct SpacialTopicPage {
27 } 27 }
28 28
29 aboutToAppear() { 29 aboutToAppear() {
  30 + WindowModel.shared.setWindowLayoutFullScreen(true)
30 Logger.info(TAG, 'aboutToAppear'); 31 Logger.info(TAG, 'aboutToAppear');
31 let action: Action = router.getParams() as Action 32 let action: Action = router.getParams() as Action
32 this.action = action 33 this.action = action
@@ -34,6 +35,7 @@ struct SpacialTopicPage { @@ -34,6 +35,7 @@ struct SpacialTopicPage {
34 35
35 aboutToDisappear() { 36 aboutToDisappear() {
36 Logger.info(TAG, 'aboutToDisappear'); 37 Logger.info(TAG, 'aboutToDisappear');
  38 + WindowModel.shared.setWindowLayoutFullScreen(false)
37 } 39 }
38 40
39 onPageShow() { 41 onPageShow() {