|
...
|
...
|
@@ -25,15 +25,15 @@ class AyrShareController extends BaseController |
|
|
|
public function lists(AyrShareModel $ayrShareModel,AyrShareLogic $ayrShareLogic){
|
|
|
|
//授权配置列表
|
|
|
|
$share_list = $ayrShareModel->platforms;
|
|
|
|
$lists = $ayrShareModel->lists($this->map,$this->page,$this->row,'id',['id','name','title','profile_key','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_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_plat_from']){
|
|
|
|
$ayrShareLogic->ayr_share_edit(['bind_plat_from'=>$str]);
|
|
|
|
if($str != $v['bind_platforms']){
|
|
|
|
$ayrShareLogic->ayr_share_edit(['bind_platforms'=>$str]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
...
|
...
|
@@ -59,8 +59,8 @@ class AyrShareController extends BaseController |
|
|
|
$share_info = $ayrShareHelper->get_profiles_users($info['profile_key']);
|
|
|
|
if(isset($share_info['activeSocialAccounts'])){
|
|
|
|
$str = json_encode($share_info['activeSocialAccounts']);
|
|
|
|
if($str != $info['bind_plat_from']){
|
|
|
|
$res = $ayrShareLogic->ayr_share_edit(['bind_plat_from'=>$str]);
|
|
|
|
if($str != $info['bind_platforms']){
|
|
|
|
$res = $ayrShareLogic->ayr_share_edit(['bind_platforms'=>$str]);
|
|
|
|
}else{
|
|
|
|
$res = false;
|
|
|
|
}
|
...
|
...
|
|