Showing
3 changed files
with
19 additions
and
2 deletions
@@ -6,12 +6,12 @@ exports.index = (req, res, next) => { | @@ -6,12 +6,12 @@ exports.index = (req, res, next) => { | ||
6 | res.render('entry', { | 6 | res.render('entry', { |
7 | title: '直播列表', | 7 | title: '直播列表', |
8 | module: 'activity', | 8 | module: 'activity', |
9 | - page: 'entry', | 9 | + page: 'live-entry', |
10 | best: result[0].data, | 10 | best: result[0].data, |
11 | living: result[1].data, | 11 | living: result[1].data, |
12 | pre: result[2].data, | 12 | pre: result[2].data, |
13 | record: result[3].data, | 13 | record: result[3].data, |
14 | - constent: result[4] | 14 | + content: result[4] |
15 | }); | 15 | }); |
16 | }).catch(next); | 16 | }).catch(next); |
17 | }; | 17 | }; |
1 | <div class="yoho-live yoho-page"> | 1 | <div class="yoho-live yoho-page"> |
2 | {{#content}} | 2 | {{#content}} |
3 | {{! 头部banner}} | 3 | {{! 头部banner}} |
4 | + {{#if focus}} | ||
4 | {{> resources/banner-top}} | 5 | {{> resources/banner-top}} |
6 | + {{/if}} | ||
5 | {{/content}} | 7 | {{/content}} |
6 | 8 | ||
7 | <div class="live-rec"> | 9 | <div class="live-rec"> |
1 | +var Swiper = require('yoho-swiper'); | ||
2 | + | ||
3 | +$('.swiper-container').each(function() { | ||
4 | + if ($(this).find('.swiper-slide').length > 1) { | ||
5 | + new Swiper($(this).get(0), { | ||
6 | + lazyLoading: true, | ||
7 | + lazyLoadingInPrevNext: true, | ||
8 | + loop: true, | ||
9 | + autoplay: 3000, | ||
10 | + autoplayDisableOnInteraction: true, | ||
11 | + paginationClickable: true, | ||
12 | + pagination: $(this).closest('.banner-top').find('.pagination-inner').get(0) | ||
13 | + }); | ||
14 | + } | ||
15 | +}); |
-
Please register or login to post a comment