浏览代码

Merge branch 'master' of http://git.huxiukeji.com/zhangxiaobin/ggyuyin

lizhen_gitee 1 年之前
父节点
当前提交
2745215140
共有 2 个文件被更改,包括 8 次插入4 次删除
  1. 2 2
      application/api/controller/Money.php
  2. 6 2
      application/api/controller/Withdraw.php

+ 2 - 2
application/api/controller/Money.php

@@ -119,11 +119,11 @@ class Money extends Common
         if ($type == 'wechat') {
             $payType = 1;
             $businessNo = isset($epayConfig['wechat']['mch_id']) ? $epayConfig['wechat']['mch_id'] : '';
-            $serviceFee = $wechatFee;
+            $serviceFee = bcmul($money,$wechatFee,2);
         } elseif ($type == 'alipay') {
             $payType = 2;
             $businessNo = isset($epayConfig['alipay']['app_id']) ? $epayConfig['alipay']['app_id'] : '';
-            $serviceFee = $alipayFee;
+            $serviceFee = bcmul($money,$alipayFee,2);
         } else {
             $payType = 3;
             $businessNo = '';

+ 6 - 2
application/api/controller/Withdraw.php

@@ -177,7 +177,7 @@ class Withdraw extends Common
      */
     public function bindBank() {
         try {
-            $realname = $this->request->request('realname');// 真实姓名
+            //$realname = $this->request->request('realname');// 真实姓名
             $bank_no = $this->request->request('bank_no');// 银行账号
             //$idCard = $this->request->request('id_card');// 身份证号
             /*$bank_name = $this->request->request('bank_name');// 银行名称
@@ -188,7 +188,7 @@ class Withdraw extends Common
             $mobile = $this->request->request('mobile'); // 手机号*/
             $userId = $this->auth->id;
             //|| !$bank_name || !$open_address || !$bank_mobile || !$captcha || !$mobile
-            if(!$realname || !$bank_no || !$open_bank ) {
+            if(!$bank_no || !$open_bank ) {
                 throw new Exception("请将信息填写完整");
             }
             $userAuthWhere['user_id'] = $userId;
@@ -196,6 +196,10 @@ class Withdraw extends Common
             if (empty($userAuth)) {
                 throw new Exception('请先实名认证');
             }
+            if ($userAuth['status'] != 1) {
+                throw new Exception('请先实名认证通过');
+            }
+            $realname = $userAuth['realname'];
             $idCard = $userAuth['idcard'];
             $userService = new UserService();
             $aliParams = [