['uid' => $uid], 'query' => [], 'http_errors' => false,'headers'=>['Authorization'=>"Bearer ".JWTAuth::getToken()] ]; return http($url,$array, false, 'get'); } catch (\Exception $e) { return []; } } public function getUserInfo($uid) { try { $url = config("customer.manage_service_url").'/user/memberView'; $array = [ 'json' => ['uid' => $uid], 'query' => [], 'http_errors' => false,'headers'=>['Authorization'=>"Bearer ".JWTAuth::getToken()] ]; return http($url,$array, true, 'get'); } catch (\Exception $e) { return []; } } public function getSystemMember($number) { try { $url = config("customer.manage_service_url").'/user/member/getSystemMember'; $array = [ 'json' => ['number' => $number], 'query' => [], 'http_errors' => false,'headers'=>['Authorization'=>"Bearer ".JWTAuth::getToken()] ]; return http($url,$array, false, 'get'); } catch (\Exception $e) { return []; } } public function uploadImage($img) { $path = public_path('image'); if (!file_exists($path)){ mkdir ($path,0777,true); } $fileUrl = $path.date('/Ymd').time().'.jpg'; $content = file_get_contents($img); file_put_contents($fileUrl, $content); try { $url = config("customer.manage_service_url").'/config/upload'; $array = [ 'multipart' => [ [ 'name' => 'image', 'contents' => fopen($fileUrl, 'r'), 'headers' => ['X-Baz' => 'bar'], 'filename' => $fileUrl ] ], 'query' => [], 'http_errors' => false, 'headers'=>['Authorization'=>"Bearer ".JWTAuth::getToken()] ]; $ossUrl = http($url,$array, false, 'post'); } catch (\Exception $e) { $ossUrl = ''; } unlink($fileUrl); return $ossUrl; } function downDown($file_url) { } }