作者 郭文星

1231

@@ -22,9 +22,13 @@ class Car extends Base @@ -22,9 +22,13 @@ class Car extends Base
22 22
23 public function _initialize() 23 public function _initialize()
24 { 24 {
25 - if(!$this->auth->id){ 25 + $where["id"] = ["=", $this->auth->id];
  26 +
  27 + $user = Db::name("user")->where($where)->order("id desc")->find();
  28 + if (empty($user)) {
26 $this->error("tokrn失效,请重新登录。","","403"); 29 $this->error("tokrn失效,请重新登录。","","403");
27 } 30 }
  31 +
28 parent::_initialize(); 32 parent::_initialize();
29 } 33 }
30 /** 34 /**