From 002a1e84d850d594575198b9f27600b158dcb086 Mon Sep 17 00:00:00 2001 From: lvyuankang <1344032923@qq.com> Date: Mon, 26 Aug 2024 16:00:45 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A8=AD=E5=82=99=E6=B3=A8=E5=86=8A=E6=8F=90?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- entry/src/main/ets/common/service/terminalService.ts | 3 +++ entry/src/main/ets/pages/Index.ets | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) 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()