generated from liutk/owl-admin-base
main
parent
67be564489
commit
04303b0ccc
|
|
@ -35,7 +35,11 @@ class ActivityController extends ApiController
|
|||
public function rankList(Request $request)
|
||||
{
|
||||
$activityId = $request->input('activity_id', 0);
|
||||
|
||||
//添加默认活动
|
||||
if($activityId == 0){
|
||||
$activity = Activity::show()->sort()->first();
|
||||
$activityId = $activity?->id ?? 0;
|
||||
}
|
||||
//获取排行表
|
||||
$list = UserActivity::with('user')->where('activity_id', $activityId)->where('mark', '>', 0)->sort()->limit(30)->get();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue