修改670人员信息重复发送的问题/修改版本更新的方式/加入检查更新的连接

This commit is contained in:
liub
2025-10-10 17:31:33 +08:00
parent 4c3999251e
commit e3a2624509
6 changed files with 38 additions and 12 deletions

View File

@ -591,8 +591,8 @@
that.formData.address = res.address;
let personnelInfo = res.personnelInfo;
if (personnelInfo) {
that.formData.company = personnelInfo.name;
that.formData.usrname = personnelInfo.unitName;
that.formData.company = personnelInfo.unitName;
that.formData.usrname = personnelInfo.name;
that.formData.job = personnelInfo.position;
that.formData.usrid = personnelInfo.code
}
@ -2100,12 +2100,14 @@
}
let requestSend = () => {
let json = {
deviceId: this.device.id,
deviceImei: this.device.deviceImei ? this.device.deviceImei : this.formData.imei,
name: this.formData.company,
position: this.formData.usrname,
unitName: this.formData.job,
unitName: this.formData.company,
name: this.formData.usrname,
position: this.formData.job,
code: this.formData.usrid
};
api.sendUsr(json).then((res) => {
@ -2257,10 +2259,10 @@
// 发送下一个包
currentPacket++;
setTimeout(sendNextPacket, 2000);
setTimeout(sendNextPacket, 200);
}).catch(err => {
if (err.code == '10007') {
setTimeout(sendNextPacket,2000);
setTimeout(sendNextPacket,200);
} else {
requestSend();
}
@ -2282,7 +2284,7 @@
these.HoldYouHand("word transmit start", 120, f.deviceId, f.writeServiceId, f
.wirteCharactId).then(
() => {
setTimeout(sendText, 2000);
setTimeout(sendText, 200);
}).catch((ex) => {
requestSend();
// console.log("握手没有成功", ex);