Authored by htoooth

add fix

... ... @@ -102,7 +102,7 @@ router.get('/shop/couponsync', list.shopCouponSync);
router.get('/brand/couponsync', list.brandCouponSync);
router.get('/shoplist', list.shopList); // 店铺列表页
router.post('/shop/togglecollect', auth, favorite.collectShop); // 店铺收藏
router.post('/shop/togglecollect', favorite.collectShop); // 店铺收藏
router.post('/index/isFavoriteShop', favorite.isFavShop); // 判断用户是否收藏店铺
// 品牌页水牌
... ...
... ... @@ -880,7 +880,7 @@ $('#brand-favour').click(function() {
default:
return $.Deferred.reject().promise();
}
}).then(function() {
}()).then(function() {
$this.toggleClass('coled');
});
});
... ...
var $ = require('yoho-jquery');
module.exports.getFavNum = function(sid, bid) {
exports.getFavNum = function(sid, bid) {
return $.getJSON('/product/index/favnum', {sid: sid, bid: bid})
.then(function(result) {
if (result.code === 200) {
... ... @@ -11,9 +11,9 @@ module.exports.getFavNum = function(sid, bid) {
});
};
module.exports.addFav = function(sid, bid) {
exports.addFav = function(sid, bid) {
if (!getUid()) {
return window.jumpUrl(window.signinUrl());
return $.Deferred().reject(window.jumpUrl(window.signinUrl())).promise();
}
if (sid) {
... ... @@ -47,9 +47,9 @@ module.exports.addFav = function(sid, bid) {
}
};
module.exports.cancelFav = function(sid, bid) {
exports.cancelFav = function(sid, bid) {
if (!getUid()) {
return window.jumpUrl(window.signinUrl());
return $.Deferred().reject(window.jumpUrl(window.signinUrl())).promise();
}
if (sid) {
... ... @@ -84,7 +84,7 @@ module.exports.cancelFav = function(sid, bid) {
}
};
module.exports.statusFav = function(sid, bid) {
exports.statusFav = function(sid, bid) {
if (sid) {
return $.post('/product/index/isFavoriteShop', {
shopId: sid
... ...
... ... @@ -48,7 +48,7 @@ function addAsync(skn, sku) {
}
}
module.exports = {
exports = {
statusAsync: statusAsync,
addAsync: addAsync
};
... ...
... ... @@ -108,7 +108,7 @@ module.exports = function(opts) {
if ($.isArray(arr) && arr.length) {
arr.forEach((val) => {
arr.forEach(function(val) {
if (val === '.') {
ret += '<a>...</a>';
} else {
... ...