diff --git a/app/controller/api/Auth.php b/app/controller/api/Auth.php index 2beddf0..20cd090 100644 --- a/app/controller/api/Auth.php +++ b/app/controller/api/Auth.php @@ -173,21 +173,19 @@ class Auth extends BaseController // 用户是否存在代理身份 $agentCount = app()->make(AgentRepository::class)->getSearchModel(['uid'=>$user->uid])->count(); $data['is_agent'] = $agentCount > 0; - // 用户持有可用酒卡额度 + // 用户持有全部额度(冻结中 + 可用额度) $data['available'] = (float)app()->make(ExchangeQuotaRepository::class) ->searchModel(['uid'=>$user->uid]) - ->value('(surplus_quota - freeze_quota)'); + ->value('surplus_quota'); $data['vegetable_available'] = (float)app()->make(ExchangeQuotaRepository::class) ->searchModel(['uid'=>$user->uid,'quota_type'=>2]) - ->value('(surplus_quota - freeze_quota)'); - + ->value('surplus_quota'); $data['wine_available'] = (float)app()->make(ExchangeQuotaRepository::class) ->searchModel(['uid'=>$user->uid,'quota_type'=>3]) - ->value('(surplus_quota - freeze_quota)'); - + ->value('surplus_quota'); $data['oil_available'] = (float)app()->make(ExchangeQuotaRepository::class) ->searchModel(['uid'=>$user->uid,'quota_type'=>4]) - ->value('(surplus_quota - freeze_quota)'); + ->value('surplus_quota'); return app('json')->success($data); }