From f0a4a0edf934473bcc4caa09253df73c13f2cf9d Mon Sep 17 00:00:00 2001 From: linxi Date: Fri, 21 Feb 2025 18:25:34 +0800 Subject: [PATCH] =?UTF-8?q?Task=EF=BC=9A=E6=94=B6=E7=A4=BC=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/gift.js | 24 ++ pages/shop/GoodsCon/index.vue | 2 +- .../views/gift/components/AddressDialog.vue | 287 ++++++++++++++++++ pkg_user/views/gift/components/GiftCard.vue | 103 ++++++- pkg_user/views/gift/gift.vue | 32 +- pkg_user/views/gift/receive.vue | 20 +- 6 files changed, 441 insertions(+), 27 deletions(-) create mode 100644 pkg_user/views/gift/components/AddressDialog.vue diff --git a/api/gift.js b/api/gift.js index ea1e798..2c14841 100644 --- a/api/gift.js +++ b/api/gift.js @@ -16,3 +16,27 @@ export function getGiftCardSendOrder(key, data) { return request.post("/giftCard/create/" + key, data); } + +/** + * 礼品详情 + * @param {*} data + */ +export function getGiftCardDetail(data) { + return request.get("/giftCard/info", data); +} + +/** + * 领取礼品卡 + * @param {*} data + */ +export function getGiftCardReceive(data) { + return request.post("/giftCard/receive", data); +} + +/** + * 礼品卡赠礼须知 + * @param {*} data + */ +export function getGiftCardSendNotice(data) { + return request.get("/giftCard/giftNotice", data); +} \ No newline at end of file diff --git a/pages/shop/GoodsCon/index.vue b/pages/shop/GoodsCon/index.vue index 37755f2..a1b0e69 100644 --- a/pages/shop/GoodsCon/index.vue +++ b/pages/shop/GoodsCon/index.vue @@ -1424,7 +1424,7 @@ export default { } if(news === 2) { uni.navigateTo({ - url: '/pkg_user/views/gift/gift?cartId=' + res.data.cartId + '&couponId=' + that.couponId + url: '/pkg_user/views/gift/gift?cartId=' + res.data.cartId + '&couponId=' + (that.couponId ? that.couponId : '') }) } if(news === 0) { diff --git a/pkg_user/views/gift/components/AddressDialog.vue b/pkg_user/views/gift/components/AddressDialog.vue new file mode 100644 index 0000000..4ba4b26 --- /dev/null +++ b/pkg_user/views/gift/components/AddressDialog.vue @@ -0,0 +1,287 @@ + + + + + diff --git a/pkg_user/views/gift/components/GiftCard.vue b/pkg_user/views/gift/components/GiftCard.vue index 8b4558e..fbc235d 100644 --- a/pkg_user/views/gift/components/GiftCard.vue +++ b/pkg_user/views/gift/components/GiftCard.vue @@ -1,35 +1,127 @@