Merge branch 'hotfix/search' into 'master'
首屏未找到数据 See merge request !22
Showing
1 changed file
with
8 additions
and
2 deletions
@@ -92,6 +92,13 @@ var C_ID, RES_QTY, argument, optype, filext = {}; | @@ -92,6 +92,13 @@ var C_ID, RES_QTY, argument, optype, filext = {}; | ||
92 | 92 | ||
93 | var category = $('#category-point').val(); | 93 | var category = $('#category-point').val(); |
94 | 94 | ||
95 | +var noResult = '<p class="no-result">未找到相关搜索结果</p>'; | ||
96 | + | ||
97 | +// 首屏无数据 | ||
98 | +if ($fsgc.children().length === 0) { | ||
99 | + $goodsContainer.html(noResult); | ||
100 | +} | ||
101 | + | ||
95 | require('../../common'); | 102 | require('../../common'); |
96 | 103 | ||
97 | ellipsis.init(); | 104 | ellipsis.init(); |
@@ -474,8 +481,7 @@ function search(opt, filtering) { | @@ -474,8 +481,7 @@ function search(opt, filtering) { | ||
474 | url: location.protocol + '//m.yohobuy.com/product/search/search', | 481 | url: location.protocol + '//m.yohobuy.com/product/search/search', |
475 | data: setting, | 482 | data: setting, |
476 | success: function(data) { | 483 | success: function(data) { |
477 | - var noResult = '<p class="no-result">未找到相关搜索结果</p>', | ||
478 | - num, | 484 | + var num, |
479 | $container, | 485 | $container, |
480 | goodIds = [], | 486 | goodIds = [], |
481 | yasparm, | 487 | yasparm, |
-
Please register or login to post a comment