作者 lyh

Merge branch 'master-server' of http://47.244.231.31:8099/zhl/globalso-v6

@@ -116,29 +116,22 @@ zFePUMXy1bFghAfzNKlrc5XgH4ixeeMh3cDtU97K @@ -116,29 +116,22 @@ zFePUMXy1bFghAfzNKlrc5XgH4ixeeMh3cDtU97K
116 //平台参数处理 116 //平台参数处理
117 $param['idempotencyKey'] = uniqid().time(); 117 $param['idempotencyKey'] = uniqid().time();
118 $url = $this->path.'/api/post'; 118 $url = $this->path.'/api/post';
119 - return $this->http_post_ayr($url,$param,$api_key);  
120 - }  
121 - public function http_post_ayr($url,$param,$api_key){  
122 $curl = curl_init(); 119 $curl = curl_init();
123 - curl_setopt_array($curl, array( 120 + curl_setopt_array($curl, [
124 CURLOPT_URL => $url, 121 CURLOPT_URL => $url,
125 CURLOPT_RETURNTRANSFER => true, 122 CURLOPT_RETURNTRANSFER => true,
126 - CURLOPT_ENCODING => '',  
127 - CURLOPT_MAXREDIRS => 10,  
128 - CURLOPT_TIMEOUT => 0,  
129 - CURLOPT_FOLLOWLOCATION => true,  
130 - CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,  
131 - CURLOPT_CUSTOMREQUEST => 'POST',  
132 - CURLOPT_POSTFIELDS => http_build_query($param),  
133 - CURLOPT_HTTPHEADER => array( 123 + CURLOPT_POST => true,
  124 + CURLOPT_POSTFIELDS => json_encode($param),
  125 + CURLOPT_HTTPHEADER => [
134 'Authorization: Bearer '.$api_key, 126 'Authorization: Bearer '.$api_key,
135 - 'Accept-Encoding: gzip'  
136 - ),  
137 - )); 127 + 'Content-Type: application/json'
  128 + ],
  129 + ]);
138 $response = curl_exec($curl); 130 $response = curl_exec($curl);
139 curl_close($curl); 131 curl_close($curl);
140 return $response; 132 return $response;
141 } 133 }
  134 +
142 /** 135 /**
143 * @name :(上传图片或视频到ayr_share)post_media_upload 136 * @name :(上传图片或视频到ayr_share)post_media_upload
144 * @author :lyh 137 * @author :lyh
@@ -88,7 +88,9 @@ class AyrReleaseController extends BaseController @@ -88,7 +88,9 @@ class AyrReleaseController extends BaseController
88 } 88 }
89 //发送请求发布社交文章 89 //发送请求发布社交文章
90 $res = $ayrShare->post_send_msg($param,$share_info['profile_key']); 90 $res = $ayrShare->post_send_msg($param,$share_info['profile_key']);
91 - $ayrReleaseLogic->release_add($res); 91 + if($res){
  92 + $ayrReleaseLogic->release_add($res);
  93 + }
92 //保存返回的内容 94 //保存返回的内容
93 $this->response('success',Code::SUCCESS,json_decode($res)); 95 $this->response('success',Code::SUCCESS,json_decode($res));
94 } 96 }
@@ -453,30 +453,23 @@ class BTemplateLogic extends BaseLogic @@ -453,30 +453,23 @@ class BTemplateLogic extends BaseLogic
453 if($info['list_customized'] == BTemplate::IS_VISUALIZATION || $info['detail_customized'] == BTemplate::IS_VISUALIZATION) { 453 if($info['list_customized'] == BTemplate::IS_VISUALIZATION || $info['detail_customized'] == BTemplate::IS_VISUALIZATION) {
454 $data['html'] = $html; 454 $data['html'] = $html;
455 $data['type'] = BTemplate::ALL_HTML; 455 $data['type'] = BTemplate::ALL_HTML;
456 - }else{  
457 - $mainInfo = $this->handleTemplateHtml($html);  
458 - $data['main_html'] = $mainInfo['main_html'];  
459 - $data['main_css'] = $mainInfo['main_css']; 456 + return $this->success($data);
460 } 457 }
461 - return $this->success($data);  
462 - }  
463 - $type = $this->getCustomizedType($source, $is_list);//获取定制界面类型  
464 - //查看当前页面是否定制,是否开启可视化  
465 - $page_array = (array)$this->user['is_visualization']->page_array;//获取所有定制界面  
466 - if (in_array($type, $page_array)) {//当前页面是定制界面  
467 - $data['html'] = $html;  
468 - $data['type'] = BTemplate::ALL_HTML;  
469 }else{ 458 }else{
470 - $mainInfo = $this->handleTemplateHtml($html);  
471 - $data['main_html'] = $mainInfo['main_html'];  
472 - $data['main_css'] = $mainInfo['main_css']; 459 + $type = $this->getCustomizedType($source, $is_list);//获取定制界面类型
  460 + //查看当前页面是否定制,是否开启可视化
  461 + $page_array = (array)$this->user['is_visualization']->page_array;//获取所有定制界面
  462 + if (in_array($type, $page_array)) {//当前页面是定制界面
  463 + $data['html'] = $html;
  464 + $data['type'] = BTemplate::ALL_HTML;
  465 + return $this->success($data);
  466 + }
473 } 467 }
474 - }else{  
475 - $mainInfo = $this->handleTemplateHtml($html);  
476 - $data['main_html'] = $mainInfo['main_html'];  
477 - $data['main_css'] = $mainInfo['main_css'];  
478 } 468 }
479 - return $data; 469 + $mainInfo = $this->handleTemplateHtml($html);
  470 + $data['main_html'] = $mainInfo['main_html'];
  471 + $data['main_css'] = $mainInfo['main_css'];
  472 + return $this->success($data);
480 } 473 }
481 474
482 /** 475 /**
@@ -34,7 +34,7 @@ class RatingLogic extends BaseLogic @@ -34,7 +34,7 @@ class RatingLogic extends BaseLogic
34 */ 34 */
35 public function getRatingRead(){ 35 public function getRatingRead(){
36 $data = [ 36 $data = [
37 - 'company'=>$this->project['company'], 37 + 'company'=>$this->project['company'] ?? '',
38 'mobile'=>$this->user['mobile'], 38 'mobile'=>$this->user['mobile'],
39 'uptime'=>$this->project['uptime'], 39 'uptime'=>$this->project['uptime'],
40 'domain'=>$this->user['domain'], 40 'domain'=>$this->user['domain'],