This commit is contained in:
范鹏 2025-05-17 18:22:50 +08:00
parent 06ebc96086
commit 7397461512
3 changed files with 58 additions and 44 deletions

View File

@ -15,9 +15,7 @@
"desc" : "蓝牙将用于控制和管理您的智能门锁" "desc" : "蓝牙将用于控制和管理您的智能门锁"
} }
}, },
"requiredPrivateInfos": [ "requiredPrivateInfos" : [ "getLocation" ],
"getLocation"
],
"usingComponents" : true, "usingComponents" : true,
"lazyCodeLoading" : "requiredComponents", "lazyCodeLoading" : "requiredComponents",
"optimization" : { "optimization" : {

View File

@ -39,7 +39,7 @@
<up-icon <up-icon
name="question-circle-fill" name="question-circle-fill"
@click="tip" @click="tip"
size="52" size="52rpx"
color="rgba(0,0,0,0.35)" color="rgba(0,0,0,0.35)"
></up-icon> ></up-icon>
</view> </view>

View File

@ -1346,8 +1346,24 @@ export const useBluetoothStore = defineStore('ble', {
} }
}) })
if (code === 0 && data.outputParams) { if (code === 0) {
that.parsingCharacteristicValue(that.hexToArray(data.outputParams)) if (data.status === '') {
that.parsingCharacteristicValue(that.hexToArray(data.outputParams.result))
} else {
let code = -10
if (data.status === 'FailedOperation.ActionUnreachable') {
code = -11
}
uni.showToast({
title: `设备状态异常,${code}`,
icon: 'none'
})
characteristicValueCallback({
code: -10,
message: '设备状态异常'
})
}
} else { } else {
characteristicValueCallback({ characteristicValueCallback({
code, code,