...
|
...
|
@@ -67,7 +67,9 @@ var $listNav = $('#list-nav'), |
|
|
introHammer,
|
|
|
brandColHammer;
|
|
|
|
|
|
var getChannel, C_ID, RES_QTY, qwert;
|
|
|
var getChannel, C_ID, RES_QTY, argument, optype;
|
|
|
|
|
|
var category = $('#category-point').val();
|
|
|
|
|
|
require('../../common');
|
|
|
|
...
|
...
|
@@ -373,7 +375,7 @@ function search(opt) { |
|
|
searching = true;
|
|
|
loading.showLoadingMask();
|
|
|
|
|
|
qwert = setting;
|
|
|
argument = setting;
|
|
|
|
|
|
$.ajax({
|
|
|
type: 'GET',
|
...
|
...
|
@@ -384,7 +386,8 @@ function search(opt) { |
|
|
num,
|
|
|
$container,
|
|
|
goodIds = [],
|
|
|
FILTER_VALUE;
|
|
|
FILTER_VALUE,
|
|
|
yasparm;
|
|
|
|
|
|
switch (navType) {
|
|
|
case 'newest':
|
...
|
...
|
@@ -399,14 +402,40 @@ function search(opt) { |
|
|
default:
|
|
|
break;
|
|
|
}
|
|
|
//console.log(data)
|
|
|
|
|
|
if (data === '') {
|
|
|
if (data === '' || data.list) {
|
|
|
nav.end = true;
|
|
|
|
|
|
if (nav.reload) {
|
|
|
$container.html(noResult);
|
|
|
}
|
|
|
} else {
|
|
|
|
|
|
yasparm = {
|
|
|
C_ID: C_ID,
|
|
|
PAGE_NUM: setting.page,
|
|
|
FILTER_VALUE: FILTER_VALUE,
|
|
|
SORT_TYPE: setting.type
|
|
|
}
|
|
|
|
|
|
if(category) {
|
|
|
optype = 'YB_CATEGORY_GOODS_LIST_L',
|
|
|
yasparm = Object.assign(yasparm, {
|
|
|
CATEGORY_ID: window.queryString.title || '',
|
|
|
})
|
|
|
} else if ($brandHeader.length > 0) {
|
|
|
optype = 'YB_BRAND_GOODS_LIST_L',
|
|
|
yasparm = Object.assign(yasparm, {
|
|
|
BRAND_ID: $brandHeader.data('id')
|
|
|
})
|
|
|
} else {
|
|
|
optype = 'YB_KEYWORD_GOOS_LIST_L',
|
|
|
yasparm = Object.assign(yasparm, {
|
|
|
KEYWORD: setting.query || ''
|
|
|
})
|
|
|
}
|
|
|
|
|
|
if (nav.reload) {
|
|
|
$container.html(data);
|
|
|
lazyLoad($container.find('.lazy'));
|
...
|
...
|
@@ -422,28 +451,29 @@ function search(opt) { |
|
|
}
|
|
|
});
|
|
|
|
|
|
yasparm = Object.assign(yasparm, {
|
|
|
PRD_LIST: goodIds,
|
|
|
RES_QTY: RES_QTY,
|
|
|
FILTER_VALUE: FILTER_VALUE
|
|
|
})
|
|
|
|
|
|
if (window._yas && window._yas.sendCustomInfo) {
|
|
|
window._yas.sendCustomInfo({
|
|
|
op: 'YB_KEYWORD_GOOS_LIST_L',
|
|
|
param: JSON.stringify({
|
|
|
C_ID: C_ID,
|
|
|
KEYWORD: setting.query || '',
|
|
|
RES_QTY: RES_QTY,
|
|
|
PRD_LIST: goodIds,
|
|
|
PAGE_NUM: setting.page,
|
|
|
FILTER_VALUE: FILTER_VALUE,
|
|
|
SORT_TYPE: setting.type
|
|
|
})
|
|
|
op: optype,
|
|
|
param: JSON.stringify(yasparm)
|
|
|
}, true);
|
|
|
}
|
|
|
} else {
|
|
|
num = $container.find('.good-info').length;
|
|
|
$container.append(data);
|
|
|
|
|
|
if ($container.find('.total')) {
|
|
|
if ($container.find('.total')[1]) {
|
|
|
$container.find('.total')[1].remove();
|
|
|
}
|
|
|
|
|
|
RES_QTY = $container.find('.total').data('id');
|
|
|
FILTER_VALUE = JSON.stringify(setting).replace(/\{|\}|\"/g, '');
|
|
|
|
|
|
$container.find('.good-info:gt(' + (num - 1) + ')').each(function() {
|
|
|
var goodid = $(this).data('good-id');
|
|
|
|
...
|
...
|
@@ -452,18 +482,16 @@ function search(opt) { |
|
|
}
|
|
|
});
|
|
|
|
|
|
yasparm = Object.assign(yasparm, {
|
|
|
PRD_LIST: goodIds,
|
|
|
RES_QTY: RES_QTY,
|
|
|
FILTER_VALUE: FILTER_VALUE
|
|
|
})
|
|
|
|
|
|
if (window._yas && window._yas.sendCustomInfo) {
|
|
|
window._yas.sendCustomInfo({
|
|
|
op: 'YB_KEYWORD_GOOS_LIST_L',
|
|
|
param: JSON.stringify({
|
|
|
C_ID: C_ID,
|
|
|
KEYWORD: setting.query || '',
|
|
|
RES_QTY: RES_QTY,
|
|
|
PRD_LIST: goodIds,
|
|
|
PAGE_NUM: setting.page,
|
|
|
FILTER_VALUE: FILTER_VALUE,
|
|
|
SORT_TYPE: setting.type
|
|
|
})
|
|
|
op: optype,
|
|
|
param: JSON.stringify(yasparm)
|
|
|
}, true);
|
|
|
}
|
|
|
|
...
|
...
|
@@ -745,24 +773,44 @@ $listNav.on('touchstart', 'li', function() { |
|
|
|
|
|
$('#goods-container').on('click', '.good-info', function(event) {
|
|
|
var PRD_ID = $(this).data('good-id'),
|
|
|
PRD_NUM = $(this).index() + 1,
|
|
|
FILTER_VALUE = JSON.stringify(qwert).replace(/\{|\}|\"/g, '');
|
|
|
PRD_NUM = $(this).index(),
|
|
|
FILTER_VALUE = JSON.stringify(argument).replace(/\{|\}|\"/g, ''),
|
|
|
yasparms;
|
|
|
|
|
|
//event.preventDefault();
|
|
|
|
|
|
yasparms = {
|
|
|
C_ID: C_ID,
|
|
|
PRD_ID: PRD_ID,
|
|
|
PRD_NUM: PRD_NUM,
|
|
|
PAGE_NUM: argument.page,
|
|
|
FILTER_VALUE: FILTER_VALUE,
|
|
|
SORT_TYPE: argument.type
|
|
|
}
|
|
|
|
|
|
if(category) {
|
|
|
optype = 'YB_CATEGORY_GOODS_LIST_C',
|
|
|
yasparms = Object.assign(yasparms, {
|
|
|
CATEGORY_ID: window.queryString.title || '',
|
|
|
})
|
|
|
} else if ($brandHeader.length > 0) {
|
|
|
optype = 'YB_BRAND_GOODS_LIST_C',
|
|
|
yasparms = Object.assign(yasparms, {
|
|
|
BRAND_ID: $brandHeader.data('id')
|
|
|
})
|
|
|
} else {
|
|
|
optype = 'YB_KEYWORD_GOOS_LIST_C',
|
|
|
yasparms = Object.assign(yasparms, {
|
|
|
KEYWORD: argument.query || ''
|
|
|
})
|
|
|
}
|
|
|
|
|
|
event.preventDefault();
|
|
|
if (window._yas && window._yas.sendCustomInfo) {
|
|
|
window._yas.sendCustomInfo({
|
|
|
op: 'YB_KEYWORD_GOODS_LIST_C',
|
|
|
param: JSON.stringify({
|
|
|
C_ID: C_ID,
|
|
|
KEYWORD: qwert.query || '',
|
|
|
PRD_ID: PRD_ID,
|
|
|
PRD_NUM: PRD_NUM,
|
|
|
PAGE_NUM: qwert.page,
|
|
|
FILTER_VALUE: FILTER_VALUE,
|
|
|
SORT_TYPE: qwert.type
|
|
|
})
|
|
|
op: optype,
|
|
|
param: JSON.stringify(yasparms)
|
|
|
}, true);
|
|
|
}
|
|
|
|
|
|
return false;
|
|
|
//return false;
|
|
|
}); |
...
|
...
|
|