From f39916214be2d755c5ab47d836eab2bee8e2527c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8C=83=E9=B9=8F?= Date: Thu, 5 Sep 2024 18:28:56 +0800 Subject: [PATCH] =?UTF-8?q?1.=20=E4=BF=AE=E6=94=B9=E6=96=AD=E5=BC=80?= =?UTF-8?q?=E8=AE=BE=E5=A4=87=E8=BF=9E=E6=8E=A5=E4=BD=8D=E7=BD=AE=202.=20i?= =?UTF-8?q?os=E6=B7=BB=E5=8A=A0=E6=9C=AA=E6=89=93=E5=BC=80=E5=BE=AE?= =?UTF-8?q?=E4=BF=A1=E5=AE=9A=E4=BD=8D=E6=9D=83=E9=99=90=E5=BC=95=E5=AF=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/lockDetail/lockDetail.vue | 2 +- pages/passwordDetail/passwordDetail.vue | 2 +- pages/passwordList/passwordList.vue | 4 ++-- pages/selectAddress/selectAddress.vue | 18 ++++++++++++++++++ 4 files changed, 22 insertions(+), 4 deletions(-) diff --git a/pages/lockDetail/lockDetail.vue b/pages/lockDetail/lockDetail.vue index c8b24a7..901c600 100644 --- a/pages/lockDetail/lockDetail.vue +++ b/pages/lockDetail/lockDetail.vue @@ -180,8 +180,8 @@ export default { openTime: parseInt(new Date().getTime() / 1000) + this.time, onlineToken: this.onlineToken }) + this.closeBluetoothConnection() if(code === 0) { - this.closeBluetoothConnection() this.show = true this.type = type setTimeout(() => { diff --git a/pages/passwordDetail/passwordDetail.vue b/pages/passwordDetail/passwordDetail.vue index 6b0c72b..6a7a0bc 100644 --- a/pages/passwordDetail/passwordDetail.vue +++ b/pages/passwordDetail/passwordDetail.vue @@ -78,8 +78,8 @@ export default { startTime: timestamp, endTime: timestamp }) + that.closeBluetoothConnection() if(code === 0) { - that.closeBluetoothConnection() const { code: requestCode, message } = await deletePsaawordRequest({ lockId: that.currentLockInfo.lockId, keyboardPwdId: that.currentPasswordInfo.keyboardPwdId, diff --git a/pages/passwordList/passwordList.vue b/pages/passwordList/passwordList.vue index afc7b0e..6e1330a 100644 --- a/pages/passwordList/passwordList.vue +++ b/pages/passwordList/passwordList.vue @@ -120,8 +120,8 @@ export default { startTime: timestamp, endTime: timestamp }) + that.closeBluetoothConnection() if(code === 0) { - that.closeBluetoothConnection() const { code: requestCode, message } = await deletePsaawordRequest({ lockId: that.currentLockInfo.lockId, keyboardPwdId: password.keyboardPwdId, @@ -180,8 +180,8 @@ export default { uid: that.userInfo.uid.toString(), keyId: that.currentLockInfo.keyId.toString() }) + that.closeBluetoothConnection() if(code === 0) { - that.closeBluetoothConnection() const { code: requestCode, message } = await resetPsaawordListRequest({ lockId: that.currentLockInfo.lockId, passwordKey: that.currentLockInfo.bluetooth.passwordKey diff --git a/pages/selectAddress/selectAddress.vue b/pages/selectAddress/selectAddress.vue index 516ade8..c9d4096 100644 --- a/pages/selectAddress/selectAddress.vue +++ b/pages/selectAddress/selectAddress.vue @@ -137,6 +137,7 @@ export default { } }, fail (res) { + console.log('获取地理位置信息失败', res) if(res.errMsg === 'getLocation:fail auth deny') { uni.showModal({ title: '提示', @@ -154,6 +155,23 @@ export default { } } }) + } else if(res.errMsg === 'getLocation:fail system permission denied') { + uni.showModal({ + title: '提示', + content: '定位失败,请打开微信的位置权限', + confirmText: '去打开', + cancelText: '跳过', + success (res) { + if (res.confirm) { + uni.openAppAuthorizeSetting() + } else { + that.routeJump({ + type: 'redirectTo', + name: 'bindLock' + }) + } + } + }) } else { uni.showModal({ title: '提示',