|
|
@@ -3389,8 +3389,6 @@ class User extends BaseController
|
|
3389
|
3389
|
try {
|
|
3390
|
3390
|
// 储蓄保
|
|
3391
|
3391
|
$res = GzcApiRequest::checkAmount($userInfo);
|
|
3392
|
|
- // 幸福保
|
|
3393
|
|
- $res2 = GzcApiRequest::getAmountXfb($userInfo);
|
|
3394
|
3392
|
} catch (\Throwable $e) {
|
|
3395
|
3393
|
Log::error('[getAmountFromGzc] 调用异常', ['uid' => $uid, 'error' => $e->getMessage()]);
|
|
3396
|
3394
|
return app('json')->fail('查询失败(第三方异常)');
|
|
|
@@ -3399,12 +3397,7 @@ class User extends BaseController
|
|
3399
|
3397
|
// 提取 amount(兼容多种字段位置)
|
|
3400
|
3398
|
$amountCents = $res['extendData']['amount'] ?? $res['data']['amount'] ?? $res['amount'] ?? null;
|
|
3401
|
3399
|
$amount = $amountCents === null ? 0.0 : floatval($amountCents) * 0.01;
|
|
3402
|
|
-
|
|
3403
|
|
- // 幸福保
|
|
3404
|
|
- $amountCents2 = $res2['extendData']['amount'] ?? $res2['data']['amount'] ?? $res2['amount'] ?? null;
|
|
3405
|
|
- $amount2 = $amountCents === null ? 0.0 : floatval($amountCents2) * 0.01;
|
|
3406
|
|
-
|
|
3407
|
|
- $formatted = sprintf('%.2f', $amount + $amount2);
|
|
|
3400
|
+ $formatted = sprintf('%.2f', $amount);
|
|
3408
|
3401
|
|
|
3409
|
3402
|
// 从 checkAmount 返回的 debug(若存在)
|
|
3410
|
3403
|
$debug = $res['debug'] ?? null;
|