|
|
@@ -113,16 +113,16 @@ class ActivityReward extends BaseController
|
|
|
'id' => $activityId
|
|
|
]);
|
|
|
if (!$activity) throw new Exception('活动不存在', HttpStatus::CUSTOM_ERROR);
|
|
|
- if ($activity->start_time > $time) throw new Exception("活动未开始$activity->start_time", HttpStatus::CUSTOM_ERROR);
|
|
|
- if ($activity->end_time < $time) throw new Exception('活动已结束', HttpStatus::CUSTOM_ERROR);
|
|
|
+ if (strtotime($activity->start_time) > $time) throw new Exception("活动未开始$activity->start_time", HttpStatus::CUSTOM_ERROR);
|
|
|
+ if (strtotime($activity->end_time) < $time) throw new Exception('活动已结束', HttpStatus::CUSTOM_ERROR);
|
|
|
|
|
|
|
|
|
ActivityUserService::submit([
|
|
|
'activity_id' => $activityId,
|
|
|
'title' => $activity->title,
|
|
|
'sub_title' => $activity->sub_title,
|
|
|
- 'start_time' => $activity->start_time,
|
|
|
- 'end_time' => $activity->end_time,
|
|
|
+ 'start_time' => strtotime($activity->start_time),
|
|
|
+ 'end_time' => strtotime($activity->end_time),
|
|
|
'detail_image' => $activity->detail_image,
|
|
|
'part_in_time' => $time,
|
|
|
'member_id' => $memberId,
|