作者 lyh

gx

@@ -138,10 +138,48 @@ class AyrShare @@ -138,10 +138,48 @@ class AyrShare
138 'post'=>$data['post'], 138 'post'=>$data['post'],
139 'platforms'=>$data['platforms'], 139 'platforms'=>$data['platforms'],
140 'profileKey'=>$this->profile_key, 140 'profileKey'=>$this->profile_key,
141 - ''=> 141 + 'mediaUrls'=>$data['mediaUrls']
142 ]; 142 ];
  143 + $url = $this->path.'/api/post';
  144 + return $this->http_click('post',$url,$param);
  145 + }
  146 +
  147 + /**
  148 + * @name :(创建子账户相关操作)post_create_profiles
  149 + * @author :lyh
  150 + * @method :post
  151 + * @time :2023/5/5 15:16
  152 + */
  153 + public function post_create_profiles($data){
  154 + $param = [
  155 + 'title'=>$data['title'],
  156 + ];
  157 + $url = $this->path.'/profiles/profile';
  158 + return $this->http_click('post',$url,$param);
  159 + }
  160 + /**
  161 + * @name :(删除子账户相关操作)post_create_profiles
  162 + * @author :lyh
  163 + * @method :post
  164 + * @time :2023/5/5 15:16
  165 + */
  166 + public function deleted_create_profiles($data){
  167 + $param = [
  168 + 'title'=>$data['title'],
  169 + 'profileKey'=>$this->profile_key,
  170 + ];
  171 + $url = $this->path.'/profiles/profile';
  172 + return $this->http_click('delete',$url,$param);
143 } 173 }
144 174
  175 + public function put_update_profiles($data){
  176 + $param = [
  177 + 'title'=>$data['title'],
  178 + 'profileKey'=>$this->profile_key,
  179 + ];
  180 + $url = $this->path.'/profiles/profile';
  181 + return $this->http_click('put',$url,$param);
  182 + }
145 /** 183 /**
146 * @name :(获取有关用户社交资料的分析和人口统计,例如印象,视图和关注着)post_social 184 * @name :(获取有关用户社交资料的分析和人口统计,例如印象,视图和关注着)post_social
147 * @author :lyh 185 * @author :lyh
@@ -170,7 +208,7 @@ class AyrShare @@ -170,7 +208,7 @@ class AyrShare
170 $post_data['headers'] = !empty($header) ? $header : $this->headers; 208 $post_data['headers'] = !empty($header) ? $header : $this->headers;
171 $client = new Client(); 209 $client = new Client();
172 try { 210 try {
173 - $res = $client->request($method, $url, $post_data)->getBody()->getContents(); 211 + $res = $client->request(strtoupper($method), $url, $post_data)->getBody()->getContents();
174 return $res; 212 return $res;
175 } catch (\Exception $e) { 213 } catch (\Exception $e) {
176 return json_encode(["status"=>"fail","message"=>$e->getMessage()]); 214 return json_encode(["status"=>"fail","message"=>$e->getMessage()]);
@@ -25,7 +25,7 @@ class NewsController extends BaseController @@ -25,7 +25,7 @@ class NewsController extends BaseController
25 public function lists(NewsModel $news,NewsCategoryLogic $newsCategoryLogic){ 25 public function lists(NewsModel $news,NewsCategoryLogic $newsCategoryLogic){
26 $this->map['project_id'] = $this->user['project_id']; 26 $this->map['project_id'] = $this->user['project_id'];
27 $lists = $news->lists($this->map,$this->page,$this->row,$this->order, 27 $lists = $news->lists($this->map,$this->page,$this->row,$this->order,
28 - ['id','category_id','operator_id','status','created_at','updated_at','name','sort','url']); 28 + ['id','category_id','operator_id','status','created_at','updated_at','image','name','sort','url']);
29 if(!empty($lists['list'])){ 29 if(!empty($lists['list'])){
30 foreach ($lists['list'] as $k => $v){ 30 foreach ($lists['list'] as $k => $v){
31 $v = $newsCategoryLogic->get_category_name($v); 31 $v = $newsCategoryLogic->get_category_name($v);