...
|
...
|
@@ -30,27 +30,6 @@ const handleFilterUrl = (originParam, newParam) => { |
|
|
return _.trim(dest, '&');
|
|
|
};
|
|
|
|
|
|
/**
|
|
|
* 处理最新降价折扣信息
|
|
|
* @param params 当前 URL 的参数
|
|
|
* @returns {Array|*[]}
|
|
|
*/
|
|
|
const handleSaleNewSaleSortData = (params) => {
|
|
|
return [{
|
|
|
name: '1~3折',
|
|
|
href: handleFilterUrl(params, {p_d: '0.1,0.3'}),
|
|
|
checked: params.p_d === '0.1,0.3'
|
|
|
}, {
|
|
|
name: '4~6折',
|
|
|
href: handleFilterUrl(params, {p_d: '0.4,0.6'}),
|
|
|
checked: params.p_d === '0.4,0.6'
|
|
|
}, {
|
|
|
name: '7折以上',
|
|
|
href: handleFilterUrl(params, {p_d: '0.7,1'}),
|
|
|
checked: params.p_d === '0.7,1'
|
|
|
}];
|
|
|
};
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 处理选中数据
|
...
|
...
|
@@ -138,6 +117,7 @@ const handleBrandCheckedData = (params, origin) => { |
|
|
dest[0].name += '、' + checked.name.substring(0, 3) + '...';
|
|
|
}
|
|
|
checkedCount++;
|
|
|
|
|
|
// 建议保留,需要品牌可以单个删除时放开注释即可
|
|
|
// dest.push(checked);
|
|
|
}
|
...
|
...
|
@@ -561,11 +541,13 @@ exports.handlePathNavData = (data, params, page) => { |
|
|
|
|
|
switch (page) {
|
|
|
case 'search':
|
|
|
//搜索结果提示
|
|
|
// 搜索结果提示
|
|
|
if (params.query || params.keywords) {
|
|
|
params.query = params.query || params.keywords
|
|
|
params.query = params.query || params.keywords;
|
|
|
pathNav.push({
|
|
|
name: '“<span id="nav_keyword">' + params.query + '</span>” 共<span id="nav_keyword_count">' + data.total + '</span>个结果',
|
|
|
name: '“<span id="nav_keyword">' +
|
|
|
params.query + '</span>” 共<span id="nav_keyword_count">' +
|
|
|
data.total + '</span>个结果'
|
|
|
});
|
|
|
} else {
|
|
|
pathNav.push({
|
...
|
...
|
@@ -574,7 +556,7 @@ exports.handlePathNavData = (data, params, page) => { |
|
|
}
|
|
|
break;
|
|
|
case 'brand':
|
|
|
//品牌
|
|
|
// 品牌
|
|
|
pathNav.push(
|
|
|
{
|
|
|
name: '品牌一览',
|
...
|
...
|
@@ -589,7 +571,7 @@ exports.handlePathNavData = (data, params, page) => { |
|
|
);
|
|
|
break;
|
|
|
default :
|
|
|
//分类
|
|
|
// 分类
|
|
|
_.forEach(data, (sort) => {
|
|
|
if (sort.relation_parameter.sort === params.sort) {
|
|
|
pathNav.push({
|
...
|
...
|
|