Authored by 郭成尧

search-api-params-from

... ... @@ -45,7 +45,8 @@ module.exports = class extends global.yoho.BaseModel {
sales: 'Y',
outlets: 2,
stocknumber: 1,
need_filter: 'no'
need_filter: 'no',
from: 'fuzzySearch'
};
finalParams = _.assign(finalParams, searchProcess.getSearchParamsWithoutMethod(params));
... ...
... ... @@ -255,6 +255,10 @@ module.exports = class extends global.yoho.BaseModel {
method = 'app.search.li';
}
if (method === 'web.search.search') {
params.from = 'categoryList';
}
let paramsForApi = searchProcess.getSearchParamsWithoutMethod(params);
return this.get({
... ...
... ... @@ -340,6 +340,9 @@ const getSearchParamsWithoutMethod = (params) => {
if (params.physical_channel) {
finalParams.physical_channel = params.physical_channel;
}
if (params.from) {
finalParams.from = params.from;
}
finalParams = _.mapValues(finalParams, value => {
return stringProcess.decodeURIComponent(value);
... ...