Merge branch 'feature/searchOptimi' into release/5.5
Showing
1 changed file
with
2 additions
and
3 deletions
@@ -206,7 +206,7 @@ const getSearchData = (params) => { | @@ -206,7 +206,7 @@ const getSearchData = (params) => { | ||
206 | 206 | ||
207 | // 搜索过来的 推荐词条件判断 redmine: 18567 | 207 | // 搜索过来的 推荐词条件判断 redmine: 18567 |
208 | if (params.from === 'search' && params.page === 1 && (result.data.isChangedQuery === 'Y' || | 208 | if (params.from === 'search' && params.page === 1 && (result.data.isChangedQuery === 'Y' || |
209 | - result.data.total <= 20 || params.needSuggestion === 'Y')) { | 209 | + result.data.total < 20 || params.needSuggestion === 'Y')) { |
210 | 210 | ||
211 | params.isChangedQuery = result.data.isChangedQuery === 'Y'; | 211 | params.isChangedQuery = result.data.isChangedQuery === 'Y'; |
212 | 212 | ||
@@ -215,8 +215,7 @@ const getSearchData = (params) => { | @@ -215,8 +215,7 @@ const getSearchData = (params) => { | ||
215 | termsSuggestion: productProcess.termsSuggestion( | 215 | termsSuggestion: productProcess.termsSuggestion( |
216 | result.data.suggestion && result.data.suggestion.terms_suggestion || [], params | 216 | result.data.suggestion && result.data.suggestion.terms_suggestion || [], params |
217 | ), | 217 | ), |
218 | - isMaybeLike: (params.isChangedQuery || params.needSuggestion === 'Y') && | ||
219 | - result.data.total > 0 ? false : true // 猜你喜欢显示不显示判断 | 218 | + isMaybeLike: result.data.total < 20 // 搜索过来的 小于 20条 猜你喜欢显示不显示判断 |
220 | }; | 219 | }; |
221 | suggestion.isNeedSuggestionOne = suggestion.termsSuggestion.length > 1;// 如果只有一个<或者试试不显示> | 220 | suggestion.isNeedSuggestionOne = suggestion.termsSuggestion.length > 1;// 如果只有一个<或者试试不显示> |
222 | } | 221 | } |
-
Please register or login to post a comment