From 83d8bc4fabaf28a5f601e9d5db0b09fd93f11ebd Mon Sep 17 00:00:00 2001 From: xiaofeng Date: Tue, 9 Jul 2019 23:54:36 +0800 Subject: [PATCH 1/2] =?UTF-8?q?1.=E5=89=8D=E7=AB=AF=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E6=8E=A5=E5=85=A5=E5=95=86=E5=93=81=E6=94=B6=E8=97=8F=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=EF=BC=8C=202.=E6=9A=82=E6=97=B6=E4=BD=BF=E7=94=A8aler?= =?UTF-8?q?t=E5=BC=B9=E5=87=BA=E6=A1=86=E6=8F=90=E7=A4=BA=E6=94=B6?= =?UTF-8?q?=E8=97=8F=E5=92=8C=E5=8F=96=E6=B6=88=E6=94=B6=E8=97=8F,?= =?UTF-8?q?=E5=9B=9E=E5=A4=B4=E6=94=B9=E6=88=90=E9=A2=9C=E8=89=B2=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mobile-web/src/api/product.js | 7 ++++ mobile-web/src/api/user.js | 9 +++++ mobile-web/src/page/product/detail.vue | 35 +++++++++++++++++-- .../users/UserFavoriteController.java | 10 +++++- .../api/UserProductSpuCollectionsService.java | 10 ++++++ .../UserProductSpuCollectionsServiceImpl.java | 19 ++++++++-- 6 files changed, 85 insertions(+), 5 deletions(-) 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 @@