|
|
|
@ -306,13 +306,9 @@ class Active extends BaseService |
|
|
|
|
// 获取即将开始的活动 |
|
|
|
|
$data = array_merge($data, $this->getSoonActive($todyActive)); |
|
|
|
|
} |
|
|
|
|
$tmoActive = $this->ActiveModel->gettmoActive(); |
|
|
|
|
if (!empty($tmoActive)) { |
|
|
|
|
// 获取即将开始的活动 |
|
|
|
|
$data = array_merge($data, $this->getmingActive($tmoActive)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 获取预告的活动 |
|
|
|
|
// $data[] = $this->getNoticeActive(); |
|
|
|
|
$data = array_merge($data, $this->getNoticeActive()); |
|
|
|
|
return array_values(array_filter($data)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -427,21 +423,38 @@ class Active extends BaseService |
|
|
|
|
// 第一个时间点 |
|
|
|
|
$model = $this->ActiveTimeModel->getRecentActiveTime($nextActive['active_id']); |
|
|
|
|
if (empty($model)) return []; |
|
|
|
|
// 整理数据 |
|
|
|
|
$startTime = $nextActive['active_date'] + ($model->getData('active_time') * 60 * 60); |
|
|
|
|
$endTime = $startTime + (1 * 60 * 60); |
|
|
|
|
return [ |
|
|
|
|
'active_id' => $nextActive['active_id'], |
|
|
|
|
'active_time_id' => $model['active_time_id'], |
|
|
|
|
'active_time' => $model['active_time'], |
|
|
|
|
'start_time' => $this->onFormatTime($startTime), |
|
|
|
|
'end_time' => $this->onFormatTime($endTime), |
|
|
|
|
'count_down_time' => $this->onFormatTime($startTime), |
|
|
|
|
'status' => ActiveStatusEnum::STATE_NOTICE, |
|
|
|
|
'status_text' => '预告', |
|
|
|
|
'status_text2' => $this->onFormatTime($startTime) . ' 开始', |
|
|
|
|
'sharp_modular_text' => $this->onFormatTime($startTime) . ' 开始', |
|
|
|
|
]; |
|
|
|
|
// // 整理数据 |
|
|
|
|
// $startTime = $nextActive['active_date'] + ($model->getData('active_time') * 60 * 60); |
|
|
|
|
// $endTime = $startTime + (1 * 60 * 60); |
|
|
|
|
// return [ |
|
|
|
|
// 'active_id' => $nextActive['active_id'], |
|
|
|
|
// 'active_time_id' => $model['active_time_id'], |
|
|
|
|
// 'active_time' => $model['active_time'], |
|
|
|
|
// 'start_time' => $this->onFormatTime($startTime), |
|
|
|
|
// 'end_time' => $this->onFormatTime($endTime), |
|
|
|
|
// 'count_down_time' => $this->onFormatTime($startTime), |
|
|
|
|
// 'status' => ActiveStatusEnum::STATE_NOTICE, |
|
|
|
|
// 'status_text' => '预告', |
|
|
|
|
// 'status_text2' => $this->onFormatTime($startTime) . ' 开始', |
|
|
|
|
// 'sharp_modular_text' => $this->onFormatTime($startTime) . ' 开始', |
|
|
|
|
// ]; |
|
|
|
|
foreach ($model as $item) { |
|
|
|
|
$startTime = $nextActive['active_date'] + ($item->getData('active_time') * 60 * 60); |
|
|
|
|
$endTime = $startTime + (1 * 60 * 60); |
|
|
|
|
$data[] = [ |
|
|
|
|
'active_id' => $nextActive['active_id'], |
|
|
|
|
'active_time_id' => $item['active_time_id'], |
|
|
|
|
'active_time' => $item['active_time'], |
|
|
|
|
'start_time' => $this->onFormatTime($startTime), |
|
|
|
|
'end_time' => $this->onFormatTime($endTime), |
|
|
|
|
'count_down_time' => $this->onFormatTime($startTime), |
|
|
|
|
'status' => ActiveStatusEnum::STATE_NOTICE, |
|
|
|
|
'status_text' => '明日预告', |
|
|
|
|
'status_text2' => $this->onFormatTime($startTime) . ' 开始', |
|
|
|
|
'sharp_modular_text' => $this->onFormatTime($startTime) . ' 开始', |
|
|
|
|
]; |
|
|
|
|
} |
|
|
|
|
return $data; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|