|
|
|
|
@ -21,7 +21,7 @@ class YuanheRepository
|
|
|
|
|
|
|
|
|
|
public function __construct()
|
|
|
|
|
{
|
|
|
|
|
$this->baseUrl = config('yuanhe.base_url');
|
|
|
|
|
$this->baseUrl = rtrim((string) config('yuanhe.base_url'), '/');
|
|
|
|
|
$this->customerId = config('yuanhe.customer_id');
|
|
|
|
|
$this->authKey = config('yuanhe.auth_key');
|
|
|
|
|
}
|
|
|
|
|
@ -49,7 +49,7 @@ class YuanheRepository
|
|
|
|
|
public function companyInfo($params)
|
|
|
|
|
{
|
|
|
|
|
$params = json_encode($params);
|
|
|
|
|
$url = $this->baseUrl . '/master-service/openapi/businessCollege/enterprise/info';
|
|
|
|
|
$url = $this->baseUrl . '/gateway/openapi/businessCollege/enterprise/info';
|
|
|
|
|
$header = $this->getHeader();
|
|
|
|
|
try {
|
|
|
|
|
$result = httpCurl($url, 'POST', $params, $header);
|
|
|
|
|
@ -69,7 +69,7 @@ class YuanheRepository
|
|
|
|
|
*/
|
|
|
|
|
public function search($params)
|
|
|
|
|
{
|
|
|
|
|
$url = $this->baseUrl . '/master-service/openapi/businessCollege/enterprise/search';
|
|
|
|
|
$url = $this->baseUrl . '/gateway/openapi/businessCollege/enterprise/search';
|
|
|
|
|
$header = $this->getHeader();
|
|
|
|
|
try {
|
|
|
|
|
$result = httpCurl($url, 'GET', $params, $header);
|
|
|
|
|
@ -89,7 +89,7 @@ class YuanheRepository
|
|
|
|
|
*/
|
|
|
|
|
public function enterpriseSearchProbe(array $params): array
|
|
|
|
|
{
|
|
|
|
|
$url = $this->baseUrl . '/master-service/openapi/businessCollege/enterprise/search';
|
|
|
|
|
$url = $this->baseUrl . '/gateway/openapi/businessCollege/enterprise/search';
|
|
|
|
|
$headers = $this->getHeader();
|
|
|
|
|
$this->lastRequest = [
|
|
|
|
|
'method' => 'GET',
|
|
|
|
|
@ -115,7 +115,7 @@ class YuanheRepository
|
|
|
|
|
*/
|
|
|
|
|
public function enterprisePackInfo(array $params, int $timeout = 3): array
|
|
|
|
|
{
|
|
|
|
|
$url = $this->baseUrl . '/master-service/openapi/businessCollege/enterprise/packInfo';
|
|
|
|
|
$url = $this->baseUrl . '/gateway/openapi/businessCollege/enterprise/packInfo';
|
|
|
|
|
$header = $this->getHeader();
|
|
|
|
|
$payload = json_encode($params, JSON_UNESCAPED_UNICODE);
|
|
|
|
|
$this->lastRequest = [
|
|
|
|
|
@ -195,7 +195,7 @@ class YuanheRepository
|
|
|
|
|
'openTime' => $course->start_date
|
|
|
|
|
];
|
|
|
|
|
$params = json_encode($params, JSON_UNESCAPED_UNICODE);
|
|
|
|
|
$url = $this->baseUrl . '/master-service/openapi/businessCollege/shareInfo/push';
|
|
|
|
|
$url = $this->baseUrl . '/gateway/openapi/businessCollege/shareInfo/push';
|
|
|
|
|
$header = $this->getHeader();
|
|
|
|
|
try {
|
|
|
|
|
$result = httpCurl($url, 'POST', $params, $header);
|
|
|
|
|
|