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..52dfacbbc 100644 --- a/mobile-web/src/api/user.js +++ b/mobile-web/src/api/user.js @@ -1,21 +1,30 @@ import request from "../config/request"; -export function GetFavorite(data){ +export function GetFavoritePage(pageNo,pageSize){ return request({ - url: '/User/GetFavorite', - method: 'post', - params: { data } + url: '/user-api/users/favorite/page', + method: 'get', + params: { pageNo,pageSize } }) } -export function DelFavorite(id){ +export function DelFavorite(spuId){ return request({ - url: '/User/DelFavorite', - method: 'get', - params: { id:id } + url: '/user-api/users/favorite/remove', + method: 'DELETE', + params: { spuId } }) } +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 @@