...
|
...
|
@@ -106,8 +106,7 @@ if ($('.multi-browse').find('li').size() > 1) { |
|
|
}
|
|
|
|
|
|
function tabChange(dom, index) {
|
|
|
var li = dom.eq(index),
|
|
|
sortSize = li.find('.iconfont').length;
|
|
|
var li = dom.eq(index);
|
|
|
|
|
|
dom.removeClass('active');
|
|
|
li.addClass('active');
|
...
|
...
|
@@ -277,7 +276,7 @@ myScroll.on('scroll', function() { |
|
|
});
|
|
|
}
|
|
|
}
|
|
|
}//
|
|
|
}
|
|
|
|
|
|
$("#scroller").trigger('scroll');
|
|
|
});
|
...
|
...
|
@@ -676,3 +675,65 @@ $(document).bind('touchstart',function(){ |
|
|
$('.shop-foot-wrapper').bind('touchstart',function(e){
|
|
|
stopPropagation(e);
|
|
|
});
|
|
|
|
|
|
//收藏
|
|
|
function collectClick() {
|
|
|
$('#collect').on('touchstart', function() {
|
|
|
if ($('#collect').hasClass('alreadyCollect')) {
|
|
|
cancelShop();
|
|
|
$('#collect').attr('class', 'notCollect');
|
|
|
}else{
|
|
|
collectShop();
|
|
|
$('#collect').attr('class', 'alreadyCollect');
|
|
|
}
|
|
|
});
|
|
|
};
|
|
|
collectClick();
|
|
|
|
|
|
function postCollect(info) {
|
|
|
if (searching) {
|
|
|
return;
|
|
|
}
|
|
|
searching = true;
|
|
|
console.log(info.url)
|
|
|
$.ajax({
|
|
|
method: 'post',
|
|
|
url: info.url,
|
|
|
data: info.data,
|
|
|
|
|
|
success: function(data) {
|
|
|
|
|
|
setTimeout(function () {
|
|
|
myScroll.refresh();
|
|
|
scH = $('#scroller').outerHeight();
|
|
|
}, 1000);
|
|
|
|
|
|
searching = false;
|
|
|
},
|
|
|
error: function() {
|
|
|
alert('网络断开连接了~');
|
|
|
searching = false;
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
function collectShop() {
|
|
|
var qew = {};
|
|
|
|
|
|
qew.url = '/product/index/shopFav';
|
|
|
qew.data = {
|
|
|
shop_id: '102'
|
|
|
};
|
|
|
postCollect(qew);
|
|
|
}
|
|
|
|
|
|
function cancelShop() {
|
|
|
var qew = {};
|
|
|
|
|
|
qew.url = '/product/index/cancelShopFav';
|
|
|
qew.data = {
|
|
|
shop_id: '102'
|
|
|
};
|
|
|
postCollect(qew);
|
|
|
}
|
|
|
|
...
|
...
|
|