|
|
/* eslint-disable max-len */
|
|
|
|
|
|
import qs from 'yoho-qs';
|
|
|
const yoho = require('js/yoho-app');
|
...
|
...
|
@@ -69,9 +70,9 @@ class ResourceShowYasRpter { |
|
|
let cacheTheShowSkns = []; // 暂存此次上报的楼层,上报后复制给 lastReportSkns
|
|
|
let tabParams = {};
|
|
|
|
|
|
tabParams.TAB_NAME = $('.guess-like-tab-active').parent().data('tab-name');
|
|
|
tabParams.TAB_ID = $('.guess-like-tab-active').parent().data('item-idx') + 1;
|
|
|
tabParams.P_PARAM = $('.guess-like-tab-active').parent().data('code');
|
|
|
tabParams.TAB_NAME = $('.guess-like-tab-active').parent().data('tab-name') || $('.guess-tab-active').parent().data('tab-name');
|
|
|
tabParams.TAB_ID = $('.guess-like-tab-active').parent().data('item-idx') + 1 || $('.guess-tab-active').parent().data('item-idx') + 1;
|
|
|
tabParams.P_PARAM = $('.guess-like-tab-active').parent().data('code') || $('.guess-tab-active').parent().data('code');
|
|
|
|
|
|
$('.templates').each((floorIndex, theFloor) => {
|
|
|
let $theFloor = $(theFloor);
|
...
|
...
|
@@ -86,19 +87,46 @@ 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
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
...
|
...
|
|