resource)) {//没有钱包数据时默认数据 return [ 'balance'=> '0.00', // 'total_expenses'=> $this->total_expenses, // 'total_revenue' => $this->total_revenue, // 'withdrawable' => $this->withdrawable, 'has_password' => false, ]; } return [ 'balance'=>$this->balance_format, // 'total_expenses'=> $this->total_expenses, // 'total_revenue' => $this->total_revenue, // 'withdrawable' => $this->withdrawable, 'has_password' => (bool) is_null($this?->password) ? false : true, ]; } }