|  | @@ -4,6 +4,7 @@ namespace app\api\controller;
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  use app\common\library\Sms;
 |  |  use app\common\library\Sms;
 | 
											
												
													
														|  |  use app\api\controller\Common;
 |  |  use app\api\controller\Common;
 | 
											
												
													
														|  | 
 |  | +use app\common\service\UserService;
 | 
											
												
													
														|  |  use fast\Random;
 |  |  use fast\Random;
 | 
											
												
													
														|  |  use think\Db;
 |  |  use think\Db;
 | 
											
												
													
														|  |  use think\Exception;
 |  |  use think\Exception;
 | 
											
										
											
												
													
														|  | @@ -177,6 +178,7 @@ class Withdraw extends Common
 | 
											
												
													
														|  |      public function bindBank() {
 |  |      public function bindBank() {
 | 
											
												
													
														|  |          $realname = $this->request->request('realname');// 真实姓名
 |  |          $realname = $this->request->request('realname');// 真实姓名
 | 
											
												
													
														|  |          $bank_no = $this->request->request('bank_no');// 银行账号
 |  |          $bank_no = $this->request->request('bank_no');// 银行账号
 | 
											
												
													
														|  | 
 |  | +        $idCard = $this->request->request('id_card');// 身份证号
 | 
											
												
													
														|  |          /*$bank_name = $this->request->request('bank_name');// 银行名称
 |  |          /*$bank_name = $this->request->request('bank_name');// 银行名称
 | 
											
												
													
														|  |          $open_address = $this->request->request('open_address');// 开户地*/
 |  |          $open_address = $this->request->request('open_address');// 开户地*/
 | 
											
												
													
														|  |          $open_bank = $this->request->request('open_bank');// 开户行
 |  |          $open_bank = $this->request->request('open_bank');// 开户行
 | 
											
										
											
												
													
														|  | @@ -188,7 +190,16 @@ class Withdraw extends Common
 | 
											
												
													
														|  |          if(!$realname || !$bank_no || !$open_bank ) {
 |  |          if(!$realname || !$bank_no || !$open_bank ) {
 | 
											
												
													
														|  |              $this->error("请将信息填写完整");
 |  |              $this->error("请将信息填写完整");
 | 
											
												
													
														|  |          }
 |  |          }
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | 
 |  | +        $userService = new UserService();
 | 
											
												
													
														|  | 
 |  | +        $aliParams = [
 | 
											
												
													
														|  | 
 |  | +            'bank_no' => $bank_no,
 | 
											
												
													
														|  | 
 |  | +            'id_card' => $idCard,
 | 
											
												
													
														|  | 
 |  | +            'real_name' => $realname,
 | 
											
												
													
														|  | 
 |  | +        ];
 | 
											
												
													
														|  | 
 |  | +        $aliBankCheckRes = $userService->bankCheck($aliParams);
 | 
											
												
													
														|  | 
 |  | +        if (!$aliBankCheckRes['status']) {
 | 
											
												
													
														|  | 
 |  | +            throw new Exception($aliBankCheckRes['msg']);
 | 
											
												
													
														|  | 
 |  | +        }
 | 
											
												
													
														|  |          // 获取用户信息
 |  |          // 获取用户信息
 | 
											
												
													
														|  |          //$userInfo = \app\common\model\User::where(["id"=>$this->auth->id])->find();
 |  |          //$userInfo = \app\common\model\User::where(["id"=>$this->auth->id])->find();
 | 
											
												
													
														|  |  
 |  |  
 | 
											
										
											
												
													
														|  | @@ -204,6 +215,7 @@ class Withdraw extends Common
 | 
											
												
													
														|  |          $data["realname"] = $realname;
 |  |          $data["realname"] = $realname;
 | 
											
												
													
														|  |          $data["bank_no"] = $bank_no;
 |  |          $data["bank_no"] = $bank_no;
 | 
											
												
													
														|  |          $data["open_bank"] = $open_bank;
 |  |          $data["open_bank"] = $open_bank;
 | 
											
												
													
														|  | 
 |  | +        $data["id_card"] = $idCard;
 | 
											
												
													
														|  |          /*$data["bank_name"] = $bank_name;
 |  |          /*$data["bank_name"] = $bank_name;
 | 
											
												
													
														|  |          $data["open_address"] = $open_address;
 |  |          $data["open_address"] = $open_address;
 | 
											
												
													
														|  |          $data["mobile"] = $bank_mobile;*/
 |  |          $data["mobile"] = $bank_mobile;*/
 |