...
|
...
|
@@ -313,12 +313,21 @@ function _swiperData($item, bool) { |
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
let order2Cn = {
|
|
|
s_t_desc: '默认',
|
|
|
s_p_desc: '价格递减',
|
|
|
s_p_asc: '价格递增',
|
|
|
p_d_desc: '折扣递减',
|
|
|
p_d_asc: '折扣递增'
|
|
|
};
|
|
|
|
|
|
// 楼层分析配置
|
|
|
let analysisMap = {
|
|
|
'banner-top': {
|
|
|
container: '.banner-top', // floor容器
|
|
|
item: '.swiper-slide', // floor item
|
|
|
floorInfo: {F_NAME: 'banner', F_ID: '0'}, // analysis 信息
|
|
|
floorInfo: {F_NAME: 'banner', F_ID: '1'}, // analysis 信息
|
|
|
|
|
|
extraAttrs: _swiperData // 从item 获取 额外字段
|
|
|
},
|
...
|
...
|
@@ -326,7 +335,7 @@ let analysisMap = { |
|
|
'new-recommend': {
|
|
|
container: '#new-recommend',
|
|
|
item: '.brand-news-count',
|
|
|
floorInfo: {F_NAME: '为您推荐', F_ID: '1'},
|
|
|
floorInfo: {F_NAME: '为您推荐', F_ID: '2'},
|
|
|
|
|
|
extraAttrs: function($item) {
|
|
|
return {
|
...
|
...
|
@@ -339,7 +348,7 @@ let analysisMap = { |
|
|
handpick: {
|
|
|
container: '#handpick',
|
|
|
item: '.swiper-slide',
|
|
|
floorInfo: {F_NAME: '精选抢先看', F_ID: '2'},
|
|
|
floorInfo: {F_NAME: '精选抢先看', F_ID: '3'},
|
|
|
|
|
|
extraAttrs: _swiperData
|
|
|
},
|
...
|
...
|
@@ -347,7 +356,7 @@ let analysisMap = { |
|
|
'new-goods': {
|
|
|
container: '#new-goods',
|
|
|
item: '.good-info',
|
|
|
floorInfo: {F_NAME: '最新上架', F_ID: '3'},
|
|
|
floorInfo: {F_NAME: '最新上架', F_ID: '4'},
|
|
|
|
|
|
|
|
|
/**
|
...
|
...
|
@@ -374,7 +383,7 @@ let analysisMap = { |
|
|
|
|
|
function tagIndex(arr, $_target) {
|
|
|
if ($_target) {
|
|
|
arr.L_INDEX = $_target.index();
|
|
|
arr.L_INDEX = $_target.closet('li').index() + 1;
|
|
|
}
|
|
|
}
|
|
|
|
...
|
...
|
@@ -391,7 +400,7 @@ let analysisMap = { |
|
|
handler = li => $(li).data('cate');
|
|
|
_attrs = {
|
|
|
RECOMMEND_TYPE: 'seasonSort',
|
|
|
CATE_ID: tagsStr($item, handler, $target)
|
|
|
CATE_ID: tagsStr($item, handler, $target) + ''
|
|
|
};
|
|
|
|
|
|
tagIndex(_attrs, $target);
|
...
|
...
|
@@ -400,7 +409,7 @@ let analysisMap = { |
|
|
handler = li => $(li).find('a').text();
|
|
|
_attrs = {
|
|
|
RECOMMEND_TYPE: 'hotSearchTerm',
|
|
|
KEYWORD_WORD: tagsStr($item, handler, $target)
|
|
|
KEYWORD_WORD: tagsStr($item, handler, $target) + ''
|
|
|
};
|
|
|
|
|
|
tagIndex(_attrs, $target);
|
...
|
...
|
@@ -408,19 +417,19 @@ let analysisMap = { |
|
|
case 'hot-shop':
|
|
|
_attrs = {
|
|
|
RECOMMEND_TYPE: 'hotShop',
|
|
|
BRAND_ID: $item.data('brand'),
|
|
|
SHOP_ID: $item.data('shop')
|
|
|
BRAND_ID: $item.data('brand') + '',
|
|
|
SHOP_ID: $item.data('shop') + ''
|
|
|
};
|
|
|
break;
|
|
|
default:
|
|
|
_attrs = {
|
|
|
PRD_SKN: $item.data('id')
|
|
|
PRD_SKN: $item.data('id') + ''
|
|
|
};
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
if ($target) {
|
|
|
_attrs.SORT_NM = search.searchParams.order;
|
|
|
_attrs.SORT_NM = order2Cn[search.searchParams.order];
|
|
|
_attrs.FILTER_VALUE = search.searchParams.filter;
|
|
|
}
|
|
|
|
...
|
...
|
@@ -440,17 +449,17 @@ let {analysisShowData} = analysisWorker(analysisMap, 'YB_NEW_ARRIVAL_FLR_C'); |
|
|
$callback.add(function(html, searchParams) {
|
|
|
let pageData = analysisShowData('new-goods', {container: $(`<div>${html}</div>`)});
|
|
|
|
|
|
pageData.SORT_NM = searchParams.order;
|
|
|
pageData.SORT_NM = order2Cn[searchParams.order];
|
|
|
pageData.FILTER_VALUE = searchParams.filter;
|
|
|
|
|
|
analysis('YB_SHOW_NEW_ARRIVAL', {data: pageData});
|
|
|
analysis('YB_SHOW_NEW_ARRIVAL', {DATA: pageData});
|
|
|
});
|
|
|
|
|
|
$(function() {
|
|
|
setTimeout(()=> {
|
|
|
// 新品到着页面曝光时的页面数据,异步的单独发
|
|
|
analysis('YB_SHOW_NEW_ARRIVAL', {
|
|
|
data: ['banner-top', 'new-recommend', 'handpick'].map(analysisShowData)
|
|
|
DATA: ['banner-top', 'new-recommend', 'handpick'].map(analysisShowData)
|
|
|
});
|
|
|
}, 1000);
|
|
|
});
|
...
|
...
|
|