From 5d8e2d1dce113e0d0e1604dbbf6d87410315ae10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E6=99=AF=E7=AB=8B?= Date: Wed, 7 Apr 2021 15:49:42 +0800 Subject: [PATCH] Update Login.php --- app/data/controller/api/Login.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/data/controller/api/Login.php b/app/data/controller/api/Login.php index 4ccc4551e..9963816c0 100644 --- a/app/data/controller/api/Login.php +++ b/app/data/controller/api/Login.php @@ -30,7 +30,9 @@ class Login extends Controller */ protected function initialize() { - $this->type = $this->request->header('api-name', input('api')); + // 接收接口类型 + $this->type = $this->request->request('api'); + $this->type = $this->type ?: $this->request->header('api-name'); $this->type = $this->type ?: $this->request->header('api-type'); $this->type = $this->type ?: UserAdminService::API_TYPE_WAP; if (empty(UserAdminService::TYPES[$this->type])) {