zhangbo1_wd

意图框架拉起,需要网络库的初始化。这里调整下相关初始化位置。

... ... @@ -4,7 +4,7 @@ import UIAbility from '@ohos.app.ability.UIAbility';
import Want from '@ohos.app.ability.Want';
import window from '@ohos.window';
import { BusinessError } from '@ohos.base';
import { DeviceUtil, EmitterEventId, EmitterUtils, Logger, WindowModel } from 'wdKit';
import { DeviceUtil, EmitterEventId, EmitterUtils, Logger, SPHelper, WindowModel } from 'wdKit';
import { ConfigurationConstant } from '@kit.AbilityKit';
import { StartupManager } from '../startupmanager/StartupManager';
... ... @@ -14,6 +14,10 @@ const TAG = 'EntryAbility'
export default class EntryAbility extends UIAbility {
onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void {
StartupManager.sharedInstance().appOnCreate(want, launchParam, this.context)
if (SPHelper.default.getSync('isPrivacy', true)) {
// 同意隐私协议,这里直接初始化。TODO 耗时梳理
StartupManager.sharedInstance().appAgreedProtocol()
}
Logger.info(TAG, 'Ability onCreate');
// 还没深色模式需求,暂直接不跟随系统。
... ...
... ... @@ -97,8 +97,8 @@ struct LaunchPage {
this.dialogController.open();
// }
} else {
StartupManager.sharedInstance().appAgreedProtocol()
// 挪到ability里处理了。
// StartupManager.sharedInstance().appAgreedProtocol()
//需要根据请求数据判断是否需要进入广告页,广告数据为nil则直接跳转到首页
//获取本地存储的启动页数据
... ...
... ... @@ -90,13 +90,14 @@ export class StartupManager {
Logger.debug(TAG, "App 已同意隐私等协议,开始必要初始化")
this.initCheckDeviceId()
this.initNetwork()
this.initMpaas()
this.initSensorData()
this.initTingyun()
this.initNetwork()
this.initGeTuiPush()
this.initUmengStat()
... ...