Authored by 郭成尧

shopFav-status

... ... @@ -81,3 +81,25 @@ $collectShopIcon.on('click', () => {
collectOrNotShop('ok');
}
});
// 获取是否收藏
(function() {
$.ajax({
type: 'GET',
url: location.protocol + '//m.yohobuy.com/product/index/shopFav',
xhrFields: {
withCredentials: true
},
data: {
shopId: shopId,
},
success: function(data) {
if (data.collect) {
$collectShopIcon.addClass('coled');
}
},
error: function() {
tip.show('网络断开连接了~');
}
});
}());
... ...