|
|
|
@ -198,13 +198,16 @@ class PromoteController extends ThinkController
|
|
|
|
|
parent::lists('SiteApply', $p, $map);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function add($account=null, $password=null, $second_pwd=null, $real_name=null, $email=null, $mobile_phone=null, $bank_name=null, $bank_card=null, $admin=null, $status=null, $ba_id = null)
|
|
|
|
|
public function add($account=null, $password=null, $second_pwd=null, $real_name=null, $email=null,
|
|
|
|
|
$mobile_phone=null, $bank_name=null, $bank_card=null, $admin=null, $status=null, $ba_id = null, $company_id = null)
|
|
|
|
|
{
|
|
|
|
|
if (IS_POST) {
|
|
|
|
|
if (C('PROMOTE_AUTO_AUDIT') == 1) {
|
|
|
|
|
$status = 1;
|
|
|
|
|
}
|
|
|
|
|
$data = array('account'=>$account,'password'=>$password,'second_pwd'=>$second_pwd,'real_name'=>$real_name,'email'=>$email,'mobile_phone'=>$mobile_phone,'bank_name'=>$bank_name,'bank_card'=>$bank_card,'admin_id'=>session('user_auth')['uid'],'status'=>$status,'ba_id'=>$ba_id);
|
|
|
|
|
$data = array('account'=>$account,'password'=>$password,'second_pwd'=>$second_pwd,'real_name'=>$real_name,
|
|
|
|
|
'email'=>$email,'mobile_phone'=>$mobile_phone,'bank_name'=>$bank_name,'bank_card'=>$bank_card,
|
|
|
|
|
'admin_id'=>session('user_auth')['uid'],'status'=>$status,'ba_id'=>$ba_id, 'company_id' => $company_id);
|
|
|
|
|
|
|
|
|
|
if (preg_match('/^[a-zA-Z0-9]{6,15}$/', $account)==false) {
|
|
|
|
|
$this->error('账号只能是6-15位字母或数字');
|
|
|
|
@ -217,6 +220,7 @@ class PromoteController extends ThinkController
|
|
|
|
|
$ba = new \Admin\Model\BusinessAffairsModel();
|
|
|
|
|
$ba->add_child($_REQUEST['ba_id'],$res);
|
|
|
|
|
} */
|
|
|
|
|
session('user_auth_promote_ids', null);
|
|
|
|
|
$this->success("添加成功", U('lists'));
|
|
|
|
|
} else {
|
|
|
|
|
$this->error($res);
|
|
|
|
@ -224,6 +228,8 @@ class PromoteController extends ThinkController
|
|
|
|
|
} else {
|
|
|
|
|
$this->meta_title ='新增渠道信息';
|
|
|
|
|
$this->m_title = '推广员列表';
|
|
|
|
|
$companys = M('promote_company', 'tab_')->where(['status' => 1])->select();
|
|
|
|
|
$this->assign('companys', $companys);
|
|
|
|
|
$this->assign('commonset', M('Kuaijieicon')->where(['url'=>'Promote/lists/type/1','status'=>1])->find());
|
|
|
|
|
$this->display();
|
|
|
|
|
}
|
|
|
|
@ -337,7 +343,8 @@ class PromoteController extends ThinkController
|
|
|
|
|
$this->m_title = '推广员列表';
|
|
|
|
|
$this->assign('commonset', M('Kuaijieicon')->where(['url'=>'Promote/lists/type/1','status'=>1])->find());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$companys = M('promote_company', 'tab_')->where(['status' => 1])->select();
|
|
|
|
|
$this->assign('companys', $companys);
|
|
|
|
|
$this->display();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|