Ejemplo n.º 1
0
 /**
  * 绑定乾多多账号
  * 
  */
 public function bindingAccount()
 {
     header("Content-type:text/html;charset=utf-8");
     $status = M('members_status')->field('*')->where("uid={$this->uid}")->find();
     //$status['email_status']!=1 &&  $this->error('请先认证邮箱再来绑定托管账户', '/member/verify#fragment-1');
     $status['phone_status'] != 1 && $this->error('请先认证手机号再来绑定托管账户', '/M/verify/cellphone');
     $status['id_status'] != 1 && $this->error('请先实名认证再来绑定托管账户', '/M/verify/idcard');
     if (M('escrow_account')->where("uid={$this->uid}")->count('uid')) {
         $this->error('您已经绑定了托管账户,无需重复绑定', '/member.html');
     }
     $user_info = M('members')->field('user_name, user_email, user_phone')->where("id={$this->uid}")->find();
     $id_info = M("member_info")->field('idcard, real_name')->where("uid={$this->uid}")->find();
     import("ORG.Loan.Escrow");
     $loan = new Escrow();
     $data = $loan->wapregisterAccount($user_info['user_phone'], $user_info['user_email'], $id_info['real_name'], $id_info['idcard'], $user_info['user_name']);
     $form = $loan->setForm($data, 'register');
     echo $form;
     exit;
 }