修改人员信息时间前后
This commit is contained in:
@ -585,7 +585,7 @@
|
|||||||
console.log(`字段 ${key} 不在 formData 中,跳过更新`);
|
console.log(`字段 ${key} 不在 formData 中,跳过更新`);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// 强制触发视图更新,确保电量显示同步
|
// 强制触发视图更新,确保电量显示同步
|
||||||
these.$forceUpdate();
|
these.$forceUpdate();
|
||||||
console.log("更新后的电量:", these.formData.battary);
|
console.log("更新后的电量:", these.formData.battary);
|
||||||
@ -1091,7 +1091,7 @@
|
|||||||
dataView.setUint8(packetSize - 1, 0xFF);
|
dataView.setUint8(packetSize - 1, 0xFF);
|
||||||
}
|
}
|
||||||
let inteval = parseInt(this.inteval ? this.inteval : 80);
|
let inteval = parseInt(this.inteval ? this.inteval : 80);
|
||||||
|
console.log(inteval, 'intevalinteval');
|
||||||
ble.sendData(f.deviceId, buffer, f.writeServiceId, f
|
ble.sendData(f.deviceId, buffer, f.writeServiceId, f
|
||||||
.wirteCharactId).then(() => {
|
.wirteCharactId).then(() => {
|
||||||
if (ReSendNo) {
|
if (ReSendNo) {
|
||||||
@ -1149,27 +1149,28 @@
|
|||||||
let width = Math.round(res.width);
|
let width = Math.round(res.width);
|
||||||
let height = Math.round(res.height);
|
let height = Math.round(res.height);
|
||||||
let duration = res.duration;
|
let duration = res.duration;
|
||||||
|
|
||||||
// 获取平台信息
|
// 获取平台信息
|
||||||
const systemInfo = uni.getSystemInfoSync();
|
const systemInfo = uni.getSystemInfoSync();
|
||||||
const platform = systemInfo.platform;
|
const platform = systemInfo.platform;
|
||||||
const isIOS = platform === 'ios';
|
const isIOS = platform === 'ios';
|
||||||
|
|
||||||
console.log("平台:", platform, "uni.chooseVideo返回 - 宽度:", width, "高度:", height, "时长:", duration);
|
console.log("平台:", platform, "uni.chooseVideo返回 - 宽度:", width, "高度:", height,
|
||||||
|
"时长:", duration);
|
||||||
|
|
||||||
// iOS特殊处理:如果返回的是80*40,很可能是160*80的一半(iOS的bug)
|
// iOS特殊处理:如果返回的是80*40,很可能是160*80的一半(iOS的bug)
|
||||||
if (isIOS && width === 80 && height === 40) {
|
if (isIOS && width === 80 && height === 40) {
|
||||||
console.log("检测到iOS特殊情况:返回80*40,实际应该是160*80,进行修正");
|
console.log("检测到iOS特殊情况:返回80*40,实际应该是160*80,进行修正");
|
||||||
width = 160;
|
width = 160;
|
||||||
height = 80;
|
height = 80;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 检查分辨率是否符合要求
|
// 检查分辨率是否符合要求
|
||||||
let checkResolution = (w, h) => {
|
let checkResolution = (w, h) => {
|
||||||
// 使用容差比较,允许1像素的误差
|
// 使用容差比较,允许1像素的误差
|
||||||
return Math.abs(w - 160) <= 1 && Math.abs(h - 80) <= 1;
|
return Math.abs(w - 160) <= 1 && Math.abs(h - 80) <= 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
let err = [];
|
let err = [];
|
||||||
if (duration < 2) {
|
if (duration < 2) {
|
||||||
err.push("视频时长至少2秒");
|
err.push("视频时长至少2秒");
|
||||||
@ -1178,7 +1179,7 @@
|
|||||||
if (!checkResolution(width, height)) {
|
if (!checkResolution(width, height)) {
|
||||||
err.push("视频宽高必须是160*80,当前分辨率:" + width + "*" + height);
|
err.push("视频宽高必须是160*80,当前分辨率:" + width + "*" + height);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (err.length > 0) {
|
if (err.length > 0) {
|
||||||
err = err.join(";");
|
err = err.join(";");
|
||||||
these.showPop({
|
these.showPop({
|
||||||
@ -1189,7 +1190,7 @@
|
|||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
showLoading(these, {
|
showLoading(these, {
|
||||||
text: '正在上传'
|
text: '正在上传'
|
||||||
});
|
});
|
||||||
@ -1579,8 +1580,9 @@
|
|||||||
|
|
||||||
dataView.setUint8(bufferSize - 1, 0xFF);
|
dataView.setUint8(bufferSize - 1, 0xFF);
|
||||||
|
|
||||||
let inteval = parseInt(this.inteval ? this.inteval : 50);
|
let inteval = 100;
|
||||||
console.log("inteval=", inteval)
|
//parseInt(this.inteval ? this.inteval : 80);
|
||||||
|
//console.log("inteval=", inteval)
|
||||||
ble.sendData(f.deviceId, buffer, f.writeServiceId, f
|
ble.sendData(f.deviceId, buffer, f.writeServiceId, f
|
||||||
.wirteCharactId, 30).then(() => {
|
.wirteCharactId, 30).then(() => {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user