Authored by yyq

Merge branch 'feature/suggestItem' into gray

@@ -1766,7 +1766,7 @@ exports.handleSuggestData = (origin, query) => { @@ -1766,7 +1766,7 @@ exports.handleSuggestData = (origin, query) => {
1766 }]; 1766 }];
1767 1767
1768 _.forEach(origin, value => { 1768 _.forEach(origin, value => {
1769 - if (query === value.keyword) { 1769 + if (query === value.keyword || value.keyword.length <= 2) {
1770 return; 1770 return;
1771 } 1771 }
1772 1772
@@ -392,7 +392,7 @@ exports.getSearchKeywordData = (params, channel) => { @@ -392,7 +392,7 @@ exports.getSearchKeywordData = (params, channel) => {
392 // 调用接口 392 // 调用接口
393 let apiMethod = [ 393 let apiMethod = [
394 headerModel.requestHeaderData(channel), 394 headerModel.requestHeaderData(channel),
395 - searchApi.getSuggest({keyword: searchParams.query}), 395 + searchApi.getSuggest({keyword: searchParams.query.substring(0, 2)}),
396 searchApi.getProductList(searchParams, 'fuzzySearch') 396 searchApi.getProductList(searchParams, 'fuzzySearch')
397 ]; 397 ];
398 398
@@ -2,7 +2,6 @@ @@ -2,7 +2,6 @@
2 {{# filters}} 2 {{# filters}}
3 {{> product/filter-box}} 3 {{> product/filter-box}}
4 {{/ filters}} 4 {{/ filters}}
5 -{{log filters}}  
6 5
7 {{#if phrase}} 6 {{#if phrase}}
8 <div class="phrase"> 7 <div class="phrase">
@@ -35,7 +35,7 @@ function randomString(len) { @@ -35,7 +35,7 @@ function randomString(len) {
35 function getSearchRecommend() { 35 function getSearchRecommend() {
36 36
37 $.ajax({ 37 $.ajax({
38 - url: '//search.yohobuy.com/product/search/less/recommend', 38 + url: '/product/search/less/recommend',
39 dataType: 'json', 39 dataType: 'json',
40 success: function(data) { 40 success: function(data) {
41 41
@@ -87,6 +87,10 @@ @@ -87,6 +87,10 @@
87 } 87 }
88 88
89 a { 89 a {
  90 + width: 150px;
  91 + overflow: hidden;
  92 + text-overflow: ellipsis;
  93 + white-space: nowrap;
90 display: block; 94 display: block;
91 color: #666; 95 color: #666;
92 padding-left: 10px; 96 padding-left: 10px;