作者 郭文星

12311

@@ -20,6 +20,14 @@ class Car extends Base @@ -20,6 +20,14 @@ class Car extends Base
20 protected $noNeedLogin = ['*']; 20 protected $noNeedLogin = ['*'];
21 protected $noNeedRight = ['*']; 21 protected $noNeedRight = ['*'];
22 22
  23 + public function _initialize()
  24 + {
  25 + $this->user_id = $this->auth->id;
  26 + if(!$this->user_id){
  27 + $this->error("请登录");
  28 + }
  29 + parent::_initialize();
  30 + }
23 /** 31 /**
24 * 查询常用路线 32 * 查询常用路线
25 * @return void 33 * @return void