|
@@ -313,12 +313,21 @@ function _swiperData($item, bool) { |
|
@@ -313,12 +313,21 @@ function _swiperData($item, bool) { |
313
|
}
|
313
|
}
|
314
|
}
|
314
|
}
|
315
|
|
315
|
|
|
|
316
|
+
|
|
|
317
|
+let order2Cn = {
|
|
|
318
|
+ s_t_desc: '默认',
|
|
|
319
|
+ s_p_desc: '价格递减',
|
|
|
320
|
+ s_p_asc: '价格递增',
|
|
|
321
|
+ p_d_desc: '折扣递减',
|
|
|
322
|
+ p_d_asc: '折扣递增'
|
|
|
323
|
+};
|
|
|
324
|
+
|
316
|
// 楼层分析配置
|
325
|
// 楼层分析配置
|
317
|
let analysisMap = {
|
326
|
let analysisMap = {
|
318
|
'banner-top': {
|
327
|
'banner-top': {
|
319
|
container: '.banner-top', // floor容器
|
328
|
container: '.banner-top', // floor容器
|
320
|
item: '.swiper-slide', // floor item
|
329
|
item: '.swiper-slide', // floor item
|
321
|
- floorInfo: {F_NAME: 'banner', F_ID: '0'}, // analysis 信息
|
330
|
+ floorInfo: {F_NAME: 'banner', F_ID: '1'}, // analysis 信息
|
322
|
|
331
|
|
323
|
extraAttrs: _swiperData // 从item 获取 额外字段
|
332
|
extraAttrs: _swiperData // 从item 获取 额外字段
|
324
|
},
|
333
|
},
|
|
@@ -326,7 +335,7 @@ let analysisMap = { |
|
@@ -326,7 +335,7 @@ let analysisMap = { |
326
|
'new-recommend': {
|
335
|
'new-recommend': {
|
327
|
container: '#new-recommend',
|
336
|
container: '#new-recommend',
|
328
|
item: '.brand-news-count',
|
337
|
item: '.brand-news-count',
|
329
|
- floorInfo: {F_NAME: '为您推荐', F_ID: '1'},
|
338
|
+ floorInfo: {F_NAME: '为您推荐', F_ID: '2'},
|
330
|
|
339
|
|
331
|
extraAttrs: function($item) {
|
340
|
extraAttrs: function($item) {
|
332
|
return {
|
341
|
return {
|
|
@@ -339,7 +348,7 @@ let analysisMap = { |
|
@@ -339,7 +348,7 @@ let analysisMap = { |
339
|
handpick: {
|
348
|
handpick: {
|
340
|
container: '#handpick',
|
349
|
container: '#handpick',
|
341
|
item: '.swiper-slide',
|
350
|
item: '.swiper-slide',
|
342
|
- floorInfo: {F_NAME: '精选抢先看', F_ID: '2'},
|
351
|
+ floorInfo: {F_NAME: '精选抢先看', F_ID: '3'},
|
343
|
|
352
|
|
344
|
extraAttrs: _swiperData
|
353
|
extraAttrs: _swiperData
|
345
|
},
|
354
|
},
|
|
@@ -347,7 +356,7 @@ let analysisMap = { |
|
@@ -347,7 +356,7 @@ let analysisMap = { |
347
|
'new-goods': {
|
356
|
'new-goods': {
|
348
|
container: '#new-goods',
|
357
|
container: '#new-goods',
|
349
|
item: '.good-info',
|
358
|
item: '.good-info',
|
350
|
- floorInfo: {F_NAME: '最新上架', F_ID: '3'},
|
359
|
+ floorInfo: {F_NAME: '最新上架', F_ID: '4'},
|
351
|
|
360
|
|
352
|
|
361
|
|
353
|
/**
|
362
|
/**
|
|
@@ -374,7 +383,7 @@ let analysisMap = { |
|
@@ -374,7 +383,7 @@ let analysisMap = { |
374
|
|
383
|
|
375
|
function tagIndex(arr, $_target) {
|
384
|
function tagIndex(arr, $_target) {
|
376
|
if ($_target) {
|
385
|
if ($_target) {
|
377
|
- arr.L_INDEX = $_target.index();
|
386
|
+ arr.L_INDEX = $_target.closet('li').index() + 1;
|
378
|
}
|
387
|
}
|
379
|
}
|
388
|
}
|
380
|
|
389
|
|
|
@@ -391,7 +400,7 @@ let analysisMap = { |
|
@@ -391,7 +400,7 @@ let analysisMap = { |
391
|
handler = li => $(li).data('cate');
|
400
|
handler = li => $(li).data('cate');
|
392
|
_attrs = {
|
401
|
_attrs = {
|
393
|
RECOMMEND_TYPE: 'seasonSort',
|
402
|
RECOMMEND_TYPE: 'seasonSort',
|
394
|
- CATE_ID: tagsStr($item, handler, $target)
|
403
|
+ CATE_ID: tagsStr($item, handler, $target) + ''
|
395
|
};
|
404
|
};
|
396
|
|
405
|
|
397
|
tagIndex(_attrs, $target);
|
406
|
tagIndex(_attrs, $target);
|
|
@@ -400,7 +409,7 @@ let analysisMap = { |
|
@@ -400,7 +409,7 @@ let analysisMap = { |
400
|
handler = li => $(li).find('a').text();
|
409
|
handler = li => $(li).find('a').text();
|
401
|
_attrs = {
|
410
|
_attrs = {
|
402
|
RECOMMEND_TYPE: 'hotSearchTerm',
|
411
|
RECOMMEND_TYPE: 'hotSearchTerm',
|
403
|
- KEYWORD_WORD: tagsStr($item, handler, $target)
|
412
|
+ KEYWORD_WORD: tagsStr($item, handler, $target) + ''
|
404
|
};
|
413
|
};
|
405
|
|
414
|
|
406
|
tagIndex(_attrs, $target);
|
415
|
tagIndex(_attrs, $target);
|
|
@@ -408,19 +417,19 @@ let analysisMap = { |
|
@@ -408,19 +417,19 @@ let analysisMap = { |
408
|
case 'hot-shop':
|
417
|
case 'hot-shop':
|
409
|
_attrs = {
|
418
|
_attrs = {
|
410
|
RECOMMEND_TYPE: 'hotShop',
|
419
|
RECOMMEND_TYPE: 'hotShop',
|
411
|
- BRAND_ID: $item.data('brand'),
|
|
|
412
|
- SHOP_ID: $item.data('shop')
|
420
|
+ BRAND_ID: $item.data('brand') + '',
|
|
|
421
|
+ SHOP_ID: $item.data('shop') + ''
|
413
|
};
|
422
|
};
|
414
|
break;
|
423
|
break;
|
415
|
default:
|
424
|
default:
|
416
|
_attrs = {
|
425
|
_attrs = {
|
417
|
- PRD_SKN: $item.data('id')
|
426
|
+ PRD_SKN: $item.data('id') + ''
|
418
|
};
|
427
|
};
|
419
|
break;
|
428
|
break;
|
420
|
}
|
429
|
}
|
421
|
|
430
|
|
422
|
if ($target) {
|
431
|
if ($target) {
|
423
|
- _attrs.SORT_NM = search.searchParams.order;
|
432
|
+ _attrs.SORT_NM = order2Cn[search.searchParams.order];
|
424
|
_attrs.FILTER_VALUE = search.searchParams.filter;
|
433
|
_attrs.FILTER_VALUE = search.searchParams.filter;
|
425
|
}
|
434
|
}
|
426
|
|
435
|
|
|
@@ -440,17 +449,17 @@ let {analysisShowData} = analysisWorker(analysisMap, 'YB_NEW_ARRIVAL_FLR_C'); |
|
@@ -440,17 +449,17 @@ let {analysisShowData} = analysisWorker(analysisMap, 'YB_NEW_ARRIVAL_FLR_C'); |
440
|
$callback.add(function(html, searchParams) {
|
449
|
$callback.add(function(html, searchParams) {
|
441
|
let pageData = analysisShowData('new-goods', {container: $(`<div>${html}</div>`)});
|
450
|
let pageData = analysisShowData('new-goods', {container: $(`<div>${html}</div>`)});
|
442
|
|
451
|
|
443
|
- pageData.SORT_NM = searchParams.order;
|
452
|
+ pageData.SORT_NM = order2Cn[searchParams.order];
|
444
|
pageData.FILTER_VALUE = searchParams.filter;
|
453
|
pageData.FILTER_VALUE = searchParams.filter;
|
445
|
|
454
|
|
446
|
- analysis('YB_SHOW_NEW_ARRIVAL', {data: pageData});
|
455
|
+ analysis('YB_SHOW_NEW_ARRIVAL', {DATA: pageData});
|
447
|
});
|
456
|
});
|
448
|
|
457
|
|
449
|
$(function() {
|
458
|
$(function() {
|
450
|
setTimeout(()=> {
|
459
|
setTimeout(()=> {
|
451
|
// 新品到着页面曝光时的页面数据,异步的单独发
|
460
|
// 新品到着页面曝光时的页面数据,异步的单独发
|
452
|
analysis('YB_SHOW_NEW_ARRIVAL', {
|
461
|
analysis('YB_SHOW_NEW_ARRIVAL', {
|
453
|
- data: ['banner-top', 'new-recommend', 'handpick'].map(analysisShowData)
|
462
|
+ DATA: ['banner-top', 'new-recommend', 'handpick'].map(analysisShowData)
|
454
|
});
|
463
|
});
|
455
|
}, 1000);
|
464
|
}, 1000);
|
456
|
});
|
465
|
});
|