Authored by 郭成尧

解决价格筛选问题

... ... @@ -2,7 +2,7 @@
* @Author: Targaryen
* @Date: 2016-06-02 15:50:47
* @Last Modified by: Targaryen
* @Last Modified time: 2016-06-22 17:32:39
* @Last Modified time: 2016-06-22 18:36:26
*/
'use strict';
... ... @@ -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
... ... @@ -498,6 +498,9 @@ exports.handleSaleFilterData = (origin, params) => {
if (!_.isEmpty(origin.priceRange)) {
_.forEach(origin.priceRange, (value, key) => {
if (params.price === key) {
priceRangechecked = true;
}
let price = {
checked: params.price === key,
href: handleFilterUrl(params, { price: key }),
... ...