Authored by 陈峰

Merge branch 'hotfix/plusstarYas' into 'release/5.4'

swiper 设置loop属性,会多出二个li

修复潮流优选banner埋点上报index问题。

See merge request !187
... ... @@ -61,6 +61,7 @@ plusstar = {
if (!window._yas || !window._yas.sendCustomInfo) {
return;
}
// 点击潮流优选上方的TAB按钮时
window._yas.sendCustomInfo({
op: 'YB_FASHION_TAB_C',
... ... @@ -135,7 +136,7 @@ plusstar = {
F_NAME: '焦点图',
F_URL: encodeURIComponent($dom.find('a').attr('href').replace(/\"/g, '\\"')),
F_INDEX: 1,
I_INDEX: index % 2 + 1// banner,li是双倍的
I_INDEX: index
})
}, true);
} else if ($(event.target).closest('.speck-title-image a').length > 0) {
... ... @@ -211,6 +212,7 @@ plusstar = {
success: function(data) {
resourcesTp[tabId] = data;
execResData(data);
// 页面中下拉曝光
setTimeout(function() {
if (window._yas && window._yas.sendAppLogs) {
... ... @@ -252,12 +254,16 @@ plusstar = {
}
},
resInit: function() {
var that = this,
productSkns = '',
tabId;
// 头部banner轮播
if ($('.banner-swiper').find('li').size() > 1) {
new Swiper('.banner-swiper', {
lazyLoading: true,
lazyLoadingInPrevNext: true,
loop: true,
loop: false,
autoplay: 3000,
autoplayDisableOnInteraction: false,
paginationClickable: true,
... ... @@ -267,16 +273,15 @@ plusstar = {
}
$('.plusstar-resources').find('img.lazy').lazyload();
var productSkns = '';
productSkns = $('.product-skns').val();
if (productSkns) {
this.common.productSkns = productSkns.split(',');
}
this.common.pageTotal = Math.ceil(this.common.productSkns.length / this.common.pagesize);
var that = this;
var tabId = that.ParentLiDom.index() + 1;
tabId = that.ParentLiDom.index() + 1;
setTimeout(function() {
$.ajax({
type: 'POST',
... ...