建立空模块修改基类、空控制器、错误提示页面
This commit is contained in:
1 parent
eb68505fb8
commit
59b7e4ef1f
17 files changed
+216
-75
No files matched your search
@@ -12,7 +12,15 @@ class Base extends Controller
|
||||
{
|
||||
|
||||
// 调用Auth中间件进行用户权限验证
|
||||
protected $middleware = ['YanZheng'];
|
||||
protected $middleware = [
|
||||
'YanZheng'=>[
|
||||
'except'=>[
|
||||
'notfound',
|
||||
'mysuccess',
|
||||
'ajaxData'
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
public function _empty()
|
||||
{
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\controller;
|
||||
|
||||
// 引用控制器类
|
||||
use think\Controller;
|
||||
|
||||
class BaseError extends Controller
|
||||
{
|
||||
/**
|
||||
* 显示资源列表
|
||||
*
|
||||
* @return \think\Response
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
// 跳转页面
|
||||
$this->redirect(url('/notfound'));
|
||||
}
|
||||
|
||||
public function _empty()
|
||||
{
|
||||
$this->redirect(url('/notfound'));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace app\error\controller;
|
||||
|
||||
use think\Controller;
|
||||
use think\Request;
|
||||
|
||||
class Index extends Controller
|
||||
{
|
||||
/**
|
||||
* 显示资源列表
|
||||
*
|
||||
* @return \think\Response
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
//
|
||||
return $this->fetch();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Loaded 3 of 17 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user