...
|
...
|
@@ -241,10 +241,26 @@ const processProductList = (list, options) => { |
|
|
};
|
|
|
|
|
|
/**
|
|
|
* 商品搜索筛选数据处理
|
|
|
* 处理筛选数据
|
|
|
* @param list
|
|
|
* @param string | options
|
|
|
* @return array 处理之后的筛选数据
|
|
|
*/
|
|
|
const processFilter = (list) => {
|
|
|
return list;
|
|
|
const processFilter = (list, options) => {
|
|
|
const filters = {
|
|
|
classify: {}
|
|
|
};
|
|
|
|
|
|
options = Object.assign({
|
|
|
gender: '1,2,3', // 默认选择的性别,默认1,2,3表示所有
|
|
|
exclude: null // 需要排除的字段
|
|
|
}, options);
|
|
|
list = camelCase(list);
|
|
|
|
|
|
_.forEach(list, (item, key) => {
|
|
|
console.log(key);
|
|
|
});
|
|
|
return filters;
|
|
|
};
|
|
|
|
|
|
/**
|
...
|
...
|
@@ -276,7 +292,9 @@ const processBreakingSort = (list) => { |
|
|
* 商品搜索接口请求
|
|
|
*/
|
|
|
const searchSales = (params) => {
|
|
|
params = params || {};
|
|
|
params = Object.assign({
|
|
|
limit: '20'
|
|
|
}, params);
|
|
|
|
|
|
if (typeCont[params.type]) {
|
|
|
params.order = typeCont[params.type][params.order];
|
...
|
...
|
|