Pre Merge pull request !477 from 御宅男(YznCMS官方)/demo

pull/477/MERGE
御宅男(YznCMS官方) 2024-11-28 10:23:51 +00:00 committed by Gitee
commit 013d6cdc0b
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 4 additions and 3 deletions

View File

@ -41,18 +41,19 @@
<p class="clearfix"> <p class="clearfix">
<a href="__PUBLIC__" class="btn btn-grey">{:__('Go back')}</a> <a href="__PUBLIC__" class="btn btn-grey">{:__('Go back')}</a>
{if $url} {if $url}
<a href="{$url|htmlentities}" class="btn btn-primary">{:__('Jump now')}</a> <a id="href" href="{$url|htmlentities}" class="btn btn-primary">{:__('Jump now')}</a>
{/if} {/if}
</p> </p>
</div> </div>
{if $url} {if $url}
<script type="text/javascript"> <script type="text/javascript">
(function () { (function () {
var wait = document.getElementById('wait'); var wait = document.getElementById('wait'),
href = document.getElementById('href').href;
var interval = setInterval(function () { var interval = setInterval(function () {
var time = --wait.innerHTML; var time = --wait.innerHTML;
if (time <= 0) { if (time <= 0) {
location.href = "{$url|htmlentities}"; location.href = href;
clearInterval(interval); clearInterval(interval);
} }
}, 1000); }, 1000);