[更新]修复后台ajax会话超时的跳转链接

This commit is contained in:
Anyon 2017-06-19 11:14:45 +08:00
parent 62eca2a98d
commit 86cdbd1a66

View File

@ -45,7 +45,7 @@ class AccessAuth {
// 用户登录状态检查
if ((!empty($vars['checkAuth']) || !empty($vars['checkLogin'])) && !session('user')) {
if ($this->request->isAjax()) {
$result = ['code' => 0, 'msg' => '抱歉, 您还没有登录获取访问权限!', 'data' => '', 'url' => '@admin/login', 'wait' => 3];
$result = ['code' => 0, 'msg' => '抱歉, 您还没有登录获取访问权限!', 'data' => '', 'url' => url('@admin/login'), 'wait' => 3];
throw new HttpResponseException(json($result));
}
throw new HttpResponseException(redirect('@admin/login'));