Authored by hf

do modify detail page show tags and home page support test uid

@@ -27,7 +27,12 @@ class HomeController extends AbstractAction @@ -27,7 +27,12 @@ class HomeController extends AbstractAction
27 public function init() 27 public function init()
28 { 28 {
29 // 检查用户是否登录, 未登录则跳转到登录页 29 // 检查用户是否登录, 未登录则跳转到登录页
30 - $uid = 8826435; //$this->getUid(true); 30 + // @todo 为了方便测试,支持传uid参数
  31 + $uid = $this->getUid();
  32 + if (!$uid) {
  33 + $uid = $this->_uid = $this->get('uid', 8826435); //$this->getUid(true);
  34 + }
  35 +
31 $action = $this->getRequest()->getActionName(); 36 $action = $this->getRequest()->getActionName();
32 if (!$uid && $action !== 'index') { 37 if (!$uid && $action !== 'index') {
33 $this->go(Helpers::url('/signin.html')); 38 $this->go(Helpers::url('/signin.html'));