新增JS-B68T设备
This commit is contained in:
parent
8d94ac7da7
commit
dcdb145cb1
|
|
@ -127,14 +127,6 @@
|
||||||
uni.onBluetoothAdapterStateChange(function(res) {
|
uni.onBluetoothAdapterStateChange(function(res) {
|
||||||
that.$store.commit("changeBluetooth", res.available);
|
that.$store.commit("changeBluetooth", res.available);
|
||||||
})
|
})
|
||||||
} else {
|
|
||||||
// uni.showToast({
|
|
||||||
// title: '设备错误,请重新连接',
|
|
||||||
// icon: "error"
|
|
||||||
// })
|
|
||||||
// uni.switchTab({
|
|
||||||
// url: "/pages/index/index"
|
|
||||||
// })
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onUnload: function() {
|
onUnload: function() {
|
||||||
|
|
@ -399,7 +391,7 @@
|
||||||
characteristicId: that.write,
|
characteristicId: that.write,
|
||||||
value: buffer,
|
value: buffer,
|
||||||
success: () => {
|
success: () => {
|
||||||
|
console.log("发送成功")
|
||||||
},
|
},
|
||||||
fail: (err) => {
|
fail: (err) => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
|
@ -410,37 +402,7 @@
|
||||||
},
|
},
|
||||||
// 保存测量结果
|
// 保存测量结果
|
||||||
handleGetMeasure() {
|
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() {
|
onBLEConnectionStateChange() {
|
||||||
let that = this
|
let that = this
|
||||||
|
|
|
||||||
|
|
@ -208,6 +208,12 @@
|
||||||
}
|
}
|
||||||
return;
|
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()
|
that.handleMyTime()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue