|
@@ -667,10 +667,15 @@ class BookController extends BaseController
|
|
|
|
|
|
$activity = ActivityService::getById($advert['activity_id'] ?? 0);
|
|
|
if ($activity){
|
|
|
- $advert['redirect_url'] = "/views/Activity";
|
|
|
- $advert = self::getBackFormat($advert);
|
|
|
- $advert['param'] = ['token' => $activity['token']];
|
|
|
- return response()->success($advert);
|
|
|
+ if ($activity['permanent'] == 1 || ($activity['start_time'] < date("Y-m-d H:i:s") && $activity['end_time'] > date("Y-m-d H:i:s") )){
|
|
|
+ $advert['redirect_url'] = "/views/Activity";
|
|
|
+ $advert = self::getBackFormat($advert);
|
|
|
+ $advert['param'] = ['token' => $activity['token']];
|
|
|
+ return response()->success($advert);
|
|
|
+ }else{
|
|
|
+
|
|
|
+ return response()->success([]);
|
|
|
+ }
|
|
|
}else{
|
|
|
return response()->success([]);
|
|
|
}
|