作者 Your Name

Merge branch 'dev' of http://47.244.231.31:8099/zhl/globalso-v6 into dev

... ... @@ -17,26 +17,11 @@ class AyrShare
];
//profile_key
public $profile_key = "-----BEGIN RSA PRIVATE KEY-----
MIICWgIBAAKBgGFatMeBeaw7QJrqmylMLZlwuuO0FA/EZg5/g7Rrqu+FgpwvFkJq
9twEZJY+aIdDH8/RVrCZQGR/xUxKw9v4ows+sLwi4g41m8KRKDXUcJwQvSlwsHAi
h9hPGZxDsRK0Nv4pZ7XqGgh0Wb0VypX/+Q1dhX9BnXQmvEKayk8GQWQxAgMBAAEC
gYAFqOJNnudV7fPpja4LjpQwEW+sATIRYJeWTC9587ByUE6xicM/hTxouhCm82Xc
Rzi4OjFR/vbRYOQ1dTtBtIi18fdRrseQNyR/N2NZjw1X8n5aZcw5NVaa3d3YTQNa
uzjnYF5eYSOD4pNKKIDc35VHdmvGCV/JXwQKMTgu1+4AAQJBAL5jjN3kvMKFF8vG
DyYR8k+wPG9iXAdR0HjVNB3OzxKVW0MTwM32pJBXCmF1MOziL8WC48VHQL48hVRa
52xRqAECQQCC53rrrOPhPCLIb6kBfgqnxCojqlUK9paFL7NYTPtLYcOajY6+NiKT
CG1gaOwZh4r34HF7I59l/Ds98Z4nQDwxAkAC4/oIiGeBQIoK8vfZ6R3XreJNAp5J
EinrG7mN1kz4iEH5c7xSpDL9agTjU+cpQYneIs2Yeit2d+7CSBsJXvgBAkBDFsfU
yYLxCJT7DN8dOK/VU6AVL1Luj3qNP+k2tB2GgNBzAWHK8ou9t2/3HU8DtofuikUe
yx8Cccca9B4OF8nBAkAgIUZKGmVNFcGnFFo55vSJInNXFo4HCJ2o4DunBORVtQ/j
zFePUMXy1bFghAfzNKlrc5XgH4ixeeMh3cDtU97K
-----END RSA PRIVATE KEY-----";
public $profile_key = '';
//设置请求头
public $headers = [
'Authorization' => 'Bearer ',
'Content-Type' => 'application/json',
// 'Accept-Encoding' => 'deflate, gzip',
];
/**
... ... @@ -133,7 +118,7 @@ class AyrShare
* @method :post
* @time :2023/5/5 15:00
*/
public function post_user($data){
public function post_profiles($data){
$param = [
'post'=>$data['post'],
'platforms'=>$data['platforms'],
... ... @@ -145,7 +130,7 @@ class AyrShare
}
/**
* @name :(创建子账户相关操作)post_create_profiles
* @name :(创建子账户配置文件)post_create_profiles
* @author :lyh
* @method :post
* @time :2023/5/5 15:16
... ... @@ -154,11 +139,11 @@ class AyrShare
$param = [
'title'=>$data['title'],
];
$url = $this->path.'/profiles/profile';
$url = $this->path.'/api/profiles/profile';
return $this->http_click('post',$url,$param);
}
/**
* @name :(删除子账户相关操作)post_create_profiles
* @name :(删除子账户配置文件)post_create_profiles
* @author :lyh
* @method :post
* @time :2023/5/5 15:16
... ... @@ -168,24 +153,51 @@ class AyrShare
'title'=>$data['title'],
'profileKey'=>$this->profile_key,
];
$url = $this->path.'/profiles/profile';
$url = $this->path.'/api/profiles/profile';
return $this->http_click('delete',$url,$param);
}
/**
* @remark :支持 Instagram, Facebook, Twitter, YouTube.
* @name :(修改子账户)put_update_profiles
* @author :lyh
* @method :post
* @time :2023/5/5 17:00
*/
public function put_update_profiles($data){
$param = [
'title'=>$data['title'],
'profileKey'=>$this->profile_key,
];
$url = $this->path.'/profiles/profile';
$url = $this->path.'/api/profiles/profile';
return $this->http_click('put',$url,$param);
}
/**
* @name :(获取有关用户社交资料的分析和人口统计,例如印象,视图和关注着)post_social
* @author :lyh
* @name :(通过用户名获取社交账号)get_brand_user
* @author :lyh https://app.ayrshare.com/api/brand/byUser
* @method :post
* @time :2023/5/5 10:37
* @time :2023/5/5 17:32
*/
public function get_brand_user($param){
//[[platforms,'instagram','user']],[platforms,'twitter',user]]
$str = '';
foreach ($param as $k =>$v){
$str .= $v[0][$k].'='.$v[1];
}
$url = $this->path.'/api/brand/byUser?'.$str;
return $this->http_click('get',$url);
}
public function get_profiles(){
// $param = [
// 'title'=>$data['title'],
// 'refId'=>$data['refId'],
// 'profileKey'=>$this->profile_key,
// ];
$url = $this->path.'/api/profile';
return $this->http_click('get',$url);
}
public function api_user(){
$post_data = [
'platforms' => ['facebook', 'instagram', 'twitter', 'linkedin', 'pinterest', 'youtube', 'tiktok'],
... ...
<?php
namespace App\Http\Controllers\Bside\AyrShare;
use App\Enums\Common\Code;
use App\Http\Controllers\Bside\BaseController;
use App\Models\AyrShare\AyrShare as AyrShareModel;
/**
* @name:社交绑定
*/
class AyrShareController extends BaseController
{
/**
* @name :(社交列表)lists
* @author :lyh
* @method :post
* @time :2023/5/5 16:06
*/
public function lists(AyrShareModel $ayrShareModel){
$lists = $ayrShareModel->lists($this->map,$this->page,$this->row,'id',['*']);
$this->response('列表',Code::SUCCESS,$lists);
}
/**
* @name :(创建ayr_share账户)create_account
* @author :lyh
* @method :post
* @time :2023/5/5 16:44
*/
public function create_account(){
}
}
... ...
<?php
namespace App\Http\Logic\Bside\AyrShare;
use App\Http\Logic\Bside\BaseLogic;
use App\Models\AyrShare\AyrShare;
class AyrShareLogic extends BaseLogic
{
public function __construct()
{
parent::__construct();
$this->model = new AyrShare();
$this->param = $this->requestAll;
}
}
... ...
... ... @@ -26,7 +26,7 @@ class NewsCategoryRequest extends FormRequest
return [
'name'=>'required|max:100',
'remark'=>'required|max:255',
'alias'=>'required|max:10|unique:gl_news_category,alias',
'alias'=>'required|max:10|unique:gl_news_category',
];
}
... ... @@ -37,8 +37,8 @@ class NewsCategoryRequest extends FormRequest
'name.max'=>'名称最大100字',
'remark.required'=>'请填写简介',
'remark.max'=>'简介最大255字',
'remark.required'=>'请填写别名',
'remark.max'=>'别名最大10字',
'alias.required'=>'请填写一下别名',
'alias.max'=>'别名最大10字',
];
}
}
... ...
<?php
namespace App\Models\AyrShare;
use App\Models\Base;
class AyrShare extends Base
{
protected $table = 'gl_ayr_share';
}
... ...