From a472d4e25115b3b142c61319af4a9c82004eebb1 Mon Sep 17 00:00:00 2001 From: luyuan <1162963624@qq.com> Date: Mon, 23 Nov 2020 14:51:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BA=86=E5=B0=8F=E6=95=B0?= =?UTF-8?q?=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/mine/Archives.vue | 3 ++- src/views/mine/ReleaseVideo.vue | 4 +++- src/views/mine/ReleaseWebcast.vue | 8 ++++++-- 3 files changed, 11 insertions(+), 4 deletions(-) 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);