Merge branch 'feature/searchOptimi' into 'release/5.5'
搜索先过滤不合法的参数在判断 See merge request !361
Showing
1 changed file
with
7 additions
and
7 deletions
@@ -96,6 +96,13 @@ const _processClassNames = (list) => { | @@ -96,6 +96,13 @@ const _processClassNames = (list) => { | ||
96 | const _searchGoods = (params) => { | 96 | const _searchGoods = (params) => { |
97 | let method = 'app.search.li'; | 97 | let method = 'app.search.li'; |
98 | 98 | ||
99 | + // 排除基本筛选项默认值为0的对象 | ||
100 | + for (let str in params) { | ||
101 | + if (str !== 'order' && params[str] === '0' || params[str] === null) { | ||
102 | + delete params[str]; | ||
103 | + } | ||
104 | + } | ||
105 | + | ||
99 | /* tar add 160823 店铺销售类目 */ | 106 | /* tar add 160823 店铺销售类目 */ |
100 | if (params.filter_poolId) { | 107 | if (params.filter_poolId) { |
101 | method = 'app.search.pool'; | 108 | method = 'app.search.pool'; |
@@ -111,13 +118,6 @@ const _searchGoods = (params) => { | @@ -111,13 +118,6 @@ const _searchGoods = (params) => { | ||
111 | method = 'app.search.brand'; | 118 | method = 'app.search.brand'; |
112 | } | 119 | } |
113 | 120 | ||
114 | - // 排除基本筛选项默认值为0的对象 | ||
115 | - for (let str in params) { | ||
116 | - if (str !== 'order' && params[str] === '0' || params[str] === null) { | ||
117 | - delete params[str]; | ||
118 | - } | ||
119 | - } | ||
120 | - | ||
121 | if (params.channel) { | 121 | if (params.channel) { |
122 | params.yh_channel = searchProcess.getChannelType(params.channel); | 122 | params.yh_channel = searchProcess.getChannelType(params.channel); |
123 | delete params.channel; | 123 | delete params.channel; |
-
Please register or login to post a comment