添加粉丝列表返回成长值
parent
93795a8c40
commit
c610d058f3
|
|
@ -19,6 +19,7 @@ class FansController extends Controller
|
|||
{
|
||||
return response()->json([
|
||||
'fans_num'=>$request->user()->fans()->count(),
|
||||
'group_sales_value'=>$request->user()->userInfo->group_sales_value,
|
||||
]);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ class FansResource extends JsonResource
|
|||
'phone' => $this->phone,
|
||||
'nickname' => (string) $this->whenLoaded('userInfo', $this->userInfo->nickname, ''),
|
||||
'avatar' => (string) $this->whenLoaded('userInfo', $this->userInfo->avatar, ''),
|
||||
'value' => (string) $this->whenLoaded('userInfo', $this->userInfo->growth_value + $this->userInfo->group_sales_value, 0),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue