修复下载录像失败问题

pull/608/head
wenyanjun 2022-09-14 14:32:22 +08:00
parent 250a059ca0
commit 12571e0db1
1 changed files with 5 additions and 1 deletions

View File

@ -89,7 +89,7 @@ export default {
if (parseFloat(res.data.progress) == 1) { if (parseFloat(res.data.progress) == 1) {
this.percentage = 100; this.percentage = 100;
}else { }else {
this.percentage = (res.data.progress*100).toFixed(1); this.percentage = (res.data.data.progress*100).toFixed(1);
} }
if (callback)callback(); if (callback)callback();
} }
@ -175,6 +175,10 @@ export default {
}).then((res) => { }).then((res) => {
console.log(res) console.log(res)
if (res.data.code === 0) { if (res.data.code === 0) {
if (res.data.data.length === 0){
this.percentage = 0
return
}
this.percentage = parseFloat(res.data.data.percentage)*100 this.percentage = parseFloat(res.data.data.percentage)*100
if (res.data.data[0].percentage === '1') { if (res.data.data[0].percentage === '1') {
this.getProgressForFileRun = false; this.getProgressForFileRun = false;