...
|
...
|
@@ -6,22 +6,15 @@ |
|
|
|
|
|
|
|
|
var Swiper = require('yoho.iswiper'),
|
|
|
$ = require('jquery');
|
|
|
$ = require('jquery'),
|
|
|
lazyLoad = require('yoho.lazyload');
|
|
|
|
|
|
var recommendSwiper,
|
|
|
$recommendForYou = $('.recommend-for-you');
|
|
|
var $recommendForYou = $('.recommend-for-you');
|
|
|
|
|
|
$.get('/product/recommend-for-you/userCenter').then(function(html) {
|
|
|
$recommendForYou.html(html).show();
|
|
|
if ($('#swiper-recommend').length) {
|
|
|
recommendSwiper = new Swiper('#swiper-recommend', {
|
|
|
slidesPerView: 'auto',
|
|
|
grabCursor: true,
|
|
|
slideElement: 'a',
|
|
|
lazyLoading: true,
|
|
|
watchSlidesVisibility: true
|
|
|
});
|
|
|
}
|
|
|
lazyLoad($('img.lazy'));
|
|
|
|
|
|
}).fail(function() {
|
|
|
$recommendForYou.hide();
|
|
|
}); |
|
|
\ No newline at end of file |
...
|
...
|
|