From 29a3f89b41f17591a02d6f012e2ed214cc4e331a Mon Sep 17 00:00:00 2001 From: lccsw <805383944@qq.com> Date: Fri, 23 Dec 2022 11:11:08 +0800 Subject: [PATCH] edit-sylive-time --- home/controllers/h5/market/sylive2/Stic.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/home/controllers/h5/market/sylive2/Stic.php b/home/controllers/h5/market/sylive2/Stic.php index c2d08bca..0671c4c9 100644 --- a/home/controllers/h5/market/sylive2/Stic.php +++ b/home/controllers/h5/market/sylive2/Stic.php @@ -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 = [