正在显示
1 个修改的文件
包含
14 行增加
和
2 行删除
| @@ -22,10 +22,22 @@ class AyrShareController extends BaseController | @@ -22,10 +22,22 @@ class AyrShareController extends BaseController | ||
| 22 | * @method :post | 22 | * @method :post |
| 23 | * @time :2023/5/5 16:06 | 23 | * @time :2023/5/5 16:06 |
| 24 | */ | 24 | */ |
| 25 | - public function lists(AyrShareModel $ayrShareModel){ | 25 | + public function lists(AyrShareModel $ayrShareModel,AyrShareLogic $ayrShareLogic){ |
| 26 | //授权配置列表 | 26 | //授权配置列表 |
| 27 | $share_list = $ayrShareModel->platforms; | 27 | $share_list = $ayrShareModel->platforms; |
| 28 | - $lists = $ayrShareModel->lists($this->map,$this->page,$this->row,'id',['id','name','bind_plat_from','operator_id','created_at','updated_at']); | 28 | + $lists = $ayrShareModel->lists($this->map,$this->page,$this->row,'id',['id','name','title','profile_key','bind_plat_from','operator_id','created_at','updated_at']); |
| 29 | + foreach ($lists['list'] as $k => $v){ | ||
| 30 | + if(!empty($v['profile_key'])){ | ||
| 31 | + $ayrShareHelper = new AyrShareHelper(); | ||
| 32 | + $share_info = $ayrShareHelper->get_profiles_users($v['profile_key']); | ||
| 33 | + if(isset($share_info['activeSocialAccounts'])){ | ||
| 34 | + $str = json_encode($share_info['activeSocialAccounts']); | ||
| 35 | + if($str != $v['bind_plat_from']){ | ||
| 36 | + $ayrShareLogic->ayr_share_edit(['bind_plat_from'=>$str]); | ||
| 37 | + } | ||
| 38 | + } | ||
| 39 | + } | ||
| 40 | + } | ||
| 29 | $lists['share_list'] = $share_list; | 41 | $lists['share_list'] = $share_list; |
| 30 | $this->response('列表',Code::SUCCESS,$lists); | 42 | $this->response('列表',Code::SUCCESS,$lists); |
| 31 | } | 43 | } |
-
请 注册 或 登录 后发表评论