diff --git a/pages/motorTorsion/motorTorsion.vue b/pages/motorTorsion/motorTorsion.vue index 0b58f74..f620cf4 100644 --- a/pages/motorTorsion/motorTorsion.vue +++ b/pages/motorTorsion/motorTorsion.vue @@ -54,7 +54,9 @@ import { updateLockSettingRequest } from '@/api/setting' import { useBluetoothStore } from '@/stores/bluetooth' import { useUserStore } from '@/stores/user' + import { useBasicStore } from '../../stores/basic' + const $basic = useBasicStore() const $bluetooth = useBluetoothStore() const $user = useUserStore() @@ -67,6 +69,10 @@ }) const updateValue = async val => { + const netWork = await $basic.getNetworkType() + if (!netWork) { + return + } if (pending.value || value.value === val) return pending.value = true uni.showLoading({ @@ -81,6 +87,7 @@ withParams: true }) $bluetooth.closeBluetoothConnection() + console.log('code-', code) if (code === 0) { const { code, message } = await updateLockSettingRequest({ lockId: $bluetooth.currentLockInfo.lockId,