作者 郭文星

1231

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