From dcdb145cb128fe8aeb93951d4b54a3139faf81e4 Mon Sep 17 00:00:00 2001 From: subing008 <275120420@qq.com> Date: Fri, 29 Aug 2025 14:58:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9EJS-B68T=E8=AE=BE=E5=A4=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BLEPages/child/B68T.vue | 42 ++-------------------------------------- pages/search/devType.vue | 6 ++++++ 2 files changed, 8 insertions(+), 40 deletions(-) diff --git a/BLEPages/child/B68T.vue b/BLEPages/child/B68T.vue index d6fdaa8..5eb9e2e 100644 --- a/BLEPages/child/B68T.vue +++ b/BLEPages/child/B68T.vue @@ -127,14 +127,6 @@ uni.onBluetoothAdapterStateChange(function(res) { that.$store.commit("changeBluetooth", res.available); }) - } else { - // uni.showToast({ - // title: '设备错误,请重新连接', - // icon: "error" - // }) - // uni.switchTab({ - // url: "/pages/index/index" - // }) } }, onUnload: function() { @@ -399,7 +391,7 @@ characteristicId: that.write, value: buffer, success: () => { - + console.log("发送成功") }, fail: (err) => { uni.showToast({ @@ -410,37 +402,7 @@ }, // 保存测量结果 handleGetMeasure() { - // let that = this - // if (that.info.active == 3 && that.weight == 0 && that.Ycount != 0) { - // console.log("1", that.weight, that.Ycount) - // that.weight = that.Ycount - // } else if (that.info.active == 3 && that.weight != 0 && that.Ycount != 0) { - // console.log("2", that.weight, that.Ycount) - // that.weight = Number(that.Ycount) - Number(that.weight) - // } - // if (that.info.active == 2) { - // that.time_m = Math.floor((that.time % 3600) / 60) - // that.time_s = that.time % 60 - // } - // that.$model.getskipResult({ - // aud_id: uni.getStorageSync('userid'), - // kcal: Math.floor(that.kcal), - // num: that.weight, - // time_m: Number(that.time_m), - // time_s: that.time_s, - // type: that.info.active == 1 ? 'free' : that.info.active == 2 ? 'time' : 'num' - // }).then(res => { - // console.log("保存", that.time, res) - // if (res.code == 0) { - // that.bpm = that.weight / (that.time / 60) - // that.iswrapper = true - // that.$store.dispatch('getUserInfo', { - // aud_id: uni.getStorageSync('userid') - // }) - // } else { - // that.$tools.msg(res.msg) - // } - // }) + }, onBLEConnectionStateChange() { let that = this diff --git a/pages/search/devType.vue b/pages/search/devType.vue index 68f94f3..0c82b98 100644 --- a/pages/search/devType.vue +++ b/pages/search/devType.vue @@ -208,6 +208,12 @@ } return; } + if (device.name.indexOf("JS-B68T") != -1 || (device.localName && device.localName.toLowerCase().indexOf('JS-B68T') != -1)) { + clearTimeout(myTime); + device.macAddr = device.deviceId + that.handleDevice(device,'JS-B68T') + return; + } }) }); that.handleMyTime()