Showing
1 changed file
with
5 additions
and
2 deletions
@@ -29,10 +29,14 @@ var getProductData = function(index, tabName) { | @@ -29,10 +29,14 @@ var getProductData = function(index, tabName) { | ||
29 | tab_name: tabName | 29 | tab_name: tabName |
30 | }, | 30 | }, |
31 | success: function(data) { | 31 | success: function(data) { |
32 | + var $productTab = $('.product-tab'); | ||
33 | + | ||
32 | if (data) { | 34 | if (data) { |
33 | - $('.product-tab').eq(index).append(product(data)); | 35 | + $productTab.eq(index).append(product(data)); |
34 | } | 36 | } |
35 | 37 | ||
38 | + $productTab.hide().eq(index).show(); | ||
39 | + | ||
36 | lazyload($('img.lazy')); | 40 | lazyload($('img.lazy')); |
37 | getFlag = false; | 41 | getFlag = false; |
38 | loading.hideLoadingMask(); | 42 | loading.hideLoadingMask(); |
@@ -57,7 +61,6 @@ var getInitData = function() { | @@ -57,7 +61,6 @@ var getInitData = function() { | ||
57 | var i = 0, $swiperTab, $productTab; | 61 | var i = 0, $swiperTab, $productTab; |
58 | var tabNum = window.queryString.tabNum - 1; | 62 | var tabNum = window.queryString.tabNum - 1; |
59 | 63 | ||
60 | - // data[1] = ['限定名额', '首发', '热卖', '明星单品']; | ||
61 | if (data[0]) { | 64 | if (data[0]) { |
62 | $('.banner').append(banner(data[0][0])); | 65 | $('.banner').append(banner(data[0][0])); |
63 | 66 |
-
Please register or login to post a comment