|
@@ -52,9 +52,11 @@ class PromotionController extends CatchController
|
|
})->when($endTime, function ($query, $endTime){
|
|
})->when($endTime, function ($query, $endTime){
|
|
return $query->where('promotions.created_at', '<=', $endTime);
|
|
return $query->where('promotions.created_at', '<=', $endTime);
|
|
})->select('promotions.id', 'promotions.name', 'promotions.created_at',
|
|
})->select('promotions.id', 'promotions.name', 'promotions.created_at',
|
|
- 'videos.name as video_name', 'promotions.series_sequence', 'promotions.callback_type', 'promotions.callback_config_id')
|
|
|
|
|
|
+ 'videos.name as video_name', 'promotions.series_sequence', 'promotions.callback_type',
|
|
|
|
+ 'promotions.callback_config_id', 'promotions.video_id')
|
|
->paginate($request->input('limit', 15));
|
|
->paginate($request->input('limit', 15));
|
|
foreach ($result as $item) {
|
|
foreach ($result as $item) {
|
|
|
|
+ $item->series_sequence_name = '第'. $item->series_sequence . '集';
|
|
$item->callback_type_str = $callbackTypeMap[$item->callback_type] ?? '';
|
|
$item->callback_type_str = $callbackTypeMap[$item->callback_type] ?? '';
|
|
$item->promotion_path = config('tuiguang.tuiguang.url') . DIRECTORY_SEPARATOR . 'api/promotion/index?ranse_id='. $item->id;
|
|
$item->promotion_path = config('tuiguang.tuiguang.url') . DIRECTORY_SEPARATOR . 'api/promotion/index?ranse_id='. $item->id;
|
|
$item->track_url = config('tuiguang.tuiguang.trackUrl') .
|
|
$item->track_url = config('tuiguang.tuiguang.trackUrl') .
|