...
|
...
|
@@ -94,12 +94,11 @@ exports.getSearchData = (params, channel) => { |
|
|
|
|
|
let filters = Object.assign(searchHandler.handleFilterDataAll(result[2].data, params),
|
|
|
finalResult.search.leftContent.sort);
|
|
|
let termsSuggestion = _.get(result[2], 'data.suggestion.terms_suggestion', false);
|
|
|
let termsSuggestion = _.get(result[2], 'data.suggestion.terms_suggestion', []);
|
|
|
|
|
|
filters.checkedConditions.conditions = _.concat(filters.checkedConditions.conditions,
|
|
|
finalResult.search.leftContent.checked);
|
|
|
|
|
|
|
|
|
Object.assign(finalResult.search,
|
|
|
searchHandler.handlePathNavData({total: result[2].data.total }, params, 'search', channel),
|
|
|
{
|
...
|
...
|
@@ -113,7 +112,7 @@ exports.getSearchData = (params, channel) => { |
|
|
hasNextPage: searchHandler.handleNextPage(params, result[2].data.total),
|
|
|
shopEntry: result[3],
|
|
|
name: params.query,
|
|
|
suggest: termsSuggestion ? termsSuggestion.join(',').split(',').splice(0, 3) : false,
|
|
|
suggest: ( termsSuggestion.length !== 0) ? termsSuggestion.join(',').split(',').splice(0, 3) : false,
|
|
|
changedQuery: result[2].data.isChangedQuery == 'Y',
|
|
|
suggestFirst: finalResult.search.suggestFirst,
|
|
|
suggestSecond: finalResult.search.suggestSecond
|
...
|
...
|
|