Authored by baoss

修复拼团埋点问题、UI调整 review by bevishuang

<div class="banner-top templates {{#ifcond is_extend '!==' '1'}}pad{{/ifcond}}" data-f-name="{{template_name}}" data-f-id="{{template_id}}" data-id="{{@index}}">
<div class="banner-top templates {{#ifcond is_extend '!==' '1'}}pad{{/ifcond}}" data-num="{{data.length}}" data-f-name="{{template_name}}" data-f-id="{{template_id}}" data-id="{{@index}}">
<div class="banner-swiper swiper-container">
<ul class="swiper-wrapper">
{{#each data}}
... ...

3.39 KB | W: | H:

3.52 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
... ... @@ -87,23 +87,49 @@ class ResourceShowYasRpter {
if ($.inviewport($theFloor, { threshold: 0 })) {
// 楼层可见
$theFloor.find('ul > li').each((aIndex, theA) => {
let $theA = $(theA);
let href = $theA.attr('data-href');
F_INDEX = $theFloor.data('id') + 1;
if ($.inviewport($theA, { threshold: 0 }) && href) {
floorsRawArr.push({
href: href,
I_INDEX: aIndex + 1,
F_INDEX,
F_ID,
F_NAME
});
if (F_NAME === 'focus') {
let len = $theFloor.data('num');
if (aIndex > 0 && aIndex < len + 1) { // 轮播loop会复制swiper元素 需截取
let $theA = $(theA);
let href = $theA.attr('data-href');
let iIndex = $theA.data('item-idx');
F_INDEX = $theFloor.data('id') + 1;
if ($.inviewport($theA, {
threshold: 0
}) && href) {
floorsRawArr.push({
href: href,
I_INDEX: iIndex + 1,
F_INDEX,
F_ID,
F_NAME
});
}
}
} else {
let $theA = $(theA);
let href = $theA.attr('data-href');
let iIndex = $theA.data('item-idx');
F_INDEX = $theFloor.data('id') + 1;
if ($.inviewport($theA, {
threshold: 0
}) && href) {
floorsRawArr.push({
href: href,
I_INDEX: iIndex + 1,
F_INDEX,
F_ID,
F_NAME
});
}
}
});
// console.log('ssss', floorsRawArr)
$theFloor.find('.split-item').each((aIndex, theA) => {
let $theA = $(theA);
let href = $theA.data('href');
... ... @@ -142,8 +168,6 @@ class ResourceShowYasRpter {
F_NAME
});
}
// console.log('prd', floorsRawArr)
});
}
... ... @@ -166,7 +190,6 @@ class ResourceShowYasRpter {
newParams.ACTION_URL = goodsRawObj.href;
}
this.reportParams.DATA.push(newParams);
console.log(this.reportParams.DATA);
}
}
});
... ... @@ -219,7 +242,6 @@ class ResourceShowYasRpter {
};
this.reportParams.DATA.push(newParams);
console.log(this.reportParams.DATA);
}
cacheTheShowSkns.push(goodsRawObj.PRD_SKN);
... ...
... ... @@ -239,9 +239,8 @@ class Group extends Page {
this.sendCustomInfo($this, {
F_ID: this.templateId,
F_NAME: this.templateName,
TAB_ID: this.tabId,
TAB_NAME: this.tabName,
F_INDEX: this.indexIdx
F_INDEX: this.indexIdx,
PRD_SKN: productSkn
});
}
... ... @@ -274,7 +273,7 @@ class Group extends Page {
let tabName = $this.data('tab-name');
let templateName = $this.data('template-name');
let templateId = $this.data('template-id');
let indexIdx = $this.data('index-idx');
let itemIdx = $this.data('item-idx');
let queryObject = {};
let newNavType = this.judgeNavType(this.newFilterTab);
let newNav = this.newNavInfo[newNavType];
... ... @@ -282,8 +281,8 @@ class Group extends Page {
this.tabName = tabName;
this.templateId = templateId;
this.templateName = templateName;
this.tabId = indexIdx;
this.contentCode = code;
this.tabId = itemIdx;
this.contentCode = code || '';
let stateObj = {
tab_name: this.tabName,
index_idx: this.indexIdx,
... ... @@ -402,7 +401,7 @@ class Group extends Page {
let params = {
P_NAME: this.getPname(),
F_ID: templateId,
F_ID: templateId || 0,
F_NAME: templateName,
F_INDEX: indexIdx + 1,
I_INDEX: itemIdx + 1,
... ... @@ -774,8 +773,8 @@ class Group extends Page {
renderMoreData(list, isLoad) {
let appendHtml = '';
list.forEach(item => {
appendHtml += groupListItem(item);
list.forEach((item, index) => {
appendHtml += groupListItem(item, index);
});
if (isLoad) {
$('.new-goods-list').append(appendHtml);
... ...
... ... @@ -13,7 +13,7 @@
.group {
.resources {
background-color: #fff;
background-color: #f5f5f5;
margin-bottom: 90px;
}
... ...