diff --git a/public/static/home/css/common.css b/public/static/home/css/common.css index 27710fdd..6225ac8f 100644 --- a/public/static/home/css/common.css +++ b/public/static/home/css/common.css @@ -1370,15 +1370,15 @@ } .live-preview .tips { - font-size: 16px; + color: #999; margin: 20px 0; } -.countdown .timer { +.countdown .timer .label { font-size: 32px; } -.countdown .timer span { +.countdown .timer .value { color: green; font-size: 36px; padding: 10px; diff --git a/public/static/home/js/chapter.live.countdown.js b/public/static/home/js/chapter.live.countdown.js index 2c2c8078..fb09d141 100644 --- a/public/static/home/js/chapter.live.countdown.js +++ b/public/static/home/js/chapter.live.countdown.js @@ -7,7 +7,7 @@ layui.use(['jquery', 'util'], function () { var serverTime = $('input[name="countdown.server_time"]').val(); var liveStatusUrl = $('input[name="live.status_url"]').val(); - util.countdown(1000 * parseInt(endTime), 1000 * parseInt(serverTime), function (date, serverTime, timer) { + util.countdown(1000 * parseInt(endTime), 1000 * parseInt(serverTime), function (date) { var items = [ {date: date[0], label: '天'}, {date: date[1], label: '时'}, @@ -16,7 +16,10 @@ layui.use(['jquery', 'util'], function () { ]; var html = ''; layui.each(items, function (index, item) { - html += '' + item.date + '' + item.label; + if (item.date > 0) { + html += '' + item.date + ''; + html += '' + item.label + ''; + } }); $('.countdown > .timer').html(html); }); @@ -29,4 +32,4 @@ layui.use(['jquery', 'util'], function () { }); }, 30000); -}); \ No newline at end of file +});