Authored by zhangxiaoru

首页

... ... @@ -136,15 +136,16 @@ $.jqtab = function(nav, posNav, main) {
}else if(activeTab == 'popularity'){
hotData();
} else if (activeTab == 'home-page') {
myScroll.scrollTo(0,0);
setTimeout(function () {
myScroll.refresh();
scH = $('#scroller').outerHeight();
console.log(scH)
}, 1000);
}
myScroll.scrollTo(0,0);
$nav1.addClass('hide');
return false;
});
};
... ... @@ -476,9 +477,9 @@ function search(opt) {
}, 1000);
myScroll.refresh();
console.log(sTop)
if (sTop > imgH + nav1H + main1oH) {
myScroll.scrollTo(0,-(imgH + nav1H + main1oH));
myScroll.scrollTo(0,-(imgH + nav1H + main1oH + 10));
}
},
error: function() {
... ... @@ -694,7 +695,7 @@ function stopPropagation(e) {
e.cancelBubble = true; }
}
$(document).bind('touchstart',function(){
$(document).bind('touchstart', function(){
$('.sub-group').addClass('hide');
});
... ... @@ -703,18 +704,13 @@ $('.shop-foot-wrapper').bind('touchstart',function(e){
});
//收藏
function collectClick() {
$('#collect').on('touchstart', function() {
if ($('#collect').hasClass('alreadyCollect')) {
cancelShop();
}else{
collectShop();
}
});
};
collectClick();
$('#collect').bind('touchstart', function() {
if ($('#collect').hasClass('alreadyCollect')) {
cancelShop();
}else{
collectShop();
}
});
function postCollect(info) {
var url = '';
... ... @@ -733,8 +729,10 @@ function postCollect(info) {
if (data.code === 200){
if ($('#collect').hasClass('alreadyCollect')) {
console.log(1)
$('#collect').attr('class', 'notCollect');
}else{
console.log(0)
$('#collect').attr('class', 'alreadyCollect');
}
}
... ...