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 @@