Update Login.php

This commit is contained in:
邹景立 2021-04-07 15:49:42 +08:00
parent a5f11218f8
commit 5d8e2d1dce

View File

@ -30,7 +30,9 @@ class Login extends Controller
*/ */
protected function initialize() 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 ?: $this->request->header('api-type');
$this->type = $this->type ?: UserAdminService::API_TYPE_WAP; $this->type = $this->type ?: UserAdminService::API_TYPE_WAP;
if (empty(UserAdminService::TYPES[$this->type])) { if (empty(UserAdminService::TYPES[$this->type])) {