1. 修改断开设备连接位置

2. ios添加未打开微信定位权限引导
This commit is contained in:
范鹏 2024-09-05 18:28:56 +08:00
parent 855068a3f9
commit f39916214b
4 changed files with 22 additions and 4 deletions

View File

@ -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(() => {

View File

@ -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,

View File

@ -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

View File

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