Commit 7462e2776bc064748c6ddfd9dd53d07b498e1a42

Authored by 648540858
Committed by GitHub
2 parents 5b3dc4d5 12571e0d

Merge pull request #608 from wenyanjun/wvp-28181-2.0

修复下载录像失败问题
web_src/src/components/dialog/recordDownload.vue
@@ -89,7 +89,7 @@ export default { @@ -89,7 +89,7 @@ export default {
89 if (parseFloat(res.data.progress) == 1) { 89 if (parseFloat(res.data.progress) == 1) {
90 this.percentage = 100; 90 this.percentage = 100;
91 }else { 91 }else {
92 - this.percentage = (res.data.progress*100).toFixed(1); 92 + this.percentage = (res.data.data.progress*100).toFixed(1);
93 } 93 }
94 if (callback)callback(); 94 if (callback)callback();
95 } 95 }
@@ -175,6 +175,10 @@ export default { @@ -175,6 +175,10 @@ export default {
175 }).then((res) => { 175 }).then((res) => {
176 console.log(res) 176 console.log(res)
177 if (res.data.code === 0) { 177 if (res.data.code === 0) {
  178 + if (res.data.data.length === 0){
  179 + this.percentage = 0
  180 + return
  181 + }
178 this.percentage = parseFloat(res.data.data.percentage)*100 182 this.percentage = parseFloat(res.data.data.percentage)*100
179 if (res.data.data[0].percentage === '1') { 183 if (res.data.data[0].percentage === '1') {
180 this.getProgressForFileRun = false; 184 this.getProgressForFileRun = false;