|
|
@ -934,11 +934,11 @@ Page({ |
|
|
|
order: 6212, |
|
|
|
operateMode: 12, |
|
|
|
action: 2, |
|
|
|
// cardNo: info.password,
|
|
|
|
passwordIndex: passwordIndex, |
|
|
|
cardNo: info.password, |
|
|
|
type: 12, |
|
|
|
cardName: _this.data.personLi.name, |
|
|
|
roomName: deviceinfo.roomName |
|
|
|
roomName: deviceinfo.roomName, |
|
|
|
cardIndex: info.index |
|
|
|
} |
|
|
|
} |
|
|
|
console.log(dataPasswod, 'dataPasswod', info) |
|
|
@ -1094,6 +1094,7 @@ Page({ |
|
|
|
}) |
|
|
|
var cgInfo = this.data.cgInfo |
|
|
|
var personLi = this.data.FpList[index] |
|
|
|
passwordLiAll = personLi |
|
|
|
var deviceinfo = this.data.deviceinfo |
|
|
|
var info = JSON.parse(personLi.content) |
|
|
|
var person = this.data.personLi |
|
|
@ -1101,25 +1102,42 @@ Page({ |
|
|
|
console.log(personLi, "personLi"); |
|
|
|
this.getFpIndex(index, function (data) { |
|
|
|
if (data.length > 0) { |
|
|
|
var FPindex = data[0].face |
|
|
|
// 删除
|
|
|
|
var dataFP = { |
|
|
|
code: "", |
|
|
|
code: "lwj/fpOperate", |
|
|
|
data: { |
|
|
|
fpIndex: info.index, |
|
|
|
lockerId: deviceinfo.deviceNum, |
|
|
|
imei: deviceinfo.imei, |
|
|
|
lockerUserId: info.userPassword, |
|
|
|
keyId: info.userPassword, |
|
|
|
operateMode: 18, |
|
|
|
order: 6218, |
|
|
|
roomName: deviceinfo.roomName, |
|
|
|
cardName: cardName, |
|
|
|
startTime: passwordStartTime, |
|
|
|
endTime: passwordEndTime, |
|
|
|
action: 2 |
|
|
|
startTime: personLi.startTime, |
|
|
|
endTime: personLi.endTime, |
|
|
|
action: 2, |
|
|
|
cardName: personLi.name |
|
|
|
} |
|
|
|
} |
|
|
|
console.log(dataFP); |
|
|
|
WXAPI.sendCommand(dataFP).then(res => { |
|
|
|
console.log(res, "获取索引"); |
|
|
|
if(res.success){ |
|
|
|
// fingerprintIndex = res.data.index
|
|
|
|
fingerprintIndex = JSON.parse(personLi.content).index |
|
|
|
serialNumber = res.data.serialNumber |
|
|
|
taskId = 72 |
|
|
|
_this.initBluetooth() |
|
|
|
}else{ |
|
|
|
wx.hideLoading() |
|
|
|
wx.showToast({ |
|
|
|
title: res.msg, |
|
|
|
mask: true, |
|
|
|
icon: 'none', |
|
|
|
duration: 2000 |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
} else { |
|
|
|
wx.hideLoading() |
|
|
|
wx.showToast({ |
|
|
@ -1543,6 +1561,15 @@ Page({ |
|
|
|
console.debug('bytes', bytes) |
|
|
|
that.sendBytes(bytes) |
|
|
|
}, |
|
|
|
onDelFingerprint: function() { |
|
|
|
var that = this |
|
|
|
wx.showLoading({ |
|
|
|
title: '删除指纹中', |
|
|
|
}) |
|
|
|
var bytes = plugin.delFingerprint(lockDevice.name, basecode, fingerprintIndex) |
|
|
|
console.debug('bytes', bytes); |
|
|
|
that.sendBytes(bytes) |
|
|
|
}, |
|
|
|
onDelPincode: function () { |
|
|
|
var that = this |
|
|
|
wx.showLoading({ |
|
|
@ -2892,7 +2919,7 @@ Page({ |
|
|
|
wx.hideLoading() |
|
|
|
if (data.code != 200) { |
|
|
|
var datacom = { |
|
|
|
code: "lwj/c", |
|
|
|
code: "lwj/cardOperate", |
|
|
|
data: { |
|
|
|
lockerId: that.data.deviceinfo.deviceNum, |
|
|
|
serialNumber: serialNumber, |
|
|
@ -2903,7 +2930,7 @@ Page({ |
|
|
|
} |
|
|
|
} |
|
|
|
WXAPI.sendCommand(datacom).then(res2 => { |
|
|
|
console.log(res2, '失败') |
|
|
|
console.log(res2, '失败2933') |
|
|
|
}) |
|
|
|
wx.showModal({ |
|
|
|
title: '提示', |
|
|
@ -2931,7 +2958,7 @@ Page({ |
|
|
|
}) |
|
|
|
} |
|
|
|
var datacom = { |
|
|
|
code: "lwj/c", |
|
|
|
code: "lwj/cardOperate", |
|
|
|
data: { |
|
|
|
lockerId: that.data.deviceinfo.deviceNum, |
|
|
|
serialNumber: serialNumber, |
|
|
@ -2966,6 +2993,9 @@ Page({ |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
that.setData({ |
|
|
|
isRfCardAdd: false |
|
|
|
}) |
|
|
|
rfCardId = -1 |
|
|
|
rfCardIndex = -1 |
|
|
|
break |
|
|
@ -3109,6 +3139,20 @@ Page({ |
|
|
|
case 'delFingerprint': { |
|
|
|
wx.hideLoading() |
|
|
|
if (data.code != 200) { |
|
|
|
var datacom = { |
|
|
|
code: "lwj/fpOperate", |
|
|
|
data: { |
|
|
|
lockerId: that.data.deviceinfo.deviceNum, |
|
|
|
serialNumber: serialNumber, |
|
|
|
index: fingerprintIndex, |
|
|
|
action: 2, |
|
|
|
type: 18, |
|
|
|
result: 0 |
|
|
|
} |
|
|
|
} |
|
|
|
WXAPI.sendCommand(datacom).then(res2 => { |
|
|
|
console.log(res2, '失败') |
|
|
|
}) |
|
|
|
wx.showModal({ |
|
|
|
title: '提示', |
|
|
|
content: '删除指纹失败!', |
|
|
@ -3123,6 +3167,43 @@ Page({ |
|
|
|
content: `删除指纹成功,序号${fingerprintIndex}!`, |
|
|
|
showCancel: false, |
|
|
|
}) |
|
|
|
var datacom = { |
|
|
|
code: "lwj/fpOperate", |
|
|
|
data: { |
|
|
|
lockerId: that.data.deviceinfo.deviceNum, |
|
|
|
serialNumber: serialNumber, |
|
|
|
index: fingerprintIndex, |
|
|
|
action: 2, |
|
|
|
type: 18, |
|
|
|
result: 1 |
|
|
|
} |
|
|
|
} |
|
|
|
WXAPI.sendCommand(datacom).then(res2 => { |
|
|
|
if (res2.success) {} |
|
|
|
}) |
|
|
|
var data = { |
|
|
|
ids: [passwordLiAll.id] |
|
|
|
} |
|
|
|
WXAPI.deleteCertificates(data).then(res1 => { |
|
|
|
if (res1.success) { |
|
|
|
that.getFp() |
|
|
|
wx.hideLoading() |
|
|
|
wx.showToast({ |
|
|
|
title: '删除成功', |
|
|
|
mask: true, |
|
|
|
icon: 'none', |
|
|
|
duration: 2000 |
|
|
|
}) |
|
|
|
} else { |
|
|
|
wx.hideLoading() |
|
|
|
wx.showToast({ |
|
|
|
title: '删除失败', |
|
|
|
mask: true, |
|
|
|
icon: 'none', |
|
|
|
duration: 2000 |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
that.setData({ |
|
|
|
isFingerprintAdd: false |
|
|
|
}) |
|
|
|