diff --git a/Application/Admin/Controller/PromoteController.class.php b/Application/Admin/Controller/PromoteController.class.php index 27234fe1a..3370975ff 100644 --- a/Application/Admin/Controller/PromoteController.class.php +++ b/Application/Admin/Controller/PromoteController.class.php @@ -194,14 +194,27 @@ 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, $partner_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'=>$admin,'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'=>$admin, + 'status'=>$status, + 'ba_id'=>$ba_id, + 'partner_id'=>$partner_id, + ); if (preg_match('/^[a-zA-Z0-9]{6,15}$/', $account)==false) { $this->error('账号只能是6-15位字母或数字'); } @@ -215,11 +228,13 @@ class PromoteController extends ThinkController } */ $this->success("添加成功", U('lists')); } else { - $this->error($res); + $this->error('添加失败'); } } else { $this->meta_title ='新增渠道信息'; $this->m_title = '推广员列表'; + $partners = M('partner', 'tab_')->where(['status' => 1])->select(); + $this->assign('partners', $partners); $this->assign('commonset', M('Kuaijieicon')->where(['url'=>'Promote/lists/type/1','status'=>1])->find()); $this->display(); } diff --git a/Application/Admin/View/Promote/add.html b/Application/Admin/View/Promote/add.html index aa06266ae..adc043921 100644 --- a/Application/Admin/View/Promote/add.html +++ b/Application/Admin/View/Promote/add.html @@ -82,6 +82,20 @@ + + + 所属推广公司 + + + + + + diff --git a/Application/Base/Service/PromoteService.class.php b/Application/Base/Service/PromoteService.class.php index 79fa51a05..606cf5290 100644 --- a/Application/Base/Service/PromoteService.class.php +++ b/Application/Base/Service/PromoteService.class.php @@ -940,10 +940,11 @@ class PromoteService { 'mobile_phone' => $params['mobile_phone'], 'bank_name' => $params['bank_name'] ?? '', 'bank_card' => $params['bank_card'], - 'status' => 1, +// 'status' => 1, 'parent_id' => $parent ? $parent['id'] : 0, 'parent_name' => $parent ? $parent['account'] : '官方渠道', 'admin_id' => $params['admin_id'] ?? 0, + 'partner_id' => $params['partner_id'] ?? 0, 'invite_code' => $params['invite_code'] ?? '', 'create_time' => time(), ];