Просмотр исходного кода

Merge branch 'dev-gzczuichu' into dev

Xpy месяцев назад: 8
Родитель
Сommit
80acd3ac26
2 измененных файлов с 17 добавлено и 5 удалено
  1. 13 4
      app/controller/api/user/User.php
  2. 4 1
      app/traits/GzcApiRequest.php

+ 13 - 4
app/controller/api/user/User.php

@@ -3376,10 +3376,19 @@ class User extends BaseController
3376 3376
         $uid = $this->request->uid();
3377 3377
         $userInfo = Db::name('UserCertification')->where('uid', $uid)->field('user_name,user_card,card_type')->find();
3378 3378
         $res = GzcApiRequest::checkAmount($userInfo);
3379
-        if(is_string($res)) {
3380
-            return app('json')->fail($res);
3381
-        }
3382
-        return app('json')->success(['amount' => sprintf("%01.2f", $res * 0.01)]);
3379
+//        if(is_string($res)) {
3380
+//            return app('json')->fail($res);
3381
+//        }
3382
+//        return app('json')->success(['amount' => sprintf("%01.2f", $res * 0.01)]);
3383
+        $cxbResponseData = $res['response'];
3384
+        $xfbResponseData = $res['responsetwo'];
3385
+        $amount = $res['amount'];
3386
+        return app('json')->success([
3387
+            'amount' => sprintf("%01.2f", $amount * 0.01),
3388
+            'cxbResponseData' => $cxbResponseData,
3389
+            'xfbResponseData' => $xfbResponseData,
3390
+        ]);
3391
+
3383 3392
     }
3384 3393
 
3385 3394
     public function check_user_annual_fee()

+ 4 - 1
app/traits/GzcApiRequest.php

@@ -86,7 +86,10 @@ trait GzcApiRequest
86 86
         }
87 87
 
88 88
         $amount = $cxbResponseData['extendData']['amount'] + $xfbResponseData['extendData']['amount'];
89
-        return $amount;
89
+        //return $amount;
90
+        return ['amount' => $amount, 'response' => $cxbResponseData, 'responsetwo' => $xfbResponseData];
91
+
92
+
90 93
     }
91 94
     public function getAmountFromGzc()
92 95
     {