修复用户未登录时异步请求会跳转到登陆页的bug
Showing
1 changed file
with
2 additions
and
2 deletions
@@ -28,11 +28,11 @@ class HomeController extends AbstractAction | @@ -28,11 +28,11 @@ class HomeController extends AbstractAction | ||
28 | // @todo 为了方便测试,支持传uid参数 | 28 | // @todo 为了方便测试,支持传uid参数 |
29 | $uid = $this->getUid(); | 29 | $uid = $this->getUid(); |
30 | if (!$uid) { | 30 | if (!$uid) { |
31 | - $this->_uid = $this->get('uid', 8826435); //$this->getUid(true); | 31 | +// $this->_uid = $this->get('uid', 8826435); //$this->getUid(true); |
32 | } | 32 | } |
33 | 33 | ||
34 | $action = $this->getRequest()->getActionName(); | 34 | $action = $this->getRequest()->getActionName(); |
35 | - if (!$this->_uid && $action !== 'index') { | 35 | + if (!$this->_uid && $action !== 'index' && $this->isAjax()) { |
36 | $this->go(Helpers::url('/signin.html')); | 36 | $this->go(Helpers::url('/signin.html')); |
37 | } | 37 | } |
38 | 38 |
-
Please register or login to post a comment