|
...
|
...
|
@@ -22,10 +22,22 @@ class AyrShareController extends BaseController |
|
|
|
* @method :post
|
|
|
|
* @time :2023/5/5 16:06
|
|
|
|
*/
|
|
|
|
public function lists(AyrShareModel $ayrShareModel){
|
|
|
|
public function lists(AyrShareModel $ayrShareModel,AyrShareLogic $ayrShareLogic){
|
|
|
|
//授权配置列表
|
|
|
|
$share_list = $ayrShareModel->platforms;
|
|
|
|
$lists = $ayrShareModel->lists($this->map,$this->page,$this->row,'id',['id','name','bind_plat_from','operator_id','created_at','updated_at']);
|
|
|
|
$lists = $ayrShareModel->lists($this->map,$this->page,$this->row,'id',['id','name','title','profile_key','bind_plat_from','operator_id','created_at','updated_at']);
|
|
|
|
foreach ($lists['list'] as $k => $v){
|
|
|
|
if(!empty($v['profile_key'])){
|
|
|
|
$ayrShareHelper = new AyrShareHelper();
|
|
|
|
$share_info = $ayrShareHelper->get_profiles_users($v['profile_key']);
|
|
|
|
if(isset($share_info['activeSocialAccounts'])){
|
|
|
|
$str = json_encode($share_info['activeSocialAccounts']);
|
|
|
|
if($str != $v['bind_plat_from']){
|
|
|
|
$ayrShareLogic->ayr_share_edit(['bind_plat_from'=>$str]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$lists['share_list'] = $share_list;
|
|
|
|
$this->response('列表',Code::SUCCESS,$lists);
|
|
|
|
}
|
...
|
...
|
|