Authored by zhangxiaoru

首页全部商品

17.1 KB | W: | H:

16.3 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
@@ -120,7 +120,7 @@ function tabChange(dom, index) { @@ -120,7 +120,7 @@ function tabChange(dom, index) {
120 //首页导航 120 //首页导航
121 $.jqtab = function(nav, posNav, main) { 121 $.jqtab = function(nav, posNav, main) {
122 122
123 - $(nav + ' li, ' + posNav + ' li').on('touchstart', function() { 123 + $(nav + ' li, ' + posNav + ' li').not('li.all-goods').on('touchstart', function() {
124 124
125 var index = $(this).index(), 125 var index = $(this).index(),
126 activeTab = $(this).attr('tab'); 126 activeTab = $(this).attr('tab');
@@ -135,13 +135,10 @@ $.jqtab = function(nav, posNav, main) { @@ -135,13 +135,10 @@ $.jqtab = function(nav, posNav, main) {
135 135
136 if(activeTab == 'new-arrival'){ 136 if(activeTab == 'new-arrival'){
137 newData(); 137 newData();
138 - }else if(activeTab == 'popularity'){ 138 + } else if(activeTab == 'popularity'){
139 hotData(); 139 hotData();
140 } else if (activeTab == 'home-page') { 140 } else if (activeTab == 'home-page') {
141 myScroll && myScroll.refresh(); 141 myScroll && myScroll.refresh();
142 - // setTimeout(function() {  
143 - // scH = $('#scroller').outerHeight();  
144 - // },1000);  
145 scH = $('#scroller').outerHeight(); 142 scH = $('#scroller').outerHeight();
146 $nav1.removeClass('fixed-top'); 143 $nav1.removeClass('fixed-top');
147 $nav1.removeClass('absolute'); 144 $nav1.removeClass('absolute');
@@ -236,7 +233,6 @@ myScroll.on('scroll', function() { @@ -236,7 +233,6 @@ myScroll.on('scroll', function() {
236 233
237 if (sTop + winH * 2 > scH) { 234 if (sTop + winH * 2 > scH) {
238 switch(viewType) { 235 switch(viewType) {
239 -  
240 case 2: 236 case 2:
241 newData(); 237 newData();
242 break; 238 break;
@@ -37,7 +37,7 @@ @@ -37,7 +37,7 @@
37 <li class="active color" tab="home-page">首页</li> 37 <li class="active color" tab="home-page">首页</li>
38 <li tab="new-arrival">上新</li> 38 <li tab="new-arrival">上新</li>
39 <li tab="popularity">人气</li> 39 <li tab="popularity">人气</li>
40 - <li> 40 + <li class="all-goods">
41 <a href="{{allGoods}}">全部商品</a> 41 <a href="{{allGoods}}">全部商品</a>
42 </li> 42 </li>
43 </ul> 43 </ul>