建立空模块修改基类、空控制器、错误提示页面
This commit is contained in:
1 parent
eb68505fb8
commit
59b7e4ef1f
17 files changed
+216
-75
No files matched your search
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace app\login\controller;
|
||||
|
||||
// 引用空控制器基类
|
||||
use app\common\controller\BaseError;
|
||||
|
||||
class Error extends BaseError
|
||||
{
|
||||
//
|
||||
}
|
||||
@@ -26,13 +26,17 @@ class Index extends Controller
|
||||
|
||||
$validate = new \app\login\validate\Yanzheng;
|
||||
|
||||
$data = request()->post('username');
|
||||
$data = request()->post();
|
||||
|
||||
if (!$validate->check($data)) {
|
||||
dump($validate->getError());
|
||||
$result = $validate->check($data);
|
||||
$msg = $validate->getError();
|
||||
|
||||
|
||||
|
||||
if(!$result){
|
||||
$this->redirect('/notfound',[], 302, ['msg' => $msg]);
|
||||
}
|
||||
|
||||
|
||||
// return true;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user