|
@@ -4,6 +4,7 @@ import { window } from '@kit.ArkUI';
|
|
|
import {
|
|
import {
|
|
|
AppStorageKeyCollect, IBestInit, RelationalStoreUtils, YTAvoid, YTBreakPoint, YTLog
|
|
AppStorageKeyCollect, IBestInit, RelationalStoreUtils, YTAvoid, YTBreakPoint, YTLog
|
|
|
} from 'basic';
|
|
} from 'basic';
|
|
|
|
|
+import BuildProfile from 'BuildProfile';
|
|
|
|
|
|
|
|
const DOMAIN = 0x0000;
|
|
const DOMAIN = 0x0000;
|
|
|
|
|
|
|
@@ -22,6 +23,17 @@ export default class EntryAbility extends UIAbility {
|
|
|
hilog.error(DOMAIN, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err));
|
|
hilog.error(DOMAIN, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err));
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ // 动态引入: 仅在 DEBUG 模式下引入该模块
|
|
|
|
|
+ if (BuildProfile.DEBUG) {
|
|
|
|
|
+ const pkg = '@hadss/debug-db';
|
|
|
|
|
+ import(pkg).then(async (ns: ESObject) => {
|
|
|
|
|
+ ns.DebugDB.initialize(this.context, { port: 8080, defaultStart: true });
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ RelationalStoreUtils.initReplayCloudStore(this.context, null, BuildProfile.DEBUG)
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
YTLog.init({
|
|
YTLog.init({
|
|
|
tag: "YTLog",
|
|
tag: "YTLog",
|
|
|
domain: 0x0000,
|
|
domain: 0x0000,
|
|
@@ -66,7 +78,6 @@ export default class EntryAbility extends UIAbility {
|
|
|
AppStorage.setOrCreate(AppStorageKeyCollect.SCREEN_WIDTH, px2vp(size.width))
|
|
AppStorage.setOrCreate(AppStorageKeyCollect.SCREEN_WIDTH, px2vp(size.width))
|
|
|
AppStorage.setOrCreate(AppStorageKeyCollect.SCREEN_HEIGHT, px2vp(size.height))
|
|
AppStorage.setOrCreate(AppStorageKeyCollect.SCREEN_HEIGHT, px2vp(size.height))
|
|
|
})
|
|
})
|
|
|
- RelationalStoreUtils.initReplayCloudStore(this.context)
|
|
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
}
|
|
}
|