thinkphp自定义succeed和error模板

找到dispatch_jump.tpl


<?php
    if(C('LAYOUT_ON')) {
        echo '{__NOLAYOUT__}';
    }
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>跳转提示</title>
<style type="text/css">
*{ padding: 0; margin: 0; }
.center{ width:250px; margin:0 auto; margin-top:150px; margin-bottom:150px;}
.image_center{    border-radius: 15px;width:80px;height:104px; margin-left:86px; background: #e52e2d;}
.image_center .smile_face{ font-size:50px; float:left; color: #ffffff; margin-left:30px; display:block; transform:rotate(90deg);}
.code{margin-top: 20px; text-align:center; color:#000000; font-size:20px;}
.jump{margin-top: 20px; text-align:center; color:#000000; font-size:15px;}
</style>
</head>
<body>
<div class="system-message">

<div class="center">
  

<?php 

if(isset($message)) 


{
	
	
	?>



	 <div class="image_center">
                <span class="smile_face">:)</span>           
            </div>
            <div class="code">
             <?php echo($message); ?>
            </div>
            <div class="jump">
                页面自动&nbsp<b><a id="href" href="<?php echo($jumpUrl); ?>">跳转</a> </b>&nbsp,等待时间<b id="wait"><?php echo($waitSecond); ?></b></div>







<?php


 }else{
	 
	 
	 ?>



	 <div class="image_center">
                <span class="smile_face">:(</span>           
            </div>
            <div class="code">
             <?php echo($error); ?>
            </div>
            <div class="jump">
                页面自动&nbsp<b><a id="href" href="<?php echo($jumpUrl); ?>">跳转</a> </b>&nbsp,等待时间<b id="wait"><?php echo($waitSecond); ?></b></div>



<?php



 }
 
 
 
 
 ?>






 </div>






</div>
<script type="text/javascript">
(function(){
var wait = document.getElementById('wait'),href = document.getElementById('href').href;
var interval = setInterval(function(){
	var time = --wait.innerHTML;
	if(time <= 0) {
		location.href = href;
		clearInterval(interval);
	};
}, 1000);
})();
</script>
</body>
</html>

在这里插入图片描述

posted @ 2019-04-03 21:33  孙中明  阅读(187)  评论(0编辑  收藏  举报