diff --git a/mobile-web/src/api/product.js b/mobile-web/src/api/product.js index d6f4946ef..4d628fdae 100644 --- a/mobile-web/src/api/product.js +++ b/mobile-web/src/api/product.js @@ -31,3 +31,10 @@ export function getProductSpuInfo(id) { } }); } + +export function collectionSpu(spuId,hasCollectionType) { + return request({ + url: '/product-api/users/spu/collection/'+spuId+'/' + hasCollectionType, + method: 'post' + }); +} diff --git a/mobile-web/src/api/user.js b/mobile-web/src/api/user.js index bc4432cc2..ae6d70b8c 100644 --- a/mobile-web/src/api/user.js +++ b/mobile-web/src/api/user.js @@ -16,6 +16,15 @@ export function DelFavorite(id){ }) } +export function hasUserSpuFavorite(spuId){ + return request({ + url: '/user-api/users/favorite/hasUserFavorite', + method: 'get', + params: {spuId} + }) +} + + export function GetCoupon(data){ return request({ url: '/User/GetCoupon', diff --git a/mobile-web/src/page/product/detail.vue b/mobile-web/src/page/product/detail.vue index bba9e64e7..f2184ee14 100644 --- a/mobile-web/src/page/product/detail.vue +++ b/mobile-web/src/page/product/detail.vue @@ -98,7 +98,7 @@ - + 收藏 @@ -171,8 +171,9 @@