...
|
...
|
@@ -118,8 +118,9 @@ class AgentRegisterMobileController extends WeChatBaseController |
|
|
$consent = $this->request->post('consent');
|
|
|
$card_id = $this->request->post('card_id');
|
|
|
$company = $this->request->post('company');
|
|
|
$site = $this->request->post('site');
|
|
|
$date = $this->request->post('date');
|
|
|
if(empty($name) || empty($mobile) || empty($code) || empty($card_id) || empty($company)){
|
|
|
if(empty($name) || empty($mobile) || empty($code) || empty($card_id) || empty($company) || empty($site)){
|
|
|
$arr['code'] = 40001;
|
|
|
$arr['msg'] = "缺少必要参数!";
|
|
|
return json_encode($arr);
|
...
|
...
|
@@ -146,9 +147,9 @@ class AgentRegisterMobileController extends WeChatBaseController |
|
|
//写入申请表中
|
|
|
$data = Db::name('application_agent')->where(array('delete_time'=>0,'user_id'=>$user_id))->find();
|
|
|
if(empty($data)){
|
|
|
Db::name('application_agent')->insert(array('user_id'=>$user_id,'status'=>1,'create_time'=>time(),'phone'=>$mobile,'date'=>$date,'card_id'=>$card_id,'company'=>$company,'name'=>$name));
|
|
|
Db::name('application_agent')->insert(array('user_id'=>$user_id,'status'=>1,'create_time'=>time(),'phone'=>$mobile,'date'=>$date,'card_id'=>$card_id,'company'=>$company,'name'=>$name,'site'=>$site));
|
|
|
}else{
|
|
|
Db::name('application_agent')->where('id',$data['id'])->update(array('user_id'=>$user_id,'status'=>1,'update_time'=>time(),'phone'=>$mobile,'date'=>$date,'card_id'=>$card_id,'company'=>$company,'name'=>$name));
|
|
|
Db::name('application_agent')->where('id',$data['id'])->update(array('user_id'=>$user_id,'status'=>1,'update_time'=>time(),'phone'=>$mobile,'date'=>$date,'card_id'=>$card_id,'company'=>$company,'name'=>$name,'site'=>$site));
|
|
|
}
|
|
|
$arr['code'] = 20000;
|
|
|
$arr['msg'] = "注册成功!";
|
...
|
...
|
|