diff --git a/packkey/combining.html b/packkey/combining.html index 76fb2c4..f0f5e4f 100644 --- a/packkey/combining.html +++ b/packkey/combining.html @@ -157,11 +157,17 @@ /* 倒计时 */ const key_expiration_time = sessionStorage.getItem('key_expiration_time'); if (key_expiration_time != 0) { - setInterval(() => { - this.outTime = pageOutTime(key_expiration_time); + const cls = setInterval(() => { + const time = pageOutTime(key_expiration_time); + if (time) { + this.outTime = time; + } else { + this.outTime = ['00', '00', '00']; + clearInterval(cls); + } }, 1000); } else { - this.outTime = []; + this.outTime = ['00', '00', '00']; } }, diff --git a/packkey/reduce.html b/packkey/reduce.html index 4c6f7ec..1992cd8 100644 --- a/packkey/reduce.html +++ b/packkey/reduce.html @@ -185,11 +185,17 @@ /* 倒计时 */ const key_expiration_time = sessionStorage.getItem('key_expiration_time'); if (key_expiration_time != 0) { - setInterval(() => { - this.outTime = pageOutTime(key_expiration_time); + const cls = setInterval(() => { + const time = pageOutTime(key_expiration_time); + if (time) { + this.outTime = time; + } else { + this.outTime = ['00', '00', '00']; + clearInterval(cls); + } }, 1000); } else { - this.outTime = []; + this.outTime = ['00', '00', '00']; } }, filters: { diff --git a/packkey/ysf-reduce.html b/packkey/ysf-reduce.html index 90459c9..7ff7ce9 100644 --- a/packkey/ysf-reduce.html +++ b/packkey/ysf-reduce.html @@ -156,11 +156,17 @@ /* 倒计时 */ const key_expiration_time = sessionStorage.getItem('key_expiration_time'); if (key_expiration_time != 0) { - setInterval(() => { - this.outTime = pageOutTime(key_expiration_time); + const cls = setInterval(() => { + const time = pageOutTime(key_expiration_time); + if (time) { + this.outTime = time; + } else { + this.outTime = ['00', '00', '00']; + clearInterval(cls); + } }, 1000); } else { - this.outTime = []; + this.outTime = ['00', '00', '00']; } }, filters: { diff --git a/packkey/zfb-reduce.html b/packkey/zfb-reduce.html index 659e8d5..3b90f46 100644 --- a/packkey/zfb-reduce.html +++ b/packkey/zfb-reduce.html @@ -156,11 +156,17 @@ /* 倒计时 */ const key_expiration_time = sessionStorage.getItem('key_expiration_time'); if (key_expiration_time != 0) { - setInterval(() => { - this.outTime = pageOutTime(key_expiration_time); + const cls = setInterval(() => { + const time = pageOutTime(key_expiration_time); + if (time) { + this.outTime = time; + } else { + this.outTime = ['00', '00', '00']; + clearInterval(cls); + } }, 1000); } else { - this.outTime = []; + this.outTime = ['00', '00', '00']; } },