Authored by 陈峰

解决关键词搜索重复query字段时造成报错并阻塞访问请求

@@ -32,6 +32,7 @@ const list = (req, res, next) => { @@ -32,6 +32,7 @@ const list = (req, res, next) => {
32 params.shopId = params.shop_id; 32 params.shopId = params.shop_id;
33 } 33 }
34 34
  35 + params.query = query;
35 params.isApp = req.yoho.isApp; 36 params.isApp = req.yoho.isApp;
36 params.physical_channel = req.yoho.channel && searchProcess.getChannelType(req.yoho.channel); 37 params.physical_channel = req.yoho.channel && searchProcess.getChannelType(req.yoho.channel);
37 38
@@ -133,7 +134,7 @@ const list = (req, res, next) => { @@ -133,7 +134,7 @@ const list = (req, res, next) => {
133 }); 134 });
134 }).catch(next); 135 }).catch(next);
135 } 136 }
136 - }); 137 + }).catch(next);
137 }; 138 };
138 139
139 /** 140 /**
@@ -10,7 +10,6 @@ const searchProcess = require(`${utils}/search-process`); @@ -10,7 +10,6 @@ const searchProcess = require(`${utils}/search-process`);
10 const _ = require('lodash'); 10 const _ = require('lodash');
11 const logger = global.yoho.logger; 11 const logger = global.yoho.logger;
12 const api = global.yoho.API; 12 const api = global.yoho.API;
13 -const camelCase = global.yoho.camelCase;  
14 const cache = require('memory-cache'); 13 const cache = require('memory-cache');
15 14
16 15