...
|
...
|
@@ -24,7 +24,7 @@ const handleFilterUrl = (originParam, newParam) => { |
|
|
tempOriginParam = Object.assign(tempOriginParam, originParam, newParam);
|
|
|
delete tempOriginParam.uid;
|
|
|
|
|
|
_.forEach(tempOriginParam, function(value, key) {
|
|
|
_.forEach(tempOriginParam, function (value, key) {
|
|
|
dest = dest + key + '=' + value + '&';
|
|
|
});
|
|
|
|
...
|
...
|
@@ -67,8 +67,8 @@ const handleSalebreakingYardsSortData = (origin, params) => { |
|
|
|
|
|
// 判断是否在这组数据里面
|
|
|
if (!_.isEmpty(_.find(value.sort_id.split(','), o => {
|
|
|
return o === sortParam;
|
|
|
}))) {
|
|
|
return o === sortParam;
|
|
|
}))) {
|
|
|
|
|
|
// 如果在某组数据里面,组合数据退出循环
|
|
|
_.forEach(value.sub, subValue => {
|
...
|
...
|
@@ -153,8 +153,8 @@ const handleBrandCheckedData = (params, origin) => { |
|
|
if (!_.isEmpty(origin)) {
|
|
|
_.forEach(origin, (value) => {
|
|
|
if (typeof _.find(intBrands, o => {
|
|
|
return _.isEqual(o, value.id);
|
|
|
}) !== 'undefined') {
|
|
|
return _.isEqual(o, value.id);
|
|
|
}) !== 'undefined') {
|
|
|
|
|
|
let checked = {
|
|
|
name: value.name
|
...
|
...
|
@@ -463,7 +463,7 @@ exports.handleSaleFilterData = (origin, params) => { |
|
|
if (!_.isEmpty(origin.brand)) {
|
|
|
let count = 0;
|
|
|
|
|
|
_.forEach(origin.brand, function(value) {
|
|
|
_.forEach(origin.brand, function (value) {
|
|
|
let brand = {
|
|
|
checked: (typeof _.find(intBrands, o => {
|
|
|
return _.isEqual(o, value.id);
|
...
|
...
|
@@ -496,7 +496,9 @@ exports.handleSaleFilterData = (origin, params) => { |
|
|
return o.index;
|
|
|
});
|
|
|
|
|
|
// 处理 价格 筛选数据
|
|
|
// 处理价格筛选数据
|
|
|
let priceRangechecked = false;
|
|
|
|
|
|
if (!_.isEmpty(origin.priceRange)) {
|
|
|
_.forEach(origin.priceRange, (value, key) => {
|
|
|
let price = {
|
...
|
...
|
@@ -509,6 +511,20 @@ exports.handleSaleFilterData = (origin, params) => { |
|
|
});
|
|
|
}
|
|
|
|
|
|
// 处理用户自主填写的价格区间
|
|
|
if (!priceRangechecked && params.price) {
|
|
|
let customPrice = _.split(params.price, ',');
|
|
|
|
|
|
dest.customPrice = {
|
|
|
min: customPrice[0],
|
|
|
max: customPrice[1]
|
|
|
};
|
|
|
dest.checkedConditions.conditions.push({
|
|
|
name: '¥ ' + customPrice[0] + '-' + customPrice[1],
|
|
|
href: handleFilterUrl(params, {price: ''})
|
|
|
});
|
|
|
}
|
|
|
|
|
|
// 处理性别数据
|
|
|
dest.gender = [
|
|
|
{
|
...
|
...
|
@@ -598,7 +614,7 @@ exports.handleBannerData = (origin) => { |
|
|
let dest = {};
|
|
|
|
|
|
dest.list = [];
|
|
|
_.forEach(origin, function(value) {
|
|
|
_.forEach(origin, function (value) {
|
|
|
if (value.template_name === 'focus') {
|
|
|
_.forEach(value.data, subValue => {
|
|
|
|
...
|
...
|
|