...
|
...
|
@@ -2,7 +2,7 @@ |
|
|
* @Author: Targaryen
|
|
|
* @Date: 2017-03-23 11:31:51
|
|
|
* @Last Modified by: Targaryen
|
|
|
* @Last Modified time: 2017-03-31 11:49:21
|
|
|
* @Last Modified time: 2017-03-31 17:50:46
|
|
|
*/
|
|
|
|
|
|
/** *****************
|
...
|
...
|
@@ -16,6 +16,28 @@ let $collect = $('#collect'); |
|
|
const shopId = $('#shopId').val();
|
|
|
|
|
|
/**
|
|
|
* 异步检测是否已经收藏
|
|
|
*/
|
|
|
$.ajax({
|
|
|
type: 'GET',
|
|
|
url: location.protocol + '//m.yohobuy.com/product/index/shopFav',
|
|
|
xhrFields: {
|
|
|
withCredentials: true
|
|
|
},
|
|
|
data: {
|
|
|
shopId: shopId
|
|
|
},
|
|
|
success: function(data) {
|
|
|
if (data.collect) {
|
|
|
$collect.attr('class', 'already-collect');
|
|
|
}
|
|
|
},
|
|
|
error: function() {
|
|
|
tip.show('网络断开连接了~');
|
|
|
}
|
|
|
});
|
|
|
|
|
|
/**
|
|
|
* 异步加载人气单品
|
|
|
*/
|
|
|
$.each($goodsContainer, function(index, elem) {
|
...
|
...
|
|