6
0
Fork 0

调整返回

release
vine_liutk 2021-12-25 11:24:05 +08:00
parent bd2e57346a
commit 5e17f9b8b4
1 changed files with 9 additions and 0 deletions

View File

@ -14,6 +14,15 @@ class UserWalletResource extends JsonResource
*/
public function toArray($request)
{
if (is_null($this->resource)) {//没有钱包数据时默认数据
return [
// 'balance'=>$this->balance,
// 'total_expenses'=> $this->total_expenses,
// 'total_revenue' => $this->total_revenue,
// 'withdrawable' => $this->withdrawable,
'has_password' => false,
];
}
return [
// 'balance'=>$this->balance,
// 'total_expenses'=> $this->total_expenses,