diff --git a/entry/src/main/ets/common/service/terminalService.ts b/entry/src/main/ets/common/service/terminalService.ts index 30758fd3..291b26ad 100644 --- a/entry/src/main/ets/common/service/terminalService.ts +++ b/entry/src/main/ets/common/service/terminalService.ts @@ -17,6 +17,9 @@ export async function getDeviceInfo(context) { message: `请先进行设备注册`, duration: 3000 }); + globalThis.type='1' + globalThis.title=decodeURIComponent('请先进行设备注册') + globalThis.errorDialog.open() resolve('') } else { const fileData=JSON.parse(data) diff --git a/entry/src/main/ets/pages/Index.ets b/entry/src/main/ets/pages/Index.ets index 485eb300..ac8f129b 100644 --- a/entry/src/main/ets/pages/Index.ets +++ b/entry/src/main/ets/pages/Index.ets @@ -417,7 +417,10 @@ struct Index { await getUDP(this.context, false) this.loading = false console.log('globalThis.deviceNo000') - await getDeviceInfo(this.context) + const data= await getDeviceInfo(this.context) + if(data==''){ + return + } await getCarInfo() await getUDP2(this.context, false) getTCP()