...
|
...
|
@@ -3,6 +3,7 @@ |
|
|
* @author: wsl<shuiling.wang@yoho.cn>
|
|
|
* @date: 2016/7/29
|
|
|
*/
|
|
|
const logger = global.yoho.logger;
|
|
|
const _ = require('lodash');
|
|
|
|
|
|
/**
|
...
|
...
|
@@ -211,11 +212,18 @@ const getSearchParamsWithoutMethod = (params) => { |
|
|
status: params.status || 1,
|
|
|
sales: params.sales || 'Y',
|
|
|
stocknumber: params.stocknumber || 1,
|
|
|
attribute_not: params.attribute_not || 1
|
|
|
attribute_not: params.attribute_not || 2
|
|
|
};
|
|
|
|
|
|
if (params.query) { // 模糊查询参数
|
|
|
finalParams.query = params.query.replace(/\+/g, ',');
|
|
|
let queryString = '';
|
|
|
|
|
|
try {
|
|
|
queryString = decodeURIComponent(params.query).replace(/\+/g, ',');
|
|
|
} catch (e) {
|
|
|
logger.error('decodeURIComponent params query: ' + e);
|
|
|
}
|
|
|
finalParams.query = queryString;
|
|
|
}
|
|
|
if (params.yh_channel || params.channel) { // 频道
|
|
|
finalParams.yh_channel = params.yh_channel || getChannelType(params.channel);
|
...
|
...
|
|