调整返回
parent
bd2e57346a
commit
5e17f9b8b4
|
|
@ -14,6 +14,15 @@ class UserWalletResource extends JsonResource
|
||||||
*/
|
*/
|
||||||
public function toArray($request)
|
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 [
|
return [
|
||||||
// 'balance'=>$this->balance,
|
// 'balance'=>$this->balance,
|
||||||
// 'total_expenses'=> $this->total_expenses,
|
// 'total_expenses'=> $this->total_expenses,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue