...
|
...
|
@@ -10,7 +10,10 @@ var searching, |
|
|
shopId,
|
|
|
stoping,
|
|
|
navSwiper,
|
|
|
navType;
|
|
|
bannerSwiper,
|
|
|
navType,
|
|
|
appVersion = $('input[name="app_version"]').val(),
|
|
|
uid = $('input[name="uid"]').val();
|
|
|
|
|
|
var shopNav = require('shopCollect/shop-nav.hbs'),
|
|
|
shopList = require('shopCollect/shop-list.hbs');
|
...
|
...
|
@@ -31,7 +34,8 @@ function shopListData(tabName, stoping) { |
|
|
method: 'get',
|
|
|
url: '/activity/shopList',
|
|
|
data: {
|
|
|
tabName: tabName
|
|
|
tabName: tabName,
|
|
|
uid: window.queryString.uid
|
|
|
},
|
|
|
success: function(data) {
|
|
|
|
...
|
...
|
@@ -68,6 +72,8 @@ function shopListData(tabName, stoping) { |
|
|
id: shopId,
|
|
|
opt: opt,
|
|
|
type: 'shop',
|
|
|
uid: uid,
|
|
|
appVersion: appVersion
|
|
|
},
|
|
|
xhrFields: {
|
|
|
withCredentials: true
|
...
|
...
|
@@ -75,25 +81,25 @@ function shopListData(tabName, stoping) { |
|
|
success: function(list) {
|
|
|
var url;
|
|
|
|
|
|
if (list.code === 200) {
|
|
|
if ($this.hasClass('already-collect')) {
|
|
|
$this.removeClass('already-collect');
|
|
|
tip.show('店铺取消收藏成功');
|
|
|
} else {
|
|
|
$this.addClass('already-collect');
|
|
|
tip.show('店铺收藏成功');
|
|
|
}
|
|
|
if (list.code === 200) {
|
|
|
if ($this.hasClass('already-collect')) {
|
|
|
$this.removeClass('already-collect');
|
|
|
tip.show('店铺取消收藏成功');
|
|
|
} else {
|
|
|
$this.addClass('already-collect');
|
|
|
tip.show('店铺收藏成功');
|
|
|
}
|
|
|
}
|
|
|
|
|
|
if (list.code === 400) {
|
|
|
if (list.code === 400) {
|
|
|
|
|
|
url = list.data;
|
|
|
if ($('#jump-login').length <= 0) {
|
|
|
$('body').append('<a href=\'' + url + '\'><span id="jump-login"><span></a>');
|
|
|
}
|
|
|
$('#jump-login').click();
|
|
|
url = list.data;
|
|
|
if ($('#jump-login').length <= 0) {
|
|
|
$('body').append('<a href=\'' + url + '\'><span id="jump-login"><span></a>');
|
|
|
}
|
|
|
searching = false;
|
|
|
$('#jump-login').click();
|
|
|
}
|
|
|
searching = false;
|
|
|
},
|
|
|
error: function() {
|
|
|
tip.show('网络断开连接了~');
|
...
|
...
|
|