作者 lyh

gx——ayr文档更新,同步更新接口

... ... @@ -116,29 +116,22 @@ zFePUMXy1bFghAfzNKlrc5XgH4ixeeMh3cDtU97K
//平台参数处理
$param['idempotencyKey'] = uniqid().time();
$url = $this->path.'/api/post';
return $this->http_post_ayr($url,$param,$api_key);
}
public function http_post_ayr($url,$param,$api_key){
$curl = curl_init();
curl_setopt_array($curl, array(
curl_setopt_array($curl, [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => http_build_query($param),
CURLOPT_HTTPHEADER => array(
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => json_encode($param),
CURLOPT_HTTPHEADER => [
'Authorization: Bearer '.$api_key,
'Accept-Encoding: gzip'
),
));
'Content-Type: application/json'
],
]);
$response = curl_exec($curl);
curl_close($curl);
return $response;
}
/**
* @name :(上传图片或视频到ayr_share)post_media_upload
* @author :lyh
... ...
... ... @@ -88,7 +88,9 @@ class AyrReleaseController extends BaseController
}
//发送请求发布社交文章
$res = $ayrShare->post_send_msg($param,$share_info['profile_key']);
if($res){
$ayrReleaseLogic->release_add($res);
}
//保存返回的内容
$this->response('success',Code::SUCCESS,json_decode($res));
}
... ...
... ... @@ -34,7 +34,7 @@ class RatingLogic extends BaseLogic
*/
public function getRatingRead(){
$data = [
'company'=>$this->project['company'],
'company'=>$this->project['company'] ?? '',
'mobile'=>$this->user['mobile'],
'uptime'=>$this->project['uptime'],
'domain'=>$this->user['domain'],
... ...