Compare commits
2 Commits
ac7e1873cd
...
7b2b7ea34c
| Author | SHA1 | Date | |
|---|---|---|---|
| 7b2b7ea34c | |||
| eea68b5276 |
@ -77,7 +77,7 @@
|
||||
<text class="smallTxt">泛光模式</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mode fleft" v-on:click.stop="UploadOpenImg()">
|
||||
<!-- <view class="mode fleft" v-on:click.stop="UploadOpenImg()">
|
||||
<view class="leftImg">
|
||||
<image class="img" src="/static/images/6155/DeviceDetail/open.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
@ -85,8 +85,8 @@
|
||||
<text class="bigTxt">开机画面</text>
|
||||
<text class="smallTxt">上传</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mode fleft marginLeft" v-on:click.stop="UploadOpenVideo()">
|
||||
</view> -->
|
||||
<view class="mode fleft" v-on:click.stop="UploadOpenVideo()">
|
||||
<view class="leftImg">
|
||||
<image class="img" src="/static/images/common/video.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
@ -938,7 +938,9 @@
|
||||
if (res.statusCode === 200) {
|
||||
if (res.data.code == 200) {
|
||||
console.log("上传完成,耗时:" + m + "分" + s + "秒");
|
||||
updateLoading(these,{text:"上传完成,耗时:" + m + "分" + s + "秒,正在切片。"})
|
||||
updateLoading(these, {
|
||||
text: "上传完成,耗时:" + m + "分" + s + "秒,正在切片。"
|
||||
})
|
||||
resolve(res.data);
|
||||
|
||||
return;
|
||||
@ -1051,7 +1053,8 @@
|
||||
let packetSize = packetData.length;
|
||||
|
||||
const isFirstChild = childPacketIndex === 0;
|
||||
const isLastChild = childPacketIndex === (childPacketsGroup.length - 1);
|
||||
const isLastChild = childPacketIndex === (childPacketsGroup
|
||||
.length - 1);
|
||||
|
||||
if (isFirstChild) {
|
||||
packetSize = packetData.length + 8;
|
||||
@ -1087,7 +1090,8 @@
|
||||
}
|
||||
let inteval = parseInt(this.inteval ? this.inteval : 80);
|
||||
|
||||
ble.sendData(f.deviceId, buffer, f.writeServiceId, f.wirteCharactId).then(() => {
|
||||
ble.sendData(f.deviceId, buffer, f.writeServiceId, f
|
||||
.wirteCharactId).then(() => {
|
||||
if (ReSendNo) {
|
||||
resolve();
|
||||
return;
|
||||
@ -1095,8 +1099,9 @@
|
||||
// 更新进度
|
||||
this.currentPacket = currentPacket;
|
||||
|
||||
updateLoading(these,{
|
||||
text:'正在发送:'+currentPacket+"/"+totalPackets
|
||||
updateLoading(these, {
|
||||
text: '正在发送:' + currentPacket + "/" +
|
||||
totalPackets
|
||||
});
|
||||
|
||||
childPacketIndex++;
|
||||
@ -1121,7 +1126,9 @@
|
||||
}
|
||||
|
||||
console.error(err.errMsg + ",发送失败了" + currentPacket);
|
||||
updateLoading(these,{text:"发送失败,"+err.errMsg});
|
||||
updateLoading(these, {
|
||||
text: "发送失败," + err.errMsg
|
||||
});
|
||||
reject(err);
|
||||
});
|
||||
};
|
||||
@ -1134,7 +1141,7 @@
|
||||
uni.chooseVideo({
|
||||
sourceType: ['album'],
|
||||
success: function(res) {
|
||||
console.log("res=",res);
|
||||
console.log("res=", res);
|
||||
let path = res.tempFilePath;
|
||||
let width = res.width;
|
||||
let height = res.height;
|
||||
@ -1183,24 +1190,27 @@
|
||||
|
||||
videoCutPacket(convertedData).then(array => {
|
||||
|
||||
let start = new Date();
|
||||
console.log("开始发送");
|
||||
shotVideoClick(array).then(() => {
|
||||
console.log("发送完成");
|
||||
let end = new Date();
|
||||
var diff = (end.getTime() - start.getTime()) / 1000;
|
||||
let s =parseInt(diff % 60);
|
||||
let m =parseInt((diff - s) / 60);
|
||||
console.log("发送完成,耗时:" + m + "分" + s + "秒");
|
||||
updateLoading(these,{
|
||||
text: "发送完成,耗时:" + m + "分" + s + "秒",
|
||||
});
|
||||
let start = new Date();
|
||||
console.log("开始发送");
|
||||
shotVideoClick(array).then(() => {
|
||||
console.log("发送完成");
|
||||
let end = new Date();
|
||||
var diff = (end.getTime() - start
|
||||
.getTime()) / 1000;
|
||||
let s = parseInt(diff % 60);
|
||||
let m = parseInt((diff - s) / 60);
|
||||
console.log("发送完成,耗时:" + m + "分" +
|
||||
s + "秒");
|
||||
updateLoading(these, {
|
||||
text: "发送完成,耗时:" + m +
|
||||
"分" + s + "秒",
|
||||
});
|
||||
|
||||
}).catch((ex1) => {
|
||||
console.log("出现了异常", ex1)
|
||||
}).finally(() => {
|
||||
timeDelayCloseLoading();
|
||||
});
|
||||
}).catch((ex1) => {
|
||||
console.log("出现了异常", ex1)
|
||||
}).finally(() => {
|
||||
timeDelayCloseLoading();
|
||||
});
|
||||
|
||||
|
||||
|
||||
@ -1467,6 +1477,24 @@
|
||||
these.showBleUnConnect()
|
||||
return;
|
||||
}
|
||||
let err = false;
|
||||
this.formData.textLines.find((txt) => {
|
||||
if (txt.length === 0 || txt.length > 7) {
|
||||
console.log("txt=", txt);
|
||||
err = true;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
})
|
||||
if (err) {
|
||||
this.showPop({
|
||||
message: "单位、部门、姓名必须填写且最多7字",
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
});
|
||||
return;
|
||||
}
|
||||
showLoading(these, {
|
||||
text: "请稍候..."
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user