all(); $params = $validator->check($params, 'login'); if(!is_array($params)){ return message($params, false); } $apiKey = request()->post('api_key',''); if(!$apiInfo = ApiService::make()->checkApi($apiKey)){ return message(ApiService::make()->getError(), false); } $apiId = isset($apiInfo['id'])? $apiInfo['id'] : 0; if($apiId<=0){ return message(6002, false); } if(!$result = MemberService::make()->apiLogin($apiId,$params)){ return message(MemberService::make()->getError(), false); } return message(2004, true, $result); } public function register(MemberValidator $validator) { $params = request()->all(); $params = $validator->check($params, 'reg'); if(!is_array($params)){ return message($params, false); } $apiKey = request()->post('api_key',''); if(!$apiInfo = ApiService::make()->checkApi($apiKey)){ return message(ApiService::make()->getError(), false); } $apiId = isset($apiInfo['id'])? $apiInfo['id'] : 0; if($apiId<=0){ return message(6002, false); } if(!$result = MemberService::make()->apiLogin($apiId,$params)){ return message(MemberService::make()->getError(), false); } return message(2004, true, $result); } }