mirror of
https://gitee.com/openharmony/applications_app_samples
synced 2024-11-24 00:50:03 +00:00
新增关系型数据库本地变更通知
Signed-off-by: sunlian <sunlian@kaihong.com>
This commit is contained in:
parent
b95d5d1103
commit
6d0a37b995
@ -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<Contact>) => {
|
||||
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()
|
||||
|
@ -50,7 +50,7 @@
|
||||
],
|
||||
"requestPermissions": [
|
||||
{
|
||||
"name": "ohos.permission.DISTRIBUTED_DATASYNC",
|
||||
"name": "ohos.permission.DISTRIBUTED_DATASYNC"
|
||||
},
|
||||
{
|
||||
"name": "ohos.permission.ACCESS_SERVICE_DM"
|
||||
|
Loading…
Reference in New Issue
Block a user