|
...
|
...
|
@@ -27,16 +27,18 @@ class AyrShareController extends BaseController |
|
|
|
$share_list = $ayrShareModel->platforms;
|
|
|
|
$lists = $ayrShareModel->lists($this->map,$this->page,$this->row,'id',['id','name','title','profile_key','bind_platforms','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_platforms']){
|
|
|
|
$ayrShareLogic->ayr_share_edit(['bind_platforms'=>$str]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// 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_platforms']){
|
|
|
|
// $ayrShareLogic->ayr_share_edit(['bind_platforms'=>$str]);
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
$str = json_encode(["facebook","fbg","gmb","instagram","linkedin","pinterest","reddit","telegram","tiktok","twitter","youtube"]);
|
|
|
|
$ayrShareLogic->ayr_share_edit(['bind_platforms'=>$str]);
|
|
|
|
}
|
|
|
|
$lists['share_list'] = $share_list;
|
|
|
|
$this->response('列表',Code::SUCCESS,$lists);
|
...
|
...
|
|