mirror of
https://gitee.com/koogua/course-tencent-cloud.git
synced 2025-07-16 21:26:13 +08:00
统一规范$this->response->redirect
This commit is contained in:
parent
549b8ba970
commit
20987355c9
@ -16,7 +16,7 @@
|
||||
</div>
|
||||
<div class="kg-nav-right">
|
||||
<a class="layui-btn layui-btn-sm" href="{{ category_url }}">
|
||||
<i class="layui-icon layui-icon-add-1"></i>分类管理
|
||||
<i class="layui-icon layui-icon-add-1"></i>课程分类
|
||||
</a>
|
||||
<a class="layui-btn layui-btn-sm" href="{{ add_url }}">
|
||||
<i class="layui-icon layui-icon-add-1"></i>添加课程
|
||||
@ -124,4 +124,4 @@
|
||||
|
||||
{{ partial('partials/pager') }}
|
||||
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
@ -27,7 +27,10 @@ class OrderController extends Controller
|
||||
parent::beforeExecuteRoute($dispatcher);
|
||||
|
||||
if ($this->authUser->id == 0) {
|
||||
$this->response->redirect(['for' => 'home.account.login']);
|
||||
$dispatcher->forward([
|
||||
'controller' => 'account',
|
||||
'action' => 'login',
|
||||
]);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -27,7 +27,10 @@ class PointGiftController extends Controller
|
||||
parent::beforeExecuteRoute($dispatcher);
|
||||
|
||||
if ($this->authUser->id == 0) {
|
||||
$this->response->redirect(['for' => 'home.account.login']);
|
||||
$dispatcher->forward([
|
||||
'controller' => 'account',
|
||||
'action' => 'login',
|
||||
]);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -24,7 +24,10 @@ class TeacherConsoleController extends Controller
|
||||
parent::beforeExecuteRoute($dispatcher);
|
||||
|
||||
if ($this->authUser->id == 0) {
|
||||
$this->response->redirect(['for' => 'home.account.login']);
|
||||
$dispatcher->forward([
|
||||
'controller' => 'account',
|
||||
'action' => 'login',
|
||||
]);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -115,4 +118,4 @@ class TeacherConsoleController extends Controller
|
||||
$this->view->setVar('obs', $obs);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -44,7 +44,10 @@ class UserConsoleController extends Controller
|
||||
parent::beforeExecuteRoute($dispatcher);
|
||||
|
||||
if ($this->authUser->id == 0) {
|
||||
$this->response->redirect(['for' => 'home.account.login']);
|
||||
$dispatcher->forward([
|
||||
'controller' => 'account',
|
||||
'action' => 'login',
|
||||
]);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -15,6 +15,7 @@ use App\Exceptions\Unauthorized as UnauthorizedException;
|
||||
use App\Library\Logger as AppLogger;
|
||||
use Phalcon\Config;
|
||||
use Phalcon\Di\Injectable;
|
||||
use Throwable;
|
||||
|
||||
class HttpErrorHandler extends Injectable
|
||||
{
|
||||
@ -25,7 +26,7 @@ class HttpErrorHandler extends Injectable
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \Throwable $e
|
||||
* @param Throwable $e
|
||||
*/
|
||||
public function handleException($e)
|
||||
{
|
||||
@ -45,7 +46,7 @@ class HttpErrorHandler extends Injectable
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \Throwable $e
|
||||
* @param Throwable $e
|
||||
*/
|
||||
protected function setStatusCode($e)
|
||||
{
|
||||
@ -65,7 +66,7 @@ class HttpErrorHandler extends Injectable
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \Throwable $e
|
||||
* @param Throwable $e
|
||||
*/
|
||||
protected function report($e)
|
||||
{
|
||||
@ -86,7 +87,7 @@ class HttpErrorHandler extends Injectable
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \Throwable $e
|
||||
* @param Throwable $e
|
||||
*/
|
||||
protected function apiError($e)
|
||||
{
|
||||
@ -98,7 +99,7 @@ class HttpErrorHandler extends Injectable
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \Throwable $e
|
||||
* @param Throwable $e
|
||||
*/
|
||||
protected function ajaxError($e)
|
||||
{
|
||||
@ -110,7 +111,7 @@ class HttpErrorHandler extends Injectable
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \Throwable $e
|
||||
* @param Throwable $e
|
||||
*/
|
||||
protected function pageError($e)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user