From 6a0b85a0ebb25d68eda3b75e5821990976eb061b Mon Sep 17 00:00:00 2001 From: wanglei Date: Thu, 20 Jun 2024 15:26:09 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A1=A3=E6=A1=88=E9=87=87=E9=9B=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dangan-ui/src/views/dangan/collection/index.vue | 8 +++++++- dangan-ui/src/views/dangan/pictureRecard/index.vue | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/dangan-ui/src/views/dangan/collection/index.vue b/dangan-ui/src/views/dangan/collection/index.vue index de8a47e..4509e1f 100644 --- a/dangan-ui/src/views/dangan/collection/index.vue +++ b/dangan-ui/src/views/dangan/collection/index.vue @@ -660,8 +660,14 @@ export default { }) .then( (response)=> { this.percentage = Math.round((response.data.file_counts/this.pictureRecard.length)*100); + + if(this.percentage===100||this.percentage>100){ + clearInterval(this.Interval); + this.Interval = null; + } + }).catch((error)=> { - // 处理错误情况 + console.log(error) }) }, } diff --git a/dangan-ui/src/views/dangan/pictureRecard/index.vue b/dangan-ui/src/views/dangan/pictureRecard/index.vue index 4b8c247..05ff127 100644 --- a/dangan-ui/src/views/dangan/pictureRecard/index.vue +++ b/dangan-ui/src/views/dangan/pictureRecard/index.vue @@ -316,7 +316,13 @@ export default { 'Content-Type': 'application/x-www-form-urlencoded' } }).then((response)=>{ - this.percentage = Math.round((response.data.file_counts/this.selectionList.length)*100) + this.percentage = Math.round((response.data.file_counts/this.selectionList.length)*100); + + if(this.percentage===100||this.percentage>100){ + clearInterval(this.Interval); + this.Interval = null; + } + }).catch(function (error) { // 处理错误情况 console.log(error);