正在显示
1 个修改的文件
包含
18 行增加
和
12 行删除
@@ -182,7 +182,15 @@ | @@ -182,7 +182,15 @@ | ||
182 | $('video').bind('contextmenu', function() { | 182 | $('video').bind('contextmenu', function() { |
183 | return false; | 183 | return false; |
184 | }); | 184 | }); |
185 | - swiper(); | 185 | + |
186 | + // swiper | ||
187 | + var swiper = new Swiper(".swiper-container", { | ||
188 | + slidesPerView: 3, | ||
189 | + paginationClickable: true, | ||
190 | + spaceBetween: 8, | ||
191 | + freeMode: true | ||
192 | + }); | ||
193 | + | ||
186 | var video_index = getUrlParam('video_index'); | 194 | var video_index = getUrlParam('video_index'); |
187 | //默认第一个视频 | 195 | //默认第一个视频 |
188 | if(video_index == ''){ | 196 | if(video_index == ''){ |
@@ -250,16 +258,6 @@ | @@ -250,16 +258,6 @@ | ||
250 | $(".fourth_video_start").hide(); | 258 | $(".fourth_video_start").hide(); |
251 | } | 259 | } |
252 | 260 | ||
253 | - function swiper(){ | ||
254 | - // swiper | ||
255 | - var swiper = new Swiper(".swiper-container", { | ||
256 | - slidesPerView: 3, | ||
257 | - paginationClickable: true, | ||
258 | - spaceBetween: 8, | ||
259 | - freeMode: true | ||
260 | - }); | ||
261 | - } | ||
262 | - | ||
263 | $(".select input").click(function() { | 261 | $(".select input").click(function() { |
264 | if ($(this).next("img").attr("src") == "__TMPL__/public/assets/images/down2.png") { | 262 | if ($(this).next("img").attr("src") == "__TMPL__/public/assets/images/down2.png") { |
265 | $(this) | 263 | $(this) |
@@ -400,7 +398,15 @@ | @@ -400,7 +398,15 @@ | ||
400 | //是否点赞 | 398 | //是否点赞 |
401 | is_likes(id); | 399 | is_likes(id); |
402 | 400 | ||
403 | - swiper(); | 401 | + // swiper |
402 | + var swiper = new Swiper(".swiper-container", { | ||
403 | + loop: true, | ||
404 | + slidesPerView: 3, | ||
405 | + paginationClickable: true, | ||
406 | + spaceBetween: 8, | ||
407 | + freeMode: true, | ||
408 | + loopedSlides: index | ||
409 | + }); | ||
404 | } | 410 | } |
405 | 411 | ||
406 | //是否收藏 | 412 | //是否收藏 |
-
请 注册 或 登录 后发表评论