{extend name="common:base" /}
{block name="body"}
<div class="layui-container fly-marginTop">
	<div class="fly-panel">
	  <div class="fly-none">
 <?php switch ($code) {?>
            <?php case 1:?>
	    <h2><?php echo(strip_tags($msg));?></h2>
      <p>页面自动 <a style="color:#393D49" id="href" href="<?php echo($url);?>">跳转</a> 等待时间： <b id="wait"><?php echo($wait);?></b></p>
            <?php break;?>
            <?php case 0:?>
	    <h2><?php echo(strip_tags($msg));?></h2>
	    <p>页面自动 <a  style="color:#2F4056" id="href" href="<?php echo($url);?>">跳转</a> 等待时间： <b id="wait"><?php echo($wait);?></b></p>
            <?php break;?>
        <?php } ?>
	  </div>
	</div>
</div>

{/block}
{block name="script"}

<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>


{/block}