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