generated from liutk/owl-admin-base
调整文案
parent
b9203f78dc
commit
1f559e1e67
|
|
@ -44,7 +44,14 @@ class UserGameResource extends JsonResource
|
|||
return ($this->game?->state ?? 0) < 2 ?'0':($this->is_right ? '1':'2');
|
||||
}, '0'),
|
||||
'history' => $this->whenLoaded('userActivity', function () {
|
||||
return ($this->userActivity->join_times ?? 0).'中'.($this->userActivity->right_times ?? 0);
|
||||
if($num = UserGame::where([
|
||||
'user_id' => $this->user_id,
|
||||
'activity_id' => $this->activity_id,
|
||||
])->where('state', 2)->count() > 0) {
|
||||
return $num.'中'.($this->userActivity->right_times ?? 0);
|
||||
}else{
|
||||
return '';
|
||||
}
|
||||
}, ''),
|
||||
];
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue