新增JS-B68T设备

This commit is contained in:
subing008 2025-08-29 14:58:27 +08:00
parent 8d94ac7da7
commit dcdb145cb1
2 changed files with 8 additions and 40 deletions

View File

@ -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

View File

@ -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()