作者 Your Name

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

@@ -17,26 +17,11 @@ class AyrShare @@ -17,26 +17,11 @@ class AyrShare
17 17
18 ]; 18 ];
19 //profile_key 19 //profile_key
20 - public $profile_key = "-----BEGIN RSA PRIVATE KEY-----  
21 - MIICWgIBAAKBgGFatMeBeaw7QJrqmylMLZlwuuO0FA/EZg5/g7Rrqu+FgpwvFkJq  
22 - 9twEZJY+aIdDH8/RVrCZQGR/xUxKw9v4ows+sLwi4g41m8KRKDXUcJwQvSlwsHAi  
23 - h9hPGZxDsRK0Nv4pZ7XqGgh0Wb0VypX/+Q1dhX9BnXQmvEKayk8GQWQxAgMBAAEC  
24 - gYAFqOJNnudV7fPpja4LjpQwEW+sATIRYJeWTC9587ByUE6xicM/hTxouhCm82Xc  
25 - Rzi4OjFR/vbRYOQ1dTtBtIi18fdRrseQNyR/N2NZjw1X8n5aZcw5NVaa3d3YTQNa  
26 - uzjnYF5eYSOD4pNKKIDc35VHdmvGCV/JXwQKMTgu1+4AAQJBAL5jjN3kvMKFF8vG  
27 - DyYR8k+wPG9iXAdR0HjVNB3OzxKVW0MTwM32pJBXCmF1MOziL8WC48VHQL48hVRa  
28 - 52xRqAECQQCC53rrrOPhPCLIb6kBfgqnxCojqlUK9paFL7NYTPtLYcOajY6+NiKT  
29 - CG1gaOwZh4r34HF7I59l/Ds98Z4nQDwxAkAC4/oIiGeBQIoK8vfZ6R3XreJNAp5J  
30 - EinrG7mN1kz4iEH5c7xSpDL9agTjU+cpQYneIs2Yeit2d+7CSBsJXvgBAkBDFsfU  
31 - yYLxCJT7DN8dOK/VU6AVL1Luj3qNP+k2tB2GgNBzAWHK8ou9t2/3HU8DtofuikUe  
32 - yx8Cccca9B4OF8nBAkAgIUZKGmVNFcGnFFo55vSJInNXFo4HCJ2o4DunBORVtQ/j  
33 - zFePUMXy1bFghAfzNKlrc5XgH4ixeeMh3cDtU97K  
34 - -----END RSA PRIVATE KEY-----"; 20 + public $profile_key = '';
35 //设置请求头 21 //设置请求头
36 public $headers = [ 22 public $headers = [
37 'Authorization' => 'Bearer ', 23 'Authorization' => 'Bearer ',
38 'Content-Type' => 'application/json', 24 'Content-Type' => 'application/json',
39 -// 'Accept-Encoding' => 'deflate, gzip',  
40 ]; 25 ];
41 26
42 /** 27 /**
@@ -133,7 +118,7 @@ class AyrShare @@ -133,7 +118,7 @@ class AyrShare
133 * @method :post 118 * @method :post
134 * @time :2023/5/5 15:00 119 * @time :2023/5/5 15:00
135 */ 120 */
136 - public function post_user($data){ 121 + public function post_profiles($data){
137 $param = [ 122 $param = [
138 'post'=>$data['post'], 123 'post'=>$data['post'],
139 'platforms'=>$data['platforms'], 124 'platforms'=>$data['platforms'],
@@ -145,7 +130,7 @@ class AyrShare @@ -145,7 +130,7 @@ class AyrShare
145 } 130 }
146 131
147 /** 132 /**
148 - * @name :(创建子账户相关操作)post_create_profiles 133 + * @name :(创建子账户配置文件)post_create_profiles
149 * @author :lyh 134 * @author :lyh
150 * @method :post 135 * @method :post
151 * @time :2023/5/5 15:16 136 * @time :2023/5/5 15:16
@@ -154,11 +139,11 @@ class AyrShare @@ -154,11 +139,11 @@ class AyrShare
154 $param = [ 139 $param = [
155 'title'=>$data['title'], 140 'title'=>$data['title'],
156 ]; 141 ];
157 - $url = $this->path.'/profiles/profile'; 142 + $url = $this->path.'/api/profiles/profile';
158 return $this->http_click('post',$url,$param); 143 return $this->http_click('post',$url,$param);
159 } 144 }
160 /** 145 /**
161 - * @name :(删除子账户相关操作)post_create_profiles 146 + * @name :(删除子账户配置文件)post_create_profiles
162 * @author :lyh 147 * @author :lyh
163 * @method :post 148 * @method :post
164 * @time :2023/5/5 15:16 149 * @time :2023/5/5 15:16
@@ -168,24 +153,51 @@ class AyrShare @@ -168,24 +153,51 @@ class AyrShare
168 'title'=>$data['title'], 153 'title'=>$data['title'],
169 'profileKey'=>$this->profile_key, 154 'profileKey'=>$this->profile_key,
170 ]; 155 ];
171 - $url = $this->path.'/profiles/profile'; 156 + $url = $this->path.'/api/profiles/profile';
172 return $this->http_click('delete',$url,$param); 157 return $this->http_click('delete',$url,$param);
173 } 158 }
174 159
  160 + /**
  161 + * @remark :支持 Instagram, Facebook, Twitter, YouTube.
  162 + * @name :(修改子账户)put_update_profiles
  163 + * @author :lyh
  164 + * @method :post
  165 + * @time :2023/5/5 17:00
  166 + */
175 public function put_update_profiles($data){ 167 public function put_update_profiles($data){
176 $param = [ 168 $param = [
177 'title'=>$data['title'], 169 'title'=>$data['title'],
178 'profileKey'=>$this->profile_key, 170 'profileKey'=>$this->profile_key,
179 ]; 171 ];
180 - $url = $this->path.'/profiles/profile'; 172 + $url = $this->path.'/api/profiles/profile';
181 return $this->http_click('put',$url,$param); 173 return $this->http_click('put',$url,$param);
182 } 174 }
  175 +
183 /** 176 /**
184 - * @name :(获取有关用户社交资料的分析和人口统计,例如印象,视图和关注着)post_social  
185 - * @author :lyh 177 + * @name :(通过用户名获取社交账号)get_brand_user
  178 + * @author :lyh https://app.ayrshare.com/api/brand/byUser
186 * @method :post 179 * @method :post
187 - * @time :2023/5/5 10:37 180 + * @time :2023/5/5 17:32
188 */ 181 */
  182 + public function get_brand_user($param){
  183 + //[[platforms,'instagram','user']],[platforms,'twitter',user]]
  184 + $str = '';
  185 + foreach ($param as $k =>$v){
  186 + $str .= $v[0][$k].'='.$v[1];
  187 + }
  188 + $url = $this->path.'/api/brand/byUser?'.$str;
  189 + return $this->http_click('get',$url);
  190 + }
  191 + public function get_profiles(){
  192 +// $param = [
  193 +// 'title'=>$data['title'],
  194 +// 'refId'=>$data['refId'],
  195 +// 'profileKey'=>$this->profile_key,
  196 +// ];
  197 + $url = $this->path.'/api/profile';
  198 + return $this->http_click('get',$url);
  199 + }
  200 +
189 public function api_user(){ 201 public function api_user(){
190 $post_data = [ 202 $post_data = [
191 'platforms' => ['facebook', 'instagram', 'twitter', 'linkedin', 'pinterest', 'youtube', 'tiktok'], 203 'platforms' => ['facebook', 'instagram', 'twitter', 'linkedin', 'pinterest', 'youtube', 'tiktok'],
  1 +<?php
  2 +
  3 +namespace App\Http\Controllers\Bside\AyrShare;
  4 +
  5 +use App\Enums\Common\Code;
  6 +use App\Http\Controllers\Bside\BaseController;
  7 +use App\Models\AyrShare\AyrShare as AyrShareModel;
  8 +
  9 +/**
  10 + * @name:社交绑定
  11 + */
  12 +class AyrShareController extends BaseController
  13 +{
  14 + /**
  15 + * @name :(社交列表)lists
  16 + * @author :lyh
  17 + * @method :post
  18 + * @time :2023/5/5 16:06
  19 + */
  20 + public function lists(AyrShareModel $ayrShareModel){
  21 + $lists = $ayrShareModel->lists($this->map,$this->page,$this->row,'id',['*']);
  22 + $this->response('列表',Code::SUCCESS,$lists);
  23 + }
  24 +
  25 + /**
  26 + * @name :(创建ayr_share账户)create_account
  27 + * @author :lyh
  28 + * @method :post
  29 + * @time :2023/5/5 16:44
  30 + */
  31 + public function create_account(){
  32 +
  33 + }
  34 +}
  1 +<?php
  2 +
  3 +namespace App\Http\Logic\Bside\AyrShare;
  4 +
  5 +use App\Http\Logic\Bside\BaseLogic;
  6 +use App\Models\AyrShare\AyrShare;
  7 +
  8 +class AyrShareLogic extends BaseLogic
  9 +{
  10 + public function __construct()
  11 + {
  12 + parent::__construct();
  13 +
  14 + $this->model = new AyrShare();
  15 + $this->param = $this->requestAll;
  16 + }
  17 +
  18 +}
@@ -26,7 +26,7 @@ class NewsCategoryRequest extends FormRequest @@ -26,7 +26,7 @@ class NewsCategoryRequest extends FormRequest
26 return [ 26 return [
27 'name'=>'required|max:100', 27 'name'=>'required|max:100',
28 'remark'=>'required|max:255', 28 'remark'=>'required|max:255',
29 - 'alias'=>'required|max:10|unique:gl_news_category,alias', 29 + 'alias'=>'required|max:10|unique:gl_news_category',
30 ]; 30 ];
31 } 31 }
32 32
@@ -37,8 +37,8 @@ class NewsCategoryRequest extends FormRequest @@ -37,8 +37,8 @@ class NewsCategoryRequest extends FormRequest
37 'name.max'=>'名称最大100字', 37 'name.max'=>'名称最大100字',
38 'remark.required'=>'请填写简介', 38 'remark.required'=>'请填写简介',
39 'remark.max'=>'简介最大255字', 39 'remark.max'=>'简介最大255字',
40 - 'remark.required'=>'请填写别名',  
41 - 'remark.max'=>'别名最大10字', 40 + 'alias.required'=>'请填写一下别名',
  41 + 'alias.max'=>'别名最大10字',
42 ]; 42 ];
43 } 43 }
44 } 44 }
  1 +<?php
  2 +
  3 +namespace App\Models\AyrShare;
  4 +
  5 +use App\Models\Base;
  6 +
  7 +class AyrShare extends Base
  8 +{
  9 + protected $table = 'gl_ayr_share';
  10 +}