作者 lyh

gx

... ... @@ -138,10 +138,48 @@ class AyrShare
'post'=>$data['post'],
'platforms'=>$data['platforms'],
'profileKey'=>$this->profile_key,
''=>
'mediaUrls'=>$data['mediaUrls']
];
$url = $this->path.'/api/post';
return $this->http_click('post',$url,$param);
}
/**
* @name :(创建子账户相关操作)post_create_profiles
* @author :lyh
* @method :post
* @time :2023/5/5 15:16
*/
public function post_create_profiles($data){
$param = [
'title'=>$data['title'],
];
$url = $this->path.'/profiles/profile';
return $this->http_click('post',$url,$param);
}
/**
* @name :(删除子账户相关操作)post_create_profiles
* @author :lyh
* @method :post
* @time :2023/5/5 15:16
*/
public function deleted_create_profiles($data){
$param = [
'title'=>$data['title'],
'profileKey'=>$this->profile_key,
];
$url = $this->path.'/profiles/profile';
return $this->http_click('delete',$url,$param);
}
public function put_update_profiles($data){
$param = [
'title'=>$data['title'],
'profileKey'=>$this->profile_key,
];
$url = $this->path.'/profiles/profile';
return $this->http_click('put',$url,$param);
}
/**
* @name :(获取有关用户社交资料的分析和人口统计,例如印象,视图和关注着)post_social
* @author :lyh
... ... @@ -170,7 +208,7 @@ class AyrShare
$post_data['headers'] = !empty($header) ? $header : $this->headers;
$client = new Client();
try {
$res = $client->request($method, $url, $post_data)->getBody()->getContents();
$res = $client->request(strtoupper($method), $url, $post_data)->getBody()->getContents();
return $res;
} catch (\Exception $e) {
return json_encode(["status"=>"fail","message"=>$e->getMessage()]);
... ...
... ... @@ -25,7 +25,7 @@ class NewsController extends BaseController
public function lists(NewsModel $news,NewsCategoryLogic $newsCategoryLogic){
$this->map['project_id'] = $this->user['project_id'];
$lists = $news->lists($this->map,$this->page,$this->row,$this->order,
['id','category_id','operator_id','status','created_at','updated_at','name','sort','url']);
['id','category_id','operator_id','status','created_at','updated_at','image','name','sort','url']);
if(!empty($lists['list'])){
foreach ($lists['list'] as $k => $v){
$v = $newsCategoryLogic->get_category_name($v);
... ...