Authored by 刘传洋

search jsonp bug

... ... @@ -86,7 +86,7 @@ exports.suggest4Old = (req, res, next) => {
exports.serachFilterBrands = (req, res, next) => {
search.getBrands4Filter(Object.assign({}, req.query, {
keyword: req.query.query
keyword: req.query.query || ''
})).then(result => {
let dest = {
code: 200,
... ...
... ... @@ -108,6 +108,11 @@ exports.getBrands4Filter = (params) => {
nparams.price = nmp.join(',');
}
//生成路径包含callback 导致多次调用多个 callback问题
if(params && params.callback) {
delete params.callback;
}
console.log(JSON.stringify(params));
return searchApi.getBrands4Filter(Object.assign({}, params, nparams)).then(result => {
let dest = [];
... ...