调整文案

main
liutk 2024-06-24 22:55:19 +08:00
parent 3755a5ea96
commit b9203f78dc
1 changed files with 1 additions and 1 deletions

View File

@ -41,7 +41,7 @@ class UserGameResource extends JsonResource
}), }),
'score' => $this->score, 'score' => $this->score,
'status' => $this->whenLoaded('game', function () { 'status' => $this->whenLoaded('game', function () {
return $this->game?->state ==0 ?'0':($this->is_right ? '1':'2'); return ($this->game?->state ?? 0) < 2 ?'0':($this->is_right ? '1':'2');
}, '0'), }, '0'),
'history' => $this->whenLoaded('userActivity', function () { 'history' => $this->whenLoaded('userActivity', function () {
return ($this->userActivity->join_times ?? 0).'中'.($this->userActivity->right_times ?? 0); return ($this->userActivity->join_times ?? 0).'中'.($this->userActivity->right_times ?? 0);