...
|
...
|
@@ -97,7 +97,7 @@ function shopListData(tabName, stoping) { |
|
|
$('.collect-btn').on('click', function(e) {
|
|
|
var opt,
|
|
|
$this = $(this),
|
|
|
fansCount = parseInt($this.parent().find('.fans-count').html());
|
|
|
fansCount = $this.parent().find('.fans-count').html();
|
|
|
|
|
|
shopId = $this.parents('.shop-info').data('id');
|
|
|
|
...
|
...
|
@@ -132,11 +132,15 @@ function shopListData(tabName, stoping) { |
|
|
if ($this.hasClass('already-collect')) {
|
|
|
$this.removeClass('already-collect');
|
|
|
tip.show('店铺取消收藏成功');
|
|
|
$this.parent().find('.fans-count').html(fansCount - 1);
|
|
|
if (fansCount.indexOf('w') === -1) {
|
|
|
$this.parent().find('.fans-count').html(parseInt(fansCount) - 1);
|
|
|
}
|
|
|
} else {
|
|
|
$this.addClass('already-collect');
|
|
|
tip.show('店铺收藏成功');
|
|
|
$this.parent().find('.fans-count').html(fansCount + 1);
|
|
|
if (fansCount.indexOf('w') === -1) {
|
|
|
$this.parent().find('.fans-count').html(parseInt(fansCount) + 1);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
...
|
...
|
@@ -206,8 +210,6 @@ function shopNavData() { |
|
|
shopListData($('.shop-nav').find('li').eq(0).data('type'));
|
|
|
}
|
|
|
|
|
|
console.log($('.shop-nav').length);
|
|
|
|
|
|
// 导航点击事件
|
|
|
$('.shop-nav').find('li').on('click', function() {
|
|
|
var $this = $(this),
|
...
|
...
|
@@ -226,7 +228,6 @@ function shopNavData() { |
|
|
|
|
|
},
|
|
|
error: function() {
|
|
|
console.log('123');
|
|
|
|
|
|
// tip.show('网络断开连接了~');
|
|
|
$('.shop-nav').hide();
|
...
|
...
|
|