|
@ -281,6 +281,7 @@ Page({ |
|
|
var _this = this |
|
|
var _this = this |
|
|
var deviceinfo = this.data.deviceinfo |
|
|
var deviceinfo = this.data.deviceinfo |
|
|
var info = JSON.parse(this.data.personLi.info) |
|
|
var info = JSON.parse(this.data.personLi.info) |
|
|
|
|
|
console.log(deviceinfo, info, this.data.personLi); |
|
|
if (deviceinfo.manufactureId == 1241) { |
|
|
if (deviceinfo.manufactureId == 1241) { |
|
|
var time1 = new Date(_this.data.datetimerange[0].replace(/-/g, '/')) |
|
|
var time1 = new Date(_this.data.datetimerange[0].replace(/-/g, '/')) |
|
|
var time2 = new Date(_this.data.datetimerange[1].replace(/-/g, '/')) |
|
|
var time2 = new Date(_this.data.datetimerange[1].replace(/-/g, '/')) |
|
@ -303,6 +304,8 @@ Page({ |
|
|
lockerId: deviceinfo.deviceNum, |
|
|
lockerId: deviceinfo.deviceNum, |
|
|
lockerUserId: info.userPassword, |
|
|
lockerUserId: info.userPassword, |
|
|
startTime: passwordStartTime, |
|
|
startTime: passwordStartTime, |
|
|
|
|
|
operateMode: 20, |
|
|
|
|
|
order: 6220 |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
var str = { |
|
|
var str = { |
|
@ -312,18 +315,21 @@ Page({ |
|
|
password: '', |
|
|
password: '', |
|
|
faceData: _this.data.avatarPath, |
|
|
faceData: _this.data.avatarPath, |
|
|
userTelephone: JSON.parse(_this.data.personLi.info).userTelephone, |
|
|
userTelephone: JSON.parse(_this.data.personLi.info).userTelephone, |
|
|
operateMode: '', |
|
|
|
|
|
|
|
|
operateMode: 20, |
|
|
|
|
|
order: 6220, |
|
|
userPassword: JSON.parse(_this.data.personLi.info).userPassword, |
|
|
userPassword: JSON.parse(_this.data.personLi.info).userPassword, |
|
|
passwordStartTime: passwordStartTime, |
|
|
passwordStartTime: passwordStartTime, |
|
|
passwordEndTime: passwordEndTime, |
|
|
passwordEndTime: passwordEndTime, |
|
|
is: false, |
|
|
is: false, |
|
|
pass: true |
|
|
|
|
|
|
|
|
pass: true, |
|
|
|
|
|
cardName: this.data.personLi.name + '-' + pzname, |
|
|
|
|
|
roomName: deviceinfo.roomName |
|
|
} |
|
|
} |
|
|
console.log(_this.data.avatarPath, dataface); |
|
|
console.log(_this.data.avatarPath, dataface); |
|
|
WXAPI.sendCommand(dataface).then(res => { |
|
|
WXAPI.sendCommand(dataface).then(res => { |
|
|
console.log(res); |
|
|
console.log(res); |
|
|
if (res.success) { |
|
|
if (res.success) { |
|
|
faceaddIndex = res.data.index |
|
|
|
|
|
|
|
|
str.faceaddIndex = res.data.index |
|
|
serialNumber = res.data.serialNumber |
|
|
serialNumber = res.data.serialNumber |
|
|
var datalist = { |
|
|
var datalist = { |
|
|
cardId: _this.data.personLi.cardId, |
|
|
cardId: _this.data.personLi.cardId, |
|
@ -344,6 +350,8 @@ Page({ |
|
|
serial: serialNumber, |
|
|
serial: serialNumber, |
|
|
startTime: passwordStartTime, |
|
|
startTime: passwordStartTime, |
|
|
endTime: passwordEndTime, |
|
|
endTime: passwordEndTime, |
|
|
|
|
|
order: 6220, |
|
|
|
|
|
operateMode: 20 |
|
|
} |
|
|
} |
|
|
WXAPI.addCertificates(data1).then(res2 => { |
|
|
WXAPI.addCertificates(data1).then(res2 => { |
|
|
console.log("res2", res2); |
|
|
console.log("res2", res2); |
|
@ -391,16 +399,45 @@ Page({ |
|
|
let dataface = { |
|
|
let dataface = { |
|
|
code: "lwj/faceOperate", |
|
|
code: "lwj/faceOperate", |
|
|
data: { |
|
|
data: { |
|
|
|
|
|
faceIndex: content.index, |
|
|
action: 2, |
|
|
action: 2, |
|
|
endTime: content.passwordEndTime, |
|
|
endTime: content.passwordEndTime, |
|
|
faceData: content.faceData, |
|
|
faceData: content.faceData, |
|
|
lockerId: facemessage.deviceNum, |
|
|
lockerId: facemessage.deviceNum, |
|
|
lockerUserId: content.userPassword, |
|
|
lockerUserId: content.userPassword, |
|
|
startTime: content.passwordStartTime |
|
|
|
|
|
|
|
|
startTime: content.passwordStartTime, |
|
|
|
|
|
operateMode: 22, |
|
|
|
|
|
order: 6222 |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
WXAPI.sendCommand(dataface).then(res => { |
|
|
WXAPI.sendCommand(dataface).then(res => { |
|
|
console.log(res); |
|
|
console.log(res); |
|
|
|
|
|
content.operateMode = 22 |
|
|
|
|
|
content.order = 6222 |
|
|
|
|
|
if(res.success){ |
|
|
|
|
|
let updatedata = { |
|
|
|
|
|
id: facemessage.id, |
|
|
|
|
|
status: 0, |
|
|
|
|
|
serial: res.data.serialNumber, |
|
|
|
|
|
content: JSON.stringify(content) |
|
|
|
|
|
} |
|
|
|
|
|
WXAPI.updateCertificates(updatedata).then(res1 => { |
|
|
|
|
|
console.log(res1); |
|
|
|
|
|
if(res1.success){ |
|
|
|
|
|
wx.showToast({ |
|
|
|
|
|
title: '删除人脸成功', |
|
|
|
|
|
icon: 'none', |
|
|
|
|
|
duration: 2000 |
|
|
|
|
|
}) |
|
|
|
|
|
}else{ |
|
|
|
|
|
wx.showToast({ |
|
|
|
|
|
title: '删除人脸失败', |
|
|
|
|
|
icon: "none", |
|
|
|
|
|
duration: 2000 |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
}) |
|
|
}) |
|
|
}else if(res.cancel) { |
|
|
}else if(res.cancel) { |
|
|
wx.showToast({ |
|
|
wx.showToast({ |
|
|