path()); $method = $urls[count($urls) - 1]; if (in_array($method, $this->cNoNeedLogin)) return; $session_token = $request->header("session_token"); $response = new HttpResponseException(Response::create([ 'code' => 401, 'msg' => "请先登录", 'time' => Request::instance()->server('REQUEST_TIME'), 'data' => null, ], 'json')->header([])); if (is_null($session_token)) throw $response; $m = \app\api\model\massager\Massager::where([ "session_token" => $session_token, ])->where("status", "in", [\E_MASSAGER_STATUS::Normal, \E_MASSAGER_STATUS::Hidden])->find(); if (!$m) throw $response; $this->massager = $m; } }