feat:天平控制释放问题

This commit is contained in:
houjunxiang
2026-01-17 13:58:58 +08:00
parent 0e9d499050
commit cc5cb34b18

View File

@@ -1053,11 +1053,7 @@ const listenDeviceData = () => {
uni.$on('deviceData', res => { uni.$on('deviceData', res => {
switch (res.deviceType) { switch (res.deviceType) {
case 'balance': case 'balance':
console.log(res.deviceId)
if (currentAuncel.value.id === res.deviceId) { if (currentAuncel.value.id === res.deviceId) {
console.log(res)
currentAuncel.value.weightData = res.weightData currentAuncel.value.weightData = res.weightData
currentAuncel.value.weightUnit = res.weightUnit currentAuncel.value.weightUnit = res.weightUnit
currentAuncel.value.weightStable = res.weightStable currentAuncel.value.weightStable = res.weightStable
@@ -1084,7 +1080,7 @@ const listenDeviceData = () => {
}) })
//控制设备状态 //控制设备状态
uni.$on('controlDevice', res => { uni.$on('controlDevice', res => {
if (currentAuncel.value.id === res.deviceId) { if (currentAuncel.value.id === res.deviceId && !res.isControl) {
currentAuncel.value.id = '' currentAuncel.value.id = ''
currentAuncel.value.name = '' currentAuncel.value.name = ''
currentAuncel.value.code = '' currentAuncel.value.code = ''