修改中间件

This commit is contained in:
瓜哥 committed 2021-08-02 21:27:57 +08:00
1 parent e29555326f
commit f46a54bf80
10 files changed
+148 -135

No files matched your search

+15 -7
View File
@@ -19,17 +19,21 @@ class Index extends BaseController
// 清除session(当前作用域)
session(null);
// 获取信息
$sysbasemod = new \app\system\model\SystemBase; # 关键字
if(!$sysbasemod)
{
$list = $sysbasemod::sysInfo(); # 描述
} else {
// 启动事务
\think\facade\Db::startTrans();
try {
$sysbasemod = new \app\system\model\SystemBase; # 关键字
$list = $sysbasemod::sysInfo();
if($list == null) {
$list['sys_title'] = config('shangma.webtitle');
}
// \think\facade\Db::commit();
} catch (\Exception $e) {
// 回滚事务
$list['sys_title'] = config('shangma.webtitle');
}
// 获取系统名称和版本号
$list['version'] = config('shangma.version');
$this->view->assign('list',$list);
// 渲染输出
@@ -47,6 +51,8 @@ class Index extends BaseController
,'password'
,'category'
]);
$list['username'] = trim($list['username']);
$list['password'] = trim($list['password']);
$validate = new \app\login\validate\Yanzheng;
$result = $validate->scene('admin')->check($list);
@@ -88,6 +94,8 @@ class Index extends BaseController
,'password'
,'category'
]);
$list['username'] = trim($list['username']);
$list['password'] = trim($list['password']);
$validate = new \app\login\validate\Yanzheng;
$result = $validate->scene('admin')->check($list);