diff --git a/src/views/mine/Archives.vue b/src/views/mine/Archives.vue index 16d159d..d78570f 100644 --- a/src/views/mine/Archives.vue +++ b/src/views/mine/Archives.vue @@ -960,7 +960,8 @@ export default defineComponent({ issum = false; const res = await uploadflie(file.file, (info: any) => { console.log(info); - const jindu = info.percent.toFixed(2) * 100 + let jindu: number = info.percent.toFixed(2) * 100; + jindu = parseInt(jindu + ""); uploadprogress.value = jindu > 0 ? jindu : 1; }); userinfo.value.video = res.video.url; diff --git a/src/views/mine/ReleaseVideo.vue b/src/views/mine/ReleaseVideo.vue index 12d0d5d..400ce8f 100644 --- a/src/views/mine/ReleaseVideo.vue +++ b/src/views/mine/ReleaseVideo.vue @@ -231,7 +231,9 @@ export default defineComponent({ const res = await uploadflie(file.file, (info: any) => { console.log(info); - uploadpicprogress.value = info.percent.toFixed(2) * 100; + let jindu: number = info.percent.toFixed(2) * 100; + jindu = parseInt(jindu + ""); + uploadpicprogress.value = jindu || 1; }); console.log(res); form.value.img = res.video.url; diff --git a/src/views/mine/ReleaseWebcast.vue b/src/views/mine/ReleaseWebcast.vue index a800266..30d1da8 100644 --- a/src/views/mine/ReleaseWebcast.vue +++ b/src/views/mine/ReleaseWebcast.vue @@ -511,7 +511,9 @@ export default defineComponent({ uploadprogress.value = 1; const res = await uploadflie(file.file, (info: any) => { console.log(info); - const jindu = info.percent.toFixed(2) * 100 + // const jindu = info.percent.toFixed(2) * 100 + let jindu: number = info.percent.toFixed(2) * 100; + jindu = parseInt(jindu + ""); uploadprogress.value = jindu > 0 ? jindu : 1; }); console.log(res); @@ -525,7 +527,9 @@ export default defineComponent({ uploadpicprogress.value = 1; const res = await uploadflie(file.file, (info: any) => { console.log(info); - uploadpicprogress.value = info.percent.toFixed(2) * 100 || 1; + let jindu: number = info.percent.toFixed(2) * 100; + jindu = parseInt(jindu + ""); + uploadpicprogress.value = jindu || 1; }); console.log(res);