撤销首页提示更改

This commit is contained in:
耗子 2025-06-09 14:21:42 +08:00
parent a4698d67c6
commit 8c7c568e5c
No known key found for this signature in database
GPG Key ID: C964D7226D045DAA
2 changed files with 16 additions and 18 deletions

View File

@ -67,8 +67,6 @@ class Index extends BaseController
'software' => $_SERVER['SERVER_SOFTWARE'],
'os' => php_uname(),
'date' => date("Y-m-d H:i:s"),
'no_https' => ! $this->request->isSsl(),
'old_browser' => str_contains($this->request->header('User-Agent'), 'Windows NT') && str_contains($this->request->header('User-Agent'), 'Trident'),
];
View::assign('info', $info);
View::assign('checkupdate', '//auth.cccyun.cc/app/dnsmgr.php?ver=' . config('app.version'));

View File

@ -72,22 +72,8 @@
<!-- /.row -->
<div class="row">
<div class="col-md-12">
<div id="browser-notice">
{if $info.no_https}
<div class="panel panel-default">
<div class="panel-body">
<b style='color:#CC3022;'><i class='fa fa-info-circle fa-fw'></i></b>当前正在使用HTTP访问可能存在被窃取敏感信息风险请使用HTTPS访问
</div>
</div>
{/if}
{if $info.old_browser}
<div class="panel panel-default">
<div class="panel-body">
当前浏览器是兼容模式,为确保后台功能正常使用,请切换到<b style='color:#51b72f'>极速模式</b><br>
操作方法点击浏览器地址栏右侧的IE符号<b style='color:#51b72f;'><i class='fa fa-internet-explorer fa-fw'></i></b>→选择“<b style='color:#51b72f;'><i class='fa fa-flash fa-fw'></i></b><b style='color:#51b72f;'>极速模式</b>
</div>
</div>
{/if}
<div class="col-md-12">
<div id="browser-notice"></div>
</div>
</div>
<div class="col-md-4 col-sm-12">
@ -240,4 +226,18 @@ function cleancache(){
});
}
</script>
<script>
function speedModeNotice(){
var ua = window.navigator.userAgent;
if(ua.indexOf('Windows NT')>-1 && ua.indexOf('Trident/')>-1){
var html = "<div class=\"panel panel-default\"><div class=\"panel-body\">当前浏览器是兼容模式,为确保后台功能正常使用,请切换到<b style='color:#51b72f'>极速模式</b><br>操作方法点击浏览器地址栏右侧的IE符号<b style='color:#51b72f;'><i class='fa fa-internet-explorer fa-fw'></i></b>→选择“<b style='color:#51b72f;'><i class='fa fa-flash fa-fw'></i></b><b style='color:#51b72f;'>极速模式</b></div></div>";
$("#browser-notice").html(html)
}
else if(window.location.protocol.indexOf("https")==-1){
var html = "<div class=\"panel panel-default\"><div class=\"panel-body\"><b style='color:#CC3022;'><i class='fa fa-info-circle fa-fw'></i></b>当前正在使用HTTP访问可能存在被窃取敏感信息风险请使用HTTPS访问</div></div>";
$("#browser-notice").html(html)
}
}
speedModeNotice();
</script>
{/block}