正在显示
1 个修改的文件
包含
5 行增加
和
1 行删除
| @@ -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 | /** |
-
请 注册 或 登录 后发表评论