|
|
@ -38,6 +38,14 @@ Page({ |
|
|
|
|
|
|
|
btntest3(event){ |
|
|
|
var that = this |
|
|
|
let deviceNum = "yxwl01680000000362" |
|
|
|
this.startFingerprint(deviceNum) |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
/* |
|
|
|
btntest3(event){ |
|
|
|
var that = this |
|
|
|
let managerTelephone = "19270949446" |
|
|
|
let managerPassword = "123456" |
|
|
|
let userTelephone = "38580151200" |
|
|
@ -53,7 +61,7 @@ Page({ |
|
|
|
this.startFingerprint(managerTelephone, managerPassword, userTelephone, userPassword, userStartTime, userEndTime, |
|
|
|
fpDataLength, fpStartTime, fpEndTime, times, recycleTime) |
|
|
|
}, |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
//获取输入框的数据
|
|
|
|
getmsg(event){ |
|
|
@ -148,8 +156,41 @@ Page({ |
|
|
|
console.log(b) |
|
|
|
app.globalData.ble.send(cmd, b, length) |
|
|
|
}, |
|
|
|
|
|
|
|
startFingerprint(deviceNum) { |
|
|
|
|
|
|
|
wx.showLoading({ |
|
|
|
title: "正在发送...", |
|
|
|
}); |
|
|
|
setTimeout(() => { |
|
|
|
wx.hideLoading() |
|
|
|
}, 1000); |
|
|
|
|
|
|
|
let cmd = 0x29 |
|
|
|
let dn = util.stringToUint8ArrayWithPadding(deviceNum, 20, 'F') |
|
|
|
let data = 0x00360008 |
|
|
|
|
|
|
|
let length = 1 + 20 + 4 + 1 + 1 |
|
|
|
|
|
|
|
let b = new Uint8Array(length) |
|
|
|
|
|
|
|
b[0] = cmd |
|
|
|
b.set(dn, 1) |
|
|
|
|
|
|
|
b[21] = (data>>24)&0xff; |
|
|
|
b[22] = (data>>16)&0xff; |
|
|
|
b[23] = (data>>8)&0xff; |
|
|
|
b[24] = data&0xff; |
|
|
|
b[25] = 0x03 |
|
|
|
b[26] = 0x01 |
|
|
|
|
|
|
|
console.log(b) |
|
|
|
app.globalData.ble.send(cmd, b, length) |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
startFingerprint(managerTelephone, managerPassword, userTelephone, userPassword, userStartTime, userEndTime, |
|
|
|
|
|
|
|
startFingerprint_1(managerTelephone, managerPassword, userTelephone, userPassword, userStartTime, userEndTime, |
|
|
|
fpDataLength, fpStartTime, fpEndTime, times, recycleTime) { |
|
|
|
|
|
|
|
wx.showLoading({ |
|
|
@ -212,9 +253,9 @@ Page({ |
|
|
|
|
|
|
|
console.log(b) |
|
|
|
app.globalData.ble.send(cmd, b, length) |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|