diff --git a/pages.json b/pages.json index e51e3c5..c8331f0 100644 --- a/pages.json +++ b/pages.json @@ -21,9 +21,6 @@ { "path": "pages/mine/mine" }, - { - "path": "pages/index/index" - }, { "path": "pages/userInfo/userInfo", "style": { diff --git a/pages/index/index.vue b/pages/index/index.vue deleted file mode 100644 index dc0afa9..0000000 --- a/pages/index/index.vue +++ /dev/null @@ -1,205 +0,0 @@ - - - - - diff --git a/stores/bluetooth.js b/stores/bluetooth.js index 9bbf236..33a66f1 100644 --- a/stores/bluetooth.js +++ b/stores/bluetooth.js @@ -373,6 +373,19 @@ export const useBluetoothStore = defineStore('ble', { }, fail: async function (res) { console.log('开始搜索失败', res) + if(res.errno === 1509008) { + uni.showModal({ + title: '提示', + content: '安卓手机蓝牙功能需要定位权限,请前往设置开启微信的定位权限后再试', + showCancel: false, + confirmText: '重试', + success(res) { + if (res.confirm) { + that.getBluetoothDevices() + } + } + }) + } if(res.errCode === 10000) { // 重新初始化蓝牙适配器 await that.initBluetooth() @@ -550,6 +563,10 @@ export const useBluetoothStore = defineStore('ble', { }) }, fail(res) { + if(res.errno === 1509007) { + resolve(true) + return + } uni.showToast({ title: '连接失败,请靠近设备并保持设备处于唤醒状态', icon: 'none'