mirror of
https://gitee.com/apiadmin/ApiAdmin.git
synced 2025-04-06 03:58:00 +08:00
modified 优化404页面显示
added 空方法自动跳转404
This commit is contained in:
parent
848a121689
commit
cca9484799
@ -11,8 +11,26 @@ use think\Controller;
|
||||
class Base extends Controller {
|
||||
|
||||
public $primaryKey;
|
||||
public $uid;
|
||||
|
||||
public function _initialize(){
|
||||
$this->primaryKey = config('SQL_PRIMARY_KEY');
|
||||
|
||||
//初始化系统
|
||||
$this->uid = session('uid');
|
||||
$this->assign('uid',$this->uid);
|
||||
// $this->iniSystem();
|
||||
|
||||
//控制器初始化
|
||||
if(method_exists($this,'_myInitialize')){
|
||||
$this->_myInitialize();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 空方法默认的页面
|
||||
*/
|
||||
public function _empty(){
|
||||
return (new PublicShow())->show_404();
|
||||
}
|
||||
}
|
@ -1,13 +1,92 @@
|
||||
{extend name="public/base" /}
|
||||
{block name="myStyle"}
|
||||
<style>
|
||||
div.wrapper404 {
|
||||
display:block;
|
||||
width:100%;
|
||||
text-align:left;
|
||||
margin:0;
|
||||
padding:0;
|
||||
}
|
||||
|
||||
.row2 {
|
||||
font-size:13px;
|
||||
font-family:Georgia,"Times New Roman",Times,serif;
|
||||
color:#919191;
|
||||
margin:0;
|
||||
padding:0;
|
||||
|
||||
}
|
||||
|
||||
.row2 a {
|
||||
color:#F90;
|
||||
outline:none;
|
||||
text-decoration:none;
|
||||
}
|
||||
|
||||
div.wrapper404 h1,div.wrapper404 h2,div.wrapper404 h3,div.wrapper404 h4,div.wrapper404 h5,div.wrapper404 h6 {
|
||||
font-size:20px;
|
||||
font-weight:400;
|
||||
line-height:normal;
|
||||
margin:0 0 15px;
|
||||
padding:0;
|
||||
}
|
||||
|
||||
#fof {
|
||||
display:block;
|
||||
width:100%;
|
||||
line-height:1.6em;
|
||||
text-align:center;
|
||||
padding:150px 0;
|
||||
}
|
||||
|
||||
#fof .hgroup {
|
||||
margin-bottom:15px;
|
||||
}
|
||||
|
||||
#fof .hgroup h1,#fof .hgroup h2 {
|
||||
text-transform:uppercase;
|
||||
margin:0;
|
||||
padding:0;
|
||||
}
|
||||
|
||||
#fof .hgroup h1 {
|
||||
margin-bottom:15px;
|
||||
font-size:40px;
|
||||
}
|
||||
|
||||
#fof .hgroup h2 {
|
||||
display:inline-block;
|
||||
font-size:80px;
|
||||
border:solid #CCC;
|
||||
text-transform:lowercase;
|
||||
border-width:1px 0;
|
||||
padding:0 0 15px;
|
||||
}
|
||||
|
||||
#fof p {
|
||||
display:block;
|
||||
font-size:16px;
|
||||
margin:15px 0 0;
|
||||
padding:0;
|
||||
}
|
||||
|
||||
#fof p:first-child {
|
||||
margin-top:0;
|
||||
}
|
||||
</style>
|
||||
{/block}
|
||||
{block name="main"}
|
||||
<div class="error-page">
|
||||
<h2 class="headline text-yellow"> 404</h2>
|
||||
<div class="error-content">
|
||||
<h3><i class="fa fa-warning text-yellow"></i> 糟糕,页面没找到! </h3>
|
||||
<p>
|
||||
您想要访问的页面没有找到。
|
||||
您可以选择访问 <a href="{:url('Index/index')}">管理后台首页</a> 或者可以通过 <a href="{:config('WEBSITE_DOMAIN')}">官网</a> 寻求帮助!
|
||||
</p>
|
||||
<div class="wrapper404 row2">
|
||||
<div id="container" class="clear">
|
||||
<div id="fof" class="clear">
|
||||
<div class="hgroup">
|
||||
<h1>糟糕,系统出错了 !</h1>
|
||||
<h2>404 Error</h2>
|
||||
</div>
|
||||
<p>由于一些原因,您访问的网页不存在!</p>
|
||||
<p><a href="javascript:history.go(-1)">返回</a>上一页 或者 <a href="#">回到首页</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
|
Loading…
x
Reference in New Issue
Block a user