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