From 5e4a9f8cc27186b8c13fbd2469941de07602bf75 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 19 Aug 2023 17:00:08 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=B8=AA=E4=BA=BA=E4=B8=AD=E5=BF=83?= =?UTF-8?q?=E3=80=91=201=E3=80=81=E5=AE=8C=E6=88=90=E4=B8=AA=E4=BA=BA?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E7=9A=84=E6=8E=A5=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/member/user.js | 6 +++ api/product/favorite.js | 5 +++ api/promotion/coupon.js | 5 +++ api/user.js | 8 ++-- pages/user/index.vue | 84 ++++++++++++++++++++++------------------- store/modules/app.js | 16 ++++---- 6 files changed, 72 insertions(+), 52 deletions(-) create mode 100644 api/member/user.js diff --git a/api/member/user.js b/api/member/user.js new file mode 100644 index 00000000..f8480b18 --- /dev/null +++ b/api/member/user.js @@ -0,0 +1,6 @@ +import request from "@/utils/request.js"; + +// 获得用户收件地址 +export function getUserInfo() { + return request.get('app-api/member/user/get'); +} diff --git a/api/product/favorite.js b/api/product/favorite.js index b1f669e6..7c552305 100644 --- a/api/product/favorite.js +++ b/api/product/favorite.js @@ -7,6 +7,11 @@ export function isFavoriteExists(spuId) { }); } +// 获得商品收藏数量 +export function getFavoriteCount() { + return request.get('app-api/product/favorite/get-count'); +} + // 添加商品收藏 export function createFavorite(spuId) { return request.post('app-api/product/favorite/create', { diff --git a/api/promotion/coupon.js b/api/promotion/coupon.js index a9e0e475..efc0bd59 100644 --- a/api/promotion/coupon.js +++ b/api/promotion/coupon.js @@ -27,3 +27,8 @@ export function getCouponTemplateList(spuId, useType) { export function getCouponTemplatePage(data) { return request.get("app-api/promotion/coupon-template/page", data); } + +// 获得未使用的优惠劵数量 +export function getUnusedCouponCount() { + return request.get("app-api/promotion/coupon/get-unused-count"); +} diff --git a/api/user.js b/api/user.js index 53854438..da81fc15 100644 --- a/api/user.js +++ b/api/user.js @@ -1,17 +1,15 @@ import request from "@/utils/request.js"; -import Cache from "@/utils/cache.js" + /** * 获取用户信息 - * -*/ + */ export function getUserInfo(){ return request.get('user'); } /** * 设置用户分享 - * -*/ + */ export function userShare(){ return request.post('user/share'); } diff --git a/pages/user/index.vue b/pages/user/index.vue index 6b31fc47..d95d91da 100644 --- a/pages/user/index.vue +++ b/pages/user/index.vue @@ -6,46 +6,46 @@