Authored by zhangxiaoru

首页

@@ -136,15 +136,16 @@ $.jqtab = function(nav, posNav, main) { @@ -136,15 +136,16 @@ $.jqtab = function(nav, posNav, main) {
136 }else if(activeTab == 'popularity'){ 136 }else if(activeTab == 'popularity'){
137 hotData(); 137 hotData();
138 } else if (activeTab == 'home-page') { 138 } else if (activeTab == 'home-page') {
139 - myScroll.scrollTo(0,0);  
140 139
141 setTimeout(function () { 140 setTimeout(function () {
142 myScroll.refresh(); 141 myScroll.refresh();
143 scH = $('#scroller').outerHeight(); 142 scH = $('#scroller').outerHeight();
144 - console.log(scH)  
145 }, 1000); 143 }, 1000);
146 } 144 }
147 145
  146 + myScroll.scrollTo(0,0);
  147 + $nav1.addClass('hide');
  148 +
148 return false; 149 return false;
149 }); 150 });
150 }; 151 };
@@ -476,9 +477,9 @@ function search(opt) { @@ -476,9 +477,9 @@ function search(opt) {
476 }, 1000); 477 }, 1000);
477 478
478 myScroll.refresh(); 479 myScroll.refresh();
479 - console.log(sTop) 480 +
480 if (sTop > imgH + nav1H + main1oH) { 481 if (sTop > imgH + nav1H + main1oH) {
481 - myScroll.scrollTo(0,-(imgH + nav1H + main1oH)); 482 + myScroll.scrollTo(0,-(imgH + nav1H + main1oH + 10));
482 } 483 }
483 }, 484 },
484 error: function() { 485 error: function() {
@@ -694,7 +695,7 @@ function stopPropagation(e) { @@ -694,7 +695,7 @@ function stopPropagation(e) {
694 e.cancelBubble = true; } 695 e.cancelBubble = true; }
695 } 696 }
696 697
697 -$(document).bind('touchstart',function(){ 698 +$(document).bind('touchstart', function(){
698 $('.sub-group').addClass('hide'); 699 $('.sub-group').addClass('hide');
699 }); 700 });
700 701
@@ -703,18 +704,13 @@ $('.shop-foot-wrapper').bind('touchstart',function(e){ @@ -703,18 +704,13 @@ $('.shop-foot-wrapper').bind('touchstart',function(e){
703 }); 704 });
704 705
705 //收藏 706 //收藏
706 -function collectClick() {  
707 - $('#collect').on('touchstart', function() {  
708 - if ($('#collect').hasClass('alreadyCollect')) {  
709 - cancelShop();  
710 -  
711 - }else{  
712 - collectShop();  
713 -  
714 - }  
715 - });  
716 -};  
717 -collectClick(); 707 +$('#collect').bind('touchstart', function() {
  708 + if ($('#collect').hasClass('alreadyCollect')) {
  709 + cancelShop();
  710 + }else{
  711 + collectShop();
  712 + }
  713 + });
718 714
719 function postCollect(info) { 715 function postCollect(info) {
720 var url = ''; 716 var url = '';
@@ -733,8 +729,10 @@ function postCollect(info) { @@ -733,8 +729,10 @@ function postCollect(info) {
733 729
734 if (data.code === 200){ 730 if (data.code === 200){
735 if ($('#collect').hasClass('alreadyCollect')) { 731 if ($('#collect').hasClass('alreadyCollect')) {
  732 + console.log(1)
736 $('#collect').attr('class', 'notCollect'); 733 $('#collect').attr('class', 'notCollect');
737 }else{ 734 }else{
  735 + console.log(0)
738 $('#collect').attr('class', 'alreadyCollect'); 736 $('#collect').attr('class', 'alreadyCollect');
739 } 737 }
740 } 738 }