Merge branch 'feature/searchOptimi' into release/5.5
Showing
2 changed files
with
7 additions
and
1 deletions
@@ -73,6 +73,12 @@ const shop = { | @@ -73,6 +73,12 @@ const shop = { | ||
73 | params.newGoods = newGoods.list || []; | 73 | params.newGoods = newGoods.list || []; |
74 | params.suggestion = newGoods.suggestion || []; | 74 | params.suggestion = newGoods.suggestion || []; |
75 | 75 | ||
76 | + // 推荐词条件判断 redmine: 18567 | ||
77 | + if (params.suggestion && params.suggestion.isNeedSuggestion && | ||
78 | + params.suggestion.termsSuggestion.length) { | ||
79 | + params.newquery = params.suggestion.termsSuggestion[0].name; | ||
80 | + } | ||
81 | + | ||
76 | if (brandId === 0) { | 82 | if (brandId === 0) { |
77 | params.query = domain; | 83 | params.query = domain; |
78 | } | 84 | } |
@@ -205,7 +205,7 @@ const getSearchData = (params) => { | @@ -205,7 +205,7 @@ const getSearchData = (params) => { | ||
205 | } | 205 | } |
206 | 206 | ||
207 | // 搜索过来的 推荐词条件判断 redmine: 18567 | 207 | // 搜索过来的 推荐词条件判断 redmine: 18567 |
208 | - if (params.from && 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'; |
-
Please register or login to post a comment