Skip to content

Commit 8e79fe3

Browse files
committed
跳转页面模板修正倒计时出现负数的情况
1 parent 78d982a commit 8e79fe3

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

ThinkPHP/Tpl/dispatch_jump.tpl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,11 @@ body{ background: #fff; font-family: '微软雅黑'; color: #333; font-size: 16p
3333
var wait = document.getElementById('wait'),href = document.getElementById('href').href;
3434
var interval = setInterval(function(){
3535
var time = --wait.innerHTML;
36-
(time == 0) && (location.href = href);
37-
}, 1000);
36+
if(time == 0) {
37+
location.href = href;
38+
clearInterval(interval);
39+
};
40+
}, 1000);
3841
})();
3942
</script>
4043
</body>

0 commit comments

Comments
 (0)