From 902f96dc95910b08b0c19a9365a237668aa48b08 Mon Sep 17 00:00:00 2001 From: liuyi Date: Wed, 17 May 2023 17:41:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=BE=E7=89=87=E8=BD=AE=E5=B7=A1bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/pictureRotation/index.vue | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/views/pictureRotation/index.vue b/src/views/pictureRotation/index.vue index 39bc99c..0a4e745 100644 --- a/src/views/pictureRotation/index.vue +++ b/src/views/pictureRotation/index.vue @@ -96,7 +96,7 @@ export default { totalPage: 0, //总页数 total: 0, //总条数 picList: [], //图片列表数据 - remainingTime: 15, //剩余时间 + remainingTime: 0, //剩余时间 isRuning: false, timer: null, loading: false, @@ -221,7 +221,9 @@ export default { this.startCountdown(); } else { console.log(this.page); - this.remainingTime = this.selSpeed; + this.remainingTime = parseInt(localStorage.getItem("totalTime")) + ? parseInt(localStorage.getItem("totalTime")) + : 15; this.getPicData(); this.startCountdown(); } @@ -256,6 +258,9 @@ export default { }, computed: {}, mounted() { + this.remainingTime = parseInt(localStorage.getItem("totalTime")) + ? parseInt(localStorage.getItem("totalTime")) + : 15; this.toggleCountdown(); }, created() {},