完善小程序权限未开启的引导
This commit is contained in:
parent
21a587d9ad
commit
151328fd33
@ -88,7 +88,8 @@
|
||||
title: '加载中',
|
||||
mask: true
|
||||
})
|
||||
const accountInfo = wx.getAccountInfoSync()
|
||||
const accountInfo = uni.getAccountInfoSync()
|
||||
console.log(accountInfo)
|
||||
getApp().globalData.appid = accountInfo.miniProgram.appId
|
||||
getApp().globalData.envVersion = accountInfo.miniProgram.envVersion
|
||||
this.deviceInfo = await this.getDeviceInfo()
|
||||
|
||||
@ -160,6 +160,15 @@ export const useBluetoothStore = defineStore('ble', {
|
||||
content: '蓝牙功能需要附近设备权限,请前往设置开启微信的附近设备权限后再试',
|
||||
showCancel: false,
|
||||
confirmText: '确定',
|
||||
success(res) {
|
||||
if (res.confirm) {
|
||||
uni.openAppAuthorizeSetting({
|
||||
success (res) {
|
||||
console.log(res)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
resolve(false)
|
||||
@ -430,11 +439,15 @@ export const useBluetoothStore = defineStore('ble', {
|
||||
title: '提示',
|
||||
content: '安卓手机蓝牙功能需要定位权限,请前往设置开启微信的定位权限后再试',
|
||||
showCancel: false,
|
||||
confirmText: '重试',
|
||||
success(res) {
|
||||
if (res.confirm) {
|
||||
that.getBluetoothDevices()
|
||||
uni.openAppAuthorizeSetting({
|
||||
success (res) {
|
||||
console.log(res)
|
||||
}
|
||||
})
|
||||
}
|
||||
uni.navigateBack()
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -464,6 +477,11 @@ export const useBluetoothStore = defineStore('ble', {
|
||||
content: '长时间未搜索到任何设备,请确认微信的附近设备权限开启后再试',
|
||||
showCancel: false,
|
||||
success() {
|
||||
uni.openAppAuthorizeSetting({
|
||||
success (res) {
|
||||
console.log(res)
|
||||
}
|
||||
})
|
||||
uni.navigateBack()
|
||||
}
|
||||
})
|
||||
@ -507,7 +525,15 @@ export const useBluetoothStore = defineStore('ble', {
|
||||
title: '提示',
|
||||
content: '蓝牙尚未打开,请先打开蓝牙',
|
||||
showCancel: false,
|
||||
confirmText: '确定',
|
||||
success(res) {
|
||||
if (res.confirm) {
|
||||
wx.openSystemBluetoothSetting({
|
||||
success (res) {
|
||||
console.log(res)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
} else if(this.bluetoothStatus === 2 || this.bluetoothStatus === 3) {
|
||||
uni.showModal({
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user