edit-sylive-time

This commit is contained in:
lccsw
2022-12-23 11:11:08 +08:00
parent d98db6c872
commit 29a3f89b41
+4 -3
View File
@@ -468,7 +468,7 @@ class Stic extends Admin{
$jsondata = json_decode($row['jsondata'],true);
$info['banner'] = $jsondata['banner'] ? build_qiniu_image_url($jsondata['banner']) : Sylive_entity::DF_BANNER;
$activityStart = strtotime($row['activityStart'])>0 ? strtotime($row['activityStart']) : strtotime($row['timeStart'])-7*24*60*60;
$end_time = time()< strtotime($row['timeStart']) ? time() : strtotime($row['timeStart']);
$end_time = time()< strtotime($row['timeEnd']) ? time() : strtotime($row['timeEnd']);
$diff_seconds = $end_time - $activityStart;
$diff_days = ceil($diff_seconds/86400);
$day_list = ['全部'];
@@ -577,7 +577,7 @@ class Stic extends Admin{
throw new Hd_exception('参数错误',400);
}
$activityStart = strtotime($row['activityStart'])>0 ? strtotime($row['activityStart']) : strtotime($row['timeStart'])-7*24*60*60;
$end_time = time()< strtotime($row['timeStart']) ? time() : strtotime($row['timeStart']);
$end_time = time()< strtotime($row['timeEnd']) ? time() : strtotime($row['timeEnd']);
$diff_seconds = $end_time - $activityStart;
$diff_days = ceil($diff_seconds/86400);
$day_list = ['全部'];
@@ -627,8 +627,9 @@ class Stic extends Admin{
$title = '';
if($type==2){
if(time()>=strtotime($row['timeStart'])){ //直播开始后显示
$activityStart = strtotime($row['timeStart']);
// $activityStart = strtotime($row['timeStart']);
$end_time = strtotime($row['timeEnd']);
$activityStart = $end_time-5*60*60; //直播结束前5个小时
$diff_seconds = $end_time - $activityStart;
$diff_hour = ceil($diff_seconds/3600);
$where = [