get($this->tokenParam); if (is_string($accessToken)) { /* @var User $identity */ $identity = $user->loginByAccessToken($accessToken, get_class($this)); //商家验证 $store = $identity->store; if (empty($store) || $store->status == StatusEnum::STATUS_OFF) { $this->handleFailure($response); } if ($identity !== null) { return $identity; } } if ($accessToken !== null) { $this->handleFailure($response); } return null; } /** * @param $response * @throws HttpException * @author nodelog */ public function handleFailure($response) { throw new HttpException(CodeEnum::CODE_FORBIDDEN, '您没有权限,请联系管理员'); } }