...
|
...
|
@@ -632,9 +632,9 @@ exports.handleFilterData = (origin, params, total) => { |
|
|
|
|
|
// 处理年龄段
|
|
|
if (!_.isEmpty(origin.ageLevel)) {
|
|
|
|
|
|
// 只有一个默认选中
|
|
|
let isChecked = origin.ageLevel.length === 1;
|
|
|
|
|
|
_.forEach(origin.ageLevel, (value) => {
|
|
|
let ageLevel = {
|
|
|
checked: params.ageLevel === value.id || isChecked,
|
...
|
...
|
@@ -730,11 +730,12 @@ exports.handleSeniorFilterData = (data, params) => { |
|
|
}
|
|
|
|
|
|
if (!_.isEmpty(data.standard)) {
|
|
|
|
|
|
let qStandardStr = (params && params.standard) || '';
|
|
|
let qStandard = {};
|
|
|
|
|
|
_.forEach(qStandardStr.split(','), value => {
|
|
|
let val = value.split('_');
|
|
|
|
|
|
if (val && val.length >= 2) {
|
|
|
qStandard[parseInt(val[0], 10)] = parseInt(val[1], 10);
|
|
|
}
|
...
|
...
|
@@ -742,7 +743,8 @@ exports.handleSeniorFilterData = (data, params) => { |
|
|
|
|
|
_.forEach(data.standard, value => {
|
|
|
let sub = [];
|
|
|
//let parKey = `parameter_${value.standard_id}`;
|
|
|
|
|
|
// let parKey = `parameter_${value.standard_id}`;
|
|
|
|
|
|
_.forEach(value.sub, subValue => {
|
|
|
let ched = qStandard[value.standard_id] === parseInt(subValue.standard_id, 10);
|
...
|
...
|
@@ -750,14 +752,24 @@ exports.handleSeniorFilterData = (data, params) => { |
|
|
if (ched) {
|
|
|
conditions.push({
|
|
|
name: subValue.standard_name,
|
|
|
href: handleFilterUrl(params, { standard: getStandard(qStandard, null, { k: value.standard_id, v: subValue.standard_id})})
|
|
|
href: handleFilterUrl(params, {
|
|
|
standard: getStandard(qStandard, null, {
|
|
|
k: value.standard_id,
|
|
|
v: subValue.standard_id
|
|
|
})
|
|
|
})
|
|
|
});
|
|
|
}
|
|
|
|
|
|
sub.push({
|
|
|
id: value.standard_id,
|
|
|
checked: ched,
|
|
|
href: handleFilterUrl(params, { standard: getStandard(qStandard, { k: value.standard_id, v: subValue.standard_id})}),
|
|
|
href: handleFilterUrl(params, {
|
|
|
standard: getStandard(qStandard, {
|
|
|
k: value.standard_id,
|
|
|
v: subValue.standard_id
|
|
|
})
|
|
|
}),
|
|
|
name: subValue.standard_name
|
|
|
});
|
|
|
});
|
...
|
...
|
@@ -788,7 +800,8 @@ exports.handleFilterDataAll = (data, params) => { |
|
|
standard: _.get(data, 'standard', [])
|
|
|
}, params);
|
|
|
|
|
|
let conditions = _.union(_.get(baseFilter, 'checkedConditions.conditions'), _.get(seniorFilter, 'checkedConditions.conditions'));
|
|
|
let conditions = _.union(_.get(baseFilter, 'checkedConditions.conditions'),
|
|
|
_.get(seniorFilter, 'checkedConditions.conditions'));
|
|
|
|
|
|
return Object.assign({}, baseFilter, seniorFilter, {checkedConditions: {conditions: conditions}});
|
|
|
};
|
...
|
...
|
@@ -1077,7 +1090,7 @@ exports.handleBrandBanner = (data) => { |
|
|
|
|
|
return {
|
|
|
bannerHeight: 150,
|
|
|
banner: data.brandBanner,
|
|
|
banner: helpers.getForceSourceUrl(data.brandBanner),
|
|
|
brandHome: data.url,
|
|
|
brandIntro: helpers.urlFormat('/about', '', data.brandDomain),
|
|
|
dataId: data.brandId
|
...
|
...
|
|