diff --git a/combining.html b/combining.html index b876eb2..26e3426 100644 --- a/combining.html +++ b/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/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']; } }, diff --git a/reduce.html b/reduce.html index 1198c1a..ab15f5b 100644 --- a/reduce.html +++ b/reduce.html @@ -186,11 +186,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/ysf-reduce.html b/ysf-reduce.html index 51d905a..e8a72d6 100644 --- a/ysf-reduce.html +++ b/ysf-reduce.html @@ -152,11 +152,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/zfb-reduce.html b/zfb-reduce.html index 4e3555e..55841cb 100644 --- a/zfb-reduce.html +++ b/zfb-reduce.html @@ -151,11 +151,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']; } },