建立空模块修改基类、空控制器、错误提示页面

This commit is contained in:
巴掌 committed 2018-10-15 16:39:15 +08:00
1 parent eb68505fb8
commit 59b7e4ef1f
17 files changed
+216 -75

No files matched your search

+41 -2
View File
@@ -7,6 +7,45 @@ use app\common\controller\Base;
class Index extends Base
{
// 跳转页面
$this->redirect(url('/notfound'));
// /**
// * 操作成功跳转
// *
// * @return \think\Response
// */
public function mysuccess($msg = '操作成功~')
{
// 模版赋值
$this->assign('msg',$msg);
// 跳转页面
return $this->fetch();
}
/**
* 操作失败跳转
*
* @return \think\Response
*/
public function notfound()
{
if (session('?msg'))
{
$msg = session('msg');
session('msg', null);
}else{
$msg = '不好意思,您访问的页面不存在~';
}
// 模版赋值
$this->assign('msg',$msg);
// 跳转页面
return $this->fetch();
}
}