Pārlūkot izejas kodu

公证处检测问题

Xpy 8 mēneši atpakaļ
vecāks
revīzija
b63c5d7f07
1 mainītis faili ar 7 papildinājumiem un 1 dzēšanām
  1. 7 1
      app/controller/api/user/User.php

+ 7 - 1
app/controller/api/user/User.php

@@ -3377,7 +3377,13 @@ class User extends BaseController
3377
         $userInfo = Db::name('UserCertification')->where('uid', $uid)->field('user_name,user_card,card_type')->find();
3377
         $userInfo = Db::name('UserCertification')->where('uid', $uid)->field('user_name,user_card,card_type')->find();
3378
         $res = GzcApiRequest::checkAmount($userInfo);
3378
         $res = GzcApiRequest::checkAmount($userInfo);
3379
         if (!is_array($res) || ($res['code'] ?? -1) !== 0) {
3379
         if (!is_array($res) || ($res['code'] ?? -1) !== 0) {
3380
-            return app('json')->fail($res['message'] ?? '查询失败');
3380
+            return app('json')->fail(
3381
+                $res['message'] ?? '查询失败',
3382
+                [
3383
+                    'code' => $res['code'] ?? -1,
3384
+                    'debug' => $res['debug'] ?? null,
3385
+                ]
3386
+            );
3381
         }
3387
         }
3382
         $amountCents = $res['extendData']['amount'] ?? $res['data']['amount'] ?? $res['amount'] ?? 0;
3388
         $amountCents = $res['extendData']['amount'] ?? $res['data']['amount'] ?? $res['amount'] ?? 0;
3383
         return app('json')->success(['amount' => sprintf('%01.2f', floatval($amountCents) * 0.01)]);
3389
         return app('json')->success(['amount' => sprintf('%01.2f', floatval($amountCents) * 0.01)]);