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() {},