diff --git a/index/index.js b/index/index.js index 5e8fa3a..e813443 100644 --- a/index/index.js +++ b/index/index.js @@ -82,7 +82,7 @@ Page({ // 连接指定设备 // if(device.deviceId=="03:02:02:07:65:98"){ // if(device.deviceId=="03:02:02:07:5C:B7"){ - if(device.deviceId=="03:02:02:07:62:A3"){ + if(device.deviceId=="03:02:02:07:5B:41"){ // if(device.deviceId=="03:02:02:07:5E:BE"){ this.connectToDevice(device.deviceId); } @@ -399,7 +399,7 @@ Page({ // const HRPacket = DataPacket.generateReadHRDataPacket(); // SendCommandUtil.sendPackage(this.data.deviceId,HRPacket); - this.sendHealthCommand(0x53) + this.sendHealthCommand(0x66) }, diff --git a/utils/CommonUtil.js b/utils/CommonUtil.js index 0b726ff..911234f 100644 --- a/utils/CommonUtil.js +++ b/utils/CommonUtil.js @@ -372,6 +372,29 @@ const CommonUtil = { } } } + + // 表示隔天了 + if(nextMinute - currentMinute < 1){ + let currentDate = parseInt(data[i].yyyyMMdd); + let nextDate = parseInt(data[i + 1].yyyyMMdd); + if((nextDate - currentDate) == 1){ + for (let j = currentMinute + 1; j <= 1440; j++) { + result.push({ + minute: j, + status: 3, + yyyyMMdd: data[i].yyyyMMdd + }); + } + + for (let j = 0; j < nextMinute; j++) { + result.push({ + minute: j, + status: 3, + yyyyMMdd: data[i + 1].yyyyMMdd + }); + } + } + } } }