...
|
...
|
@@ -12,6 +12,8 @@ var $userAvatar = $('.user-avatar'), |
|
|
var myImage = new Image(),
|
|
|
avatar;
|
|
|
|
|
|
var Swiper = require('yoho-swiper2');
|
|
|
|
|
|
require('home/index.page.css');
|
|
|
|
|
|
require('../common');
|
...
|
...
|
@@ -21,6 +23,14 @@ if ($('.recommend-for-you').length) { |
|
|
require('../common/suspend-cart');
|
|
|
require('../common/footer');
|
|
|
|
|
|
new Swiper('.banner-center-swiper', {
|
|
|
pagination: '.swiper-pagination',
|
|
|
lazyLoading: true,
|
|
|
lazyLoadingInPrevNext: true,
|
|
|
paginationClickable: true,
|
|
|
autoplay: 3000
|
|
|
});
|
|
|
|
|
|
window.reMarginFooter('.footer-tab');
|
|
|
|
|
|
// 部分老用户没有头像,显示默认头像
|
...
|
...
|
@@ -40,3 +50,29 @@ $('.yoho-page').on('touchstart', '.list-item, .type-item, .order-title', functio |
|
|
}).on('touchend touchcancel', '.list-item, .type-item, .order-title', function() {
|
|
|
$(this).removeClass('highlight');
|
|
|
});
|
|
|
|
|
|
// 埋点
|
|
|
$('.res-c').on('click', 'a', function() {
|
|
|
var $this = $(this);
|
|
|
var index = $this.index() + 1;
|
|
|
var pIndex = $this.parent('div').index() + 1;
|
|
|
var url = $this.attr('href');
|
|
|
var name = $this.attr('name');
|
|
|
var id = $this.attr('id');
|
|
|
var status = $this.parent('li').hasClass('swiper-slide');
|
|
|
|
|
|
if (status) {
|
|
|
index = $this.parent('li').index() + 1;
|
|
|
pIndex = 1;
|
|
|
}
|
|
|
|
|
|
if (window._yas && window._yas.sendCustomInfo) {
|
|
|
window._yas.sendCustomInfo({
|
|
|
I_INDEX: index,
|
|
|
F_URL: encodeURIComponent(url),
|
|
|
F_NAME: name,
|
|
|
F_INDEX: pIndex,
|
|
|
F_ID: id
|
|
|
}, true);
|
|
|
}
|
|
|
}); |
...
|
...
|
|