generated from liutk/owl-admin-base
调整文案
parent
3755a5ea96
commit
b9203f78dc
|
|
@ -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);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue