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: '提示',