作者 lyh

gx

@@ -61,6 +61,7 @@ class AyrReleaseController extends BaseController @@ -61,6 +61,7 @@ class AyrReleaseController extends BaseController
61 public function send_post(AyrReleaseRequest $ayrReleaseRequest,AyrReleaseLogic $ayrReleaseLogic, 61 public function send_post(AyrReleaseRequest $ayrReleaseRequest,AyrReleaseLogic $ayrReleaseLogic,
62 AyrShareLogic $ayrShareLogic,AyrShareHelper $ayrShare){ 62 AyrShareLogic $ayrShareLogic,AyrShareHelper $ayrShare){
63 $ayrReleaseRequest->validated(); 63 $ayrReleaseRequest->validated();
  64 + //验证发送平台
64 //获取发送账号详情 65 //获取发送账号详情
65 $share_info = $ayrShareLogic->ayr_share_info(); 66 $share_info = $ayrShareLogic->ayr_share_info();
66 $data = [ 67 $data = [
@@ -69,102 +69,8 @@ class AyrReleaseLogic extends BaseLogic @@ -69,102 +69,8 @@ class AyrReleaseLogic extends BaseLogic
69 return $this->success($arr); 69 return $this->success($arr);
70 } 70 }
71 71
72 - /**  
73 - * @name :(发布到推特)post_twitter  
74 - * @author :lyh  
75 - * @method :post  
76 - * @time :2023/5/9 13:42  
77 - */  
78 - public function post_twitter($param){  
79 - $param['post'] = '描述';  
80 - $param['platforms'] = ['twitter'];  
81 - $param['twitterOptions'] = [  
82 - 'thread'=> true,  
83 - 'threadNumber'=> true,  
84 - 'mediaUrls'=>[  
85 - //图片地址  
86 - ],  
87 - ];  
88 - return $this->success($param);  
89 - }  
90 - /**  
91 - * @name :(发布到youtube)post_facebook  
92 - * @author :lyh  
93 - * @method :post  
94 - * @time :2023/5/9 10:05  
95 - */  
96 - public function post_facebook(){  
97 - $param['post'] = '视频描述';  
98 - $param['platforms'] = ['facebook'];  
99 - $param['faceBookOptions'] = [  
100 - 'reels'=> true,  
101 - 'title'=>'Super title for the Reel'  
102 - ];  
103 - return $this->success($param);  
104 - }  
105 72
106 - /**  
107 - * @name :(发布到fbg,)post_youtube  
108 - * @author :lyh  
109 - * @method :post  
110 - * @time :2023/5/9 10:22  
111 - * @TODO::只能发布一张图片和一张视频  
112 - */  
113 - public function post_gmb(){  
114 - $param['post'] = '描述';  
115 - $param['platforms'] = ['gmb'];  
116 - $param['mediaUrls'] = [];//图片链接  
117 - $param['gmbOptions'] = [  
118 - //视屏设置  
119 - 'isPhotoVideo' => true,  
120 - 'category'=> 'cate',//分类  
121 - ];  
122 - return $this->success($param);  
123 - }  
124 -  
125 - /**  
126 - * @name :(发布到instagram)post_google  
127 - * @author :lyh  
128 - * @method :post  
129 - * @time :2023/5/9 11:54  
130 - */  
131 - public function post_instagram(){  
132 - $param['post'] = '视频描述';  
133 - $param['platforms'] = ['instagram'];  
134 - $param['faceBookOptions'] = [  
135 - 'reels'=> true,  
136 - 'title'=>'Super title for the Reel'  
137 - ];  
138 - return $this->success();  
139 - }  
140 -  
141 - /**  
142 - * @name :(领英)post_linkedin  
143 - * @author :lyh  
144 - * @method :post  
145 - * @time :2023/5/9 11:56  
146 - */  
147 - public function post_linkedin(){  
148 - return $this->success();  
149 - }  
150 -  
151 - /**  
152 - * @name :(红迪网)post_reddit  
153 - * @author :lyh  
154 - * @method :post  
155 - * @time :2023/5/9 13:40  
156 - */  
157 - public function post_reddit(){  
158 - return $this->success();  
159 - }  
160 -  
161 - /**  
162 - * @name :(抖音)post_tiktok  
163 - * @author :lyh  
164 - * @method :post  
165 - * @time :2023/5/9 13:44  
166 - */  
167 - public function post_tiktok(){ 73 + public function platforms_request(){
168 74
169 } 75 }
170 } 76 }
@@ -33,4 +33,20 @@ class AyrShare extends Base @@ -33,4 +33,20 @@ class AyrShare extends Base
33 self::TYPE_PINTEREST => 'Pinterest', 33 self::TYPE_PINTEREST => 'Pinterest',
34 self::TYPE_TIKTOK => 'TikTok', 34 self::TYPE_TIKTOK => 'TikTok',
35 ]; 35 ];
  36 +
  37 + /**
  38 + * @var :发布图片数量
  39 + */
  40 + public $image = [
  41 + self::TYPE_FACEBOOK => 10,
  42 + self::TYPE_TWITTER => 4,
  43 + self::TYPE_LINKEDIN => 9,
  44 + self::TYPE_INSTAGRAM => 10,
  45 + self::TYPE_YOUTUBE => 1,
  46 + self::TYPE_REDDIT => 1,
  47 + self::TYPE_TELEGRAM => 1,
  48 + self::TYPE_GMB => 1,
  49 + self::TYPE_PINTEREST => 1,
  50 + self::TYPE_TIKTOK => 1,
  51 + ];
36 } 52 }