diff --git a/App.vue b/App.vue
index 068b41e..092e580 100644
--- a/App.vue
+++ b/App.vue
@@ -39,11 +39,12 @@
// #ifdef MP-WEIXIN
// 检查强制升级
this.updateMiniProgram()
- // #endif
- // 监听蓝牙开关状态
- this.onBluetoothState()
// 设置voip配置
this.setVoipConfig()
+ // #endif
+
+ // 监听蓝牙开关状态
+ this.onBluetoothState()
// 检查蓝牙权限
const checkResult = await this.checkSetting()
console.log(checkResult)
diff --git a/pages/main/customBox.vue b/pages/main/customBox.vue
index c616fe2..50031ff 100644
--- a/pages/main/customBox.vue
+++ b/pages/main/customBox.vue
@@ -38,9 +38,11 @@
const time = ref(0)
onMounted(async () => {
+ // #ifdef MP-WEIXIN
const accountInfo = uni.getAccountInfoSync()
getApp().globalData.appid = accountInfo.miniProgram.appId
getApp().globalData.envVersion = accountInfo.miniProgram.envVersion
+ // #endif
const result = await passthrough({
request_method: 'POST',
diff --git a/pages/main/home.vue b/pages/main/home.vue
index 93cdf65..9fe1cd9 100644
--- a/pages/main/home.vue
+++ b/pages/main/home.vue
@@ -218,9 +218,11 @@
title: '加载中',
mask: true
})
+ // #ifdef MP-WEIXIN
const accountInfo = uni.getAccountInfoSync()
getApp().globalData.appid = accountInfo.miniProgram.appId
getApp().globalData.envVersion = accountInfo.miniProgram.envVersion
+ // #endif
this.deviceInfo = await this.getDeviceInfo()
const token = getStorage('token')
if (token) {
@@ -243,9 +245,12 @@
await this.homeLogin()
this.pending = false
uni.hideLoading()
+ console.log('登录成功')
}
+ // #ifdef MP-WEIXIN
const _data = JSON.parse(JSON.stringify(data))
this.shareJump(_data)
+ // #endif
},
methods: {
timeFormat,
@@ -403,6 +408,7 @@
homeLogin() {
const that = this
return new Promise(resolve => {
+ // #ifdef MP-WEIXIN
uni.login({
provider: 'weixin',
async success(loginRes) {
@@ -437,6 +443,8 @@
resolve(false)
}
})
+ // #endif
+ resolve(false)
})
},
changeRadio() {
diff --git a/pages/main/lockDetail.vue b/pages/main/lockDetail.vue
index fd85034..71ec3d1 100644
--- a/pages/main/lockDetail.vue
+++ b/pages/main/lockDetail.vue
@@ -172,7 +172,11 @@
>
掌静脉
-
+
授权管理员
@@ -201,6 +206,7 @@
操作记录
@@ -223,6 +229,7 @@
{
+ // #ifdef MP-WEIXIN
uni.getSetting({
async success(res) {
const bluetooth = res.authSetting['scope.bluetooth']
@@ -924,6 +925,8 @@ export const useBluetoothStore = defineStore('ble', {
resolve(false)
}
})
+ // #endif
+ resolve(false)
})
},
// 连接蓝牙设备+获取设备服务+获取设备特征值