修复650、670长度字段00的异常,配置文件全部修改为生产环境
This commit is contained in:
@ -590,9 +590,9 @@
|
||||
that.formData.job = personnelInfo.position;
|
||||
that.formData.usrid = personnelInfo.code
|
||||
}
|
||||
that.formData.imei=res.deviceImei;
|
||||
these.device.deviceImei=res.deviceImei;
|
||||
if(that.formData.imei){
|
||||
that.formData.imei = res.deviceImei;
|
||||
these.device.deviceImei = res.deviceImei;
|
||||
if (that.formData.imei) {
|
||||
that.initMQ();
|
||||
}
|
||||
let dic = {
|
||||
@ -2218,11 +2218,18 @@
|
||||
const buffer = new ArrayBuffer(bufferSize);
|
||||
const dataView = new DataView(buffer);
|
||||
|
||||
let s = (text.length * 2).toString(16);
|
||||
let len = String(s).padStart(4, '0')
|
||||
len = len.match(/.{1,2}/g);
|
||||
|
||||
// 填充头部
|
||||
dataView.setUint8(0, 0x55); // 帧头
|
||||
dataView.setUint8(1, 0x03); // 帧类型:文字
|
||||
dataView.setUint8(2, currentPacket.toString(16)); // 包序号
|
||||
dataView.setUint16(3, (text.length * 2).toString(16)); // 数据长度
|
||||
dataView.setUint8(3, parseInt('0x' + len[0], 16)); // 数据长度
|
||||
dataView.setUint8(4, parseInt('0x' + len[1], 16)); // 数据长度
|
||||
|
||||
|
||||
|
||||
// 填充数据
|
||||
let index = 0;
|
||||
|
||||
Reference in New Issue
Block a user