main
liutk 2024-07-01 09:29:36 +08:00
parent 04303b0ccc
commit 97dbbd44e6
1 changed files with 1 additions and 1 deletions

View File

@ -36,7 +36,7 @@ class ActivityController extends ApiController
{ {
$activityId = $request->input('activity_id', 0); $activityId = $request->input('activity_id', 0);
//添加默认活动 //添加默认活动
if($activityId == 0){ if(empty($activityId)){
$activity = Activity::show()->sort()->first(); $activity = Activity::show()->sort()->first();
$activityId = $activity?->id ?? 0; $activityId = $activity?->id ?? 0;
} }