修复650、670长度字段00的异常,配置文件全部修改为生产环境

This commit is contained in:
liub
2025-09-29 10:01:39 +08:00
parent d9e45becff
commit c556b802e4
4 changed files with 21 additions and 11 deletions

View File

@ -984,7 +984,7 @@
uni.uploadFile({
// url: 'http://114.55.111.217/video/upload',
url: baseURL+"app/video/upload",
url: baseURL + "app/video/upload",
filePath: videoPath,
name: 'file',
header: {
@ -1148,7 +1148,7 @@
},
closePop: function() {
this.Status.Pop.showPop = false;
if (this.Status.Pop.cancelCallback) {
this.Status.Pop.cancelCallback();
}
@ -1262,7 +1262,9 @@
let arr = gbk.encode(text)
let gbkData = gbk.arr2hex(arr);
let s = (text.length * 2).toString(16);
let len = String(s).padStart(4, '0')
len = len.match(/.{1,2}/g);
// 构建数据包
const bufferSize = 5 + gbkData.length / 2; // 头部4字节 + 数据部分
const buffer = new ArrayBuffer(bufferSize);
@ -1272,7 +1274,8 @@
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;

View File

@ -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;