|
|
|
@ -63,16 +63,35 @@ unset($_REQUEST['parent_id']);
|
|
|
|
|
$map['ba_id']=$_REQUEST['admin_id'];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (I("promote_level")) {
|
|
|
|
|
$map['level'] = I("promote_level");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$this->m_title = '推广员列表';
|
|
|
|
|
$this->assign('commonset',M('Kuaijieicon')->where(['url'=>'Promote/lists/type/1','status'=>1])->find());
|
|
|
|
|
if(isset($_REQUEST['row'])) {$row = $_REQUEST['row'];}else{$row = 10;}
|
|
|
|
|
$list_data = D(self::model_name)->where($map)->order('id DESC')->page($p,$row)->select();
|
|
|
|
|
$arr['time'] = time();
|
|
|
|
|
ksort($arr);
|
|
|
|
|
reset($arr);
|
|
|
|
|
$sign = md5(http_build_query($arr) . 'wmkjtx_kj213');
|
|
|
|
|
$arr['sign'] = $sign;
|
|
|
|
|
$reData = curl_post('http://oa.76ba.com/api/wanmeng/platformAccount',$arr);
|
|
|
|
|
$reData = json_decode($reData,true)['data'];
|
|
|
|
|
$oa = array_column($reData, 'platform_account');
|
|
|
|
|
foreach($list_data as $k => $v)
|
|
|
|
|
{
|
|
|
|
|
if($v['oa_associated'] != 1) {
|
|
|
|
|
$oa_val = in_array($v['account'], $oa) ? 1 : 0;
|
|
|
|
|
$list_data[$k]['oa_associated'] = $oa_val;
|
|
|
|
|
M('promote','tab_')->where(['id' => $v['id']])->setField(['oa_associated' => $oa_val]);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
$count = D(self::model_name)->count();
|
|
|
|
|
$page = set_pagination($count,$row);
|
|
|
|
|
if($page) {$this->assign('_page', $page);}
|
|
|
|
|
$this->assign('list_data', $list_data);
|
|
|
|
|
$this->display();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
parent::order_lists(self::model_name,$p,$map);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private function siteApplyList($p){
|
|
|
|
|