Xpy преди 8 месеца
родител
ревизия
f9d2b84e96
променени са 2 файла, в които са добавени 11 реда и са изтрити 13 реда
  1. 4 5
      app/controller/api/user/User.php
  2. 7 8
      app/traits/GzcApiRequest.php

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

@@ -3376,11 +3376,10 @@ 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)]);
3383
-        return app('json')->success($res);
3379
+        if(is_string($res)) {
3380
+            return app('json')->fail($res);
3381
+        }
3382
+        return app('json')->success(['amount' => sprintf("%01.2f", $res * 0.01)]);
3384 3383
     }
3385 3384
 
3386 3385
     public function check_user_annual_fee()

+ 7 - 8
app/traits/GzcApiRequest.php

@@ -67,9 +67,9 @@ trait GzcApiRequest
67 67
         Log::info('储蓄保养老金请求参数:' . json_encode($cxbData));
68 68
         $cxbResponseData = self::request('POST', '/v1/api/third/in/in30', $cxbData, [], 1);
69 69
         Log::info('储蓄保养老金请求返回:' . json_encode($cxbResponseData));
70
-//        if($cxbResponseData['code'] != 0) {
71
-//            return $cxbResponseData['message'];
72
-//        }
70
+        if($cxbResponseData['code'] != 0) {
71
+            return $cxbResponseData['message'];
72
+        }
73 73
 
74 74
         $xfbData = [
75 75
             'platformNo' => env('XINGFUBAO.PLATFORM_NO'),
@@ -81,13 +81,12 @@ trait GzcApiRequest
81 81
         Log::info('幸福保养老金请求参数:' . json_encode($xfbData));
82 82
         $xfbResponseData = self::request('POST', '/v1/api/third/in/in30', $xfbData, [], 2);
83 83
         Log::info('幸福保养老金请求返回:' . json_encode($xfbResponseData));
84
-//        if($xfbResponseData['code'] != 0) {
85
-//            return $xfbResponseData['message'];
86
-//        }
84
+        if($xfbResponseData['code'] != 0) {
85
+            return $xfbResponseData['message'];
86
+        }
87 87
 
88 88
         $amount = $cxbResponseData['extendData']['amount'] + $xfbResponseData['extendData']['amount'];
89
-        //return $amount;
90
-        return $xfbResponseData;
89
+        return $amount;
91 90
 
92 91
 
93 92
     }