Commit d8081c55 authored by hangjun83's avatar hangjun83

乐妍

parent f2d10dba
...@@ -13,6 +13,7 @@ namespace App\Services\ThirdPlatform\Api; ...@@ -13,6 +13,7 @@ namespace App\Services\ThirdPlatform\Api;
use App\Repositories\Contracts\ThirdApiPlatformRepository; use App\Repositories\Contracts\ThirdApiPlatformRepository;
use App\Services\ThirdPlatform\PlatformAbstractService; use App\Services\ThirdPlatform\PlatformAbstractService;
use App\Support\Facades\SimpleLogs;
use App\Support\Traits\HttpClientHelpers; use App\Support\Traits\HttpClientHelpers;
...@@ -66,14 +67,15 @@ class LeyanApiService extends PlatformAbstractService ...@@ -66,14 +67,15 @@ class LeyanApiService extends PlatformAbstractService
'username' => $this->platformInfo['platform_params']['username'], 'username' => $this->platformInfo['platform_params']['username'],
'password' => $this->platformInfo['platform_params']['password'] 'password' => $this->platformInfo['platform_params']['password']
]; ];
$response = $this->getPostClient($this->getPlatformApiUrl().'/ProductDate/getToken',$tokenParams); $response = $this->getPostClient($this->platforminfo['platform_url'].'/ProductDate/getToken',$tokenParams);
$token = $this->apiResponse($response); $token = $this->apiResponse($response);
return $token['data']; return $token['data'];
} }
}catch(\Exception $exception){ }catch(\Exception $exception){
$this->requestError($exception); SimpleLogs::writeLog($exception->getMessage(), __CLASS__.':token error', 'error');
return false;
} }
} }
...@@ -101,9 +103,4 @@ class LeyanApiService extends PlatformAbstractService ...@@ -101,9 +103,4 @@ class LeyanApiService extends PlatformAbstractService
} }
return false; return false;
} }
protected function requestError($err)
{
return false;
}
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment