阶段更新
This commit is contained in:
@@ -11,11 +11,7 @@ class UserAccountResource extends JsonResource
|
||||
{
|
||||
return [
|
||||
'balance' => floatval($this->balance),//现金
|
||||
'score' => [
|
||||
'surplus' => floatval($this->score),//水滴余量
|
||||
'use' => 0,//水滴使用
|
||||
'plan' => 300,//水滴赠送
|
||||
],
|
||||
'score' => floatval($this->score),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -29,18 +29,21 @@ class UserInfoResource extends JsonResource
|
||||
'avatar' => $this->info->avatar ?? '',
|
||||
'account' => new UserAccountResource($this->account),
|
||||
'identity' => new UserIdentityBaseResource($identity),
|
||||
'service' => new UserServiceResource($identity->identities()->first()),
|
||||
'water_mobile' => app('Conf_mall')['water_mobile'] ?? '',
|
||||
// 'service' => new UserServiceResource($identity->identities()->first()),
|
||||
// 'water_mobile' => app('Conf_mall')['water_mobile'] ?? '',
|
||||
'invite' => Hashids::connection('code')->encode($this->id),
|
||||
'case' => $this->getStockData(),
|
||||
'area_code' => $this->info->area_code,
|
||||
// 'case' => $this->getStockData(),
|
||||
'created_at' => (string) $this->created_at,
|
||||
'status' => $this->getStateData(),
|
||||
'nowStatus' => $this->getNowStatus(),
|
||||
'canPick' => $this->canPick(),
|
||||
// 'nowStatus' => $this->getNowStatus(),
|
||||
// 'canPick' => $this->canPick(),
|
||||
'count' => [
|
||||
'relation' => $this->getRelationCount(),//下级
|
||||
'orders' => $this->getOrderCount(),
|
||||
'refunds' => RefundModel::byUser(Api::user())->count(),//退款单数量
|
||||
],
|
||||
'can' => [
|
||||
'area' => $this->areas()->exists(),
|
||||
],
|
||||
'identityShow' => $this->when(true, function () use ($identity) {
|
||||
return [
|
||||
|
||||
Reference in New Issue
Block a user