欢迎页
This commit is contained in:
1 parent
6eb9b489d9
commit
4c87db0263
4 files changed
+17
-38
No files matched your search
@@ -1,28 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\controller;
|
||||
|
||||
// 引用控制器类
|
||||
use app\BaseController;
|
||||
// 引用权限验证类
|
||||
use think\auth\Auth;
|
||||
|
||||
|
||||
class Base extends Controller
|
||||
{
|
||||
|
||||
// 调用Auth中间件进行用户权限验证
|
||||
protected $middleware = [
|
||||
'OnLine'=>[
|
||||
'except'=>[
|
||||
'exit',
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
public function _empty()
|
||||
{
|
||||
$this->error('不好意思,您访问的页面不存在~');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -12,15 +12,20 @@ class BaseError extends BaseController
|
||||
*
|
||||
* @return \think\Response
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
// 跳转页面
|
||||
$this->error('不好意思,您访问的页面不存在~');
|
||||
}
|
||||
// public function index()
|
||||
// {
|
||||
// // 跳转页面
|
||||
// $this->error('不好意思,您访问的页面不存在~');
|
||||
// }
|
||||
|
||||
public function _empty()
|
||||
// public function _empty()
|
||||
// {
|
||||
// $this->error('不好意思,您访问的页面不存在~');
|
||||
// }
|
||||
|
||||
public function __call($method, $args)
|
||||
{
|
||||
$this->error('不好意思,您访问的页面不存在~');
|
||||
return 'error request!';
|
||||
}
|
||||
|
||||
}
|
||||
@@ -6,6 +6,8 @@ namespace app\index\controller;
|
||||
use app\BaseController;
|
||||
// 引用与此控制器同名的数据模型
|
||||
use app\system\model\SystemBase as sysbasemod;
|
||||
// 引用视图功能类
|
||||
use think\facade\View;
|
||||
|
||||
|
||||
|
||||
@@ -141,11 +143,11 @@ class Index extends BaseController
|
||||
|
||||
|
||||
// 模版赋值
|
||||
$this->assign('list',$list);
|
||||
View::assign('list',$list);
|
||||
|
||||
|
||||
// 渲染输出
|
||||
return $this->fetch();
|
||||
return View::fetch('welcome');
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loaded 3 of 4 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user