Authored by 陈峰

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

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

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

See merge request !187
@@ -61,6 +61,7 @@ plusstar = { @@ -61,6 +61,7 @@ plusstar = {
61 if (!window._yas || !window._yas.sendCustomInfo) { 61 if (!window._yas || !window._yas.sendCustomInfo) {
62 return; 62 return;
63 } 63 }
  64 +
64 // 点击潮流优选上方的TAB按钮时 65 // 点击潮流优选上方的TAB按钮时
65 window._yas.sendCustomInfo({ 66 window._yas.sendCustomInfo({
66 op: 'YB_FASHION_TAB_C', 67 op: 'YB_FASHION_TAB_C',
@@ -135,7 +136,7 @@ plusstar = { @@ -135,7 +136,7 @@ plusstar = {
135 F_NAME: '焦点图', 136 F_NAME: '焦点图',
136 F_URL: encodeURIComponent($dom.find('a').attr('href').replace(/\"/g, '\\"')), 137 F_URL: encodeURIComponent($dom.find('a').attr('href').replace(/\"/g, '\\"')),
137 F_INDEX: 1, 138 F_INDEX: 1,
138 - I_INDEX: index % 2 + 1// banner,li是双倍的 139 + I_INDEX: index
139 }) 140 })
140 }, true); 141 }, true);
141 } else if ($(event.target).closest('.speck-title-image a').length > 0) { 142 } else if ($(event.target).closest('.speck-title-image a').length > 0) {
@@ -211,6 +212,7 @@ plusstar = { @@ -211,6 +212,7 @@ plusstar = {
211 success: function(data) { 212 success: function(data) {
212 resourcesTp[tabId] = data; 213 resourcesTp[tabId] = data;
213 execResData(data); 214 execResData(data);
  215 +
214 // 页面中下拉曝光 216 // 页面中下拉曝光
215 setTimeout(function() { 217 setTimeout(function() {
216 if (window._yas && window._yas.sendAppLogs) { 218 if (window._yas && window._yas.sendAppLogs) {
@@ -252,12 +254,16 @@ plusstar = { @@ -252,12 +254,16 @@ plusstar = {
252 } 254 }
253 }, 255 },
254 resInit: function() { 256 resInit: function() {
  257 + var that = this,
  258 + productSkns = '',
  259 + tabId;
  260 +
255 // 头部banner轮播 261 // 头部banner轮播
256 if ($('.banner-swiper').find('li').size() > 1) { 262 if ($('.banner-swiper').find('li').size() > 1) {
257 new Swiper('.banner-swiper', { 263 new Swiper('.banner-swiper', {
258 lazyLoading: true, 264 lazyLoading: true,
259 lazyLoadingInPrevNext: true, 265 lazyLoadingInPrevNext: true,
260 - loop: true, 266 + loop: false,
261 autoplay: 3000, 267 autoplay: 3000,
262 autoplayDisableOnInteraction: false, 268 autoplayDisableOnInteraction: false,
263 paginationClickable: true, 269 paginationClickable: true,
@@ -267,16 +273,15 @@ plusstar = { @@ -267,16 +273,15 @@ plusstar = {
267 } 273 }
268 274
269 $('.plusstar-resources').find('img.lazy').lazyload(); 275 $('.plusstar-resources').find('img.lazy').lazyload();
270 - var productSkns = '';  
271 productSkns = $('.product-skns').val(); 276 productSkns = $('.product-skns').val();
  277 +
272 if (productSkns) { 278 if (productSkns) {
273 this.common.productSkns = productSkns.split(','); 279 this.common.productSkns = productSkns.split(',');
274 } 280 }
275 281
276 this.common.pageTotal = Math.ceil(this.common.productSkns.length / this.common.pagesize); 282 this.common.pageTotal = Math.ceil(this.common.productSkns.length / this.common.pagesize);
277 283
278 - var that = this;  
279 - var tabId = that.ParentLiDom.index() + 1; 284 + tabId = that.ParentLiDom.index() + 1;
280 setTimeout(function() { 285 setTimeout(function() {
281 $.ajax({ 286 $.ajax({
282 type: 'POST', 287 type: 'POST',