diff --git a/code/SuperFeature/DistributedAppDev/DistributedRdb/entry/src/main/ets/pages/Index.ets b/code/SuperFeature/DistributedAppDev/DistributedRdb/entry/src/main/ets/pages/Index.ets index 516a47ff6..c25839357 100644 --- a/code/SuperFeature/DistributedAppDev/DistributedRdb/entry/src/main/ets/pages/Index.ets +++ b/code/SuperFeature/DistributedAppDev/DistributedRdb/entry/src/main/ets/pages/Index.ets @@ -66,6 +66,7 @@ struct Index { async aboutToAppear() { Logger.info(TAG, 'aboutToAppear') await this.rdbModel.getRdbStore(); + await this.getData(); this.rdbModel.onDataChangeDetail(this.state.distributedDevice, (result: Array) => { this.showDataChangeDialog(result) }) @@ -113,7 +114,7 @@ struct Index { async onPageShow() { try { // 初始化分部署数据库 - //await this.rdbModel.getRdbStore() + await this.rdbModel.getRdbStore() this.intervalId = setInterval(() => { // 手动侦听应用被拉起的动作 this.getWant() diff --git a/code/SuperFeature/DistributedAppDev/DistributedRdb/entry/src/main/module.json5 b/code/SuperFeature/DistributedAppDev/DistributedRdb/entry/src/main/module.json5 index 9e58f0125..b498f5101 100644 --- a/code/SuperFeature/DistributedAppDev/DistributedRdb/entry/src/main/module.json5 +++ b/code/SuperFeature/DistributedAppDev/DistributedRdb/entry/src/main/module.json5 @@ -50,7 +50,7 @@ ], "requestPermissions": [ { - "name": "ohos.permission.DISTRIBUTED_DATASYNC", + "name": "ohos.permission.DISTRIBUTED_DATASYNC" }, { "name": "ohos.permission.ACCESS_SERVICE_DM"