From d1bbea6e9b88dc9b19f8454acf2f760dfbbfd471 Mon Sep 17 00:00:00 2001 From: LinCyJang Date: Fri, 24 Oct 2025 01:31:50 +0800 Subject: [PATCH] =?UTF-8?q?REFACTOR=EF=BC=9A=E7=A4=BC=E5=93=81=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E9=87=8D=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/gift.js | 22 + .../DateRangePicker/DateRangePicker.vue | 569 ++++++++++++++++++ pages/order/MyOrder/index.vue | 5 +- pkg_product/views/sojoumOrderDetails.vue | 13 +- .../views/gift/components/GiftAddressForm.vue | 213 +++++++ pkg_user/views/gift/components/GiftCard.vue | 154 +++-- pkg_user/views/gift/receive.vue | 35 +- pkg_user/views/giftList.vue | 33 +- 8 files changed, 986 insertions(+), 58 deletions(-) create mode 100644 components/DateRangePicker/DateRangePicker.vue create mode 100644 pkg_user/views/gift/components/GiftAddressForm.vue diff --git a/api/gift.js b/api/gift.js index 3bfe0c0..436bdbb 100644 --- a/api/gift.js +++ b/api/gift.js @@ -79,3 +79,25 @@ export function createGroupBuyGift(data) { export function createSojoumGroupBuyGift(key, data) { return request.post("/travel/giftCardOrder/create/" + key, data); } + +/** + * 旅居团购礼品卡订单详情 + * @param {*} params + * @returns + */ +export function fetchSojoumGroupBuyGiftDetail(params) { + return request.get("/travel/giftCard/info",params, { + login: true + }) +} + +/** + * 领取旅居团购礼品卡 + * @param {*} params + * @returns + */ +export function receiveSojoumGroupBuyGift(params) { + return request.post("/travel/giftCard/receive", params, { + login: true + }) +} diff --git a/components/DateRangePicker/DateRangePicker.vue b/components/DateRangePicker/DateRangePicker.vue new file mode 100644 index 0000000..da9e23c --- /dev/null +++ b/components/DateRangePicker/DateRangePicker.vue @@ -0,0 +1,569 @@ + + + + + \ No newline at end of file diff --git a/pages/order/MyOrder/index.vue b/pages/order/MyOrder/index.vue index 05b7542..06b14a2 100644 --- a/pages/order/MyOrder/index.vue +++ b/pages/order/MyOrder/index.vue @@ -631,7 +631,8 @@ export default { this.$yrouter.push({ path: "/pkg_product/views/sojoumOrderDetails", query: { - id: order.orderId + id: order.orderId, + isView: 1 } }); } @@ -763,7 +764,7 @@ export default { status = "待付款" break; case 1: - status = order.isTravelGroup === 1 ? "待使用" : "待待发货付款" + status = order.isTravelGroup === 1 ? "待使用" : "待发货" break; case 2: status = order.isTravelGroup === 1 ? "待使用" : "待收货" diff --git a/pkg_product/views/sojoumOrderDetails.vue b/pkg_product/views/sojoumOrderDetails.vue index b2ada95..8e9a9d2 100644 --- a/pkg_product/views/sojoumOrderDetails.vue +++ b/pkg_product/views/sojoumOrderDetails.vue @@ -69,7 +69,7 @@ - + 联系人信息 @@ -135,7 +135,7 @@ - + @@ -170,11 +170,13 @@ export default { _status: {}, merchantPhone: '' // 添加商家电话字段 }, - showPhonePopup: false // 控制电话弹窗显示 + showPhonePopup: false, // 控制电话弹窗显示 + isView: 0 } }, onLoad(otps) { this.key = otps.id; + this.isView = otps.isView || 0; this.getSojoumOrderDetail(); }, methods: { @@ -324,7 +326,7 @@ export default { }, // 显示电话弹窗 showPhoneDialog(type) { - if (!this.orderInfo.merPhone) { + if (!this.orderInfo.merPhone && type === 'phone') { uni.showToast({ title: '暂无商家电话', icon: 'none' @@ -337,6 +339,9 @@ export default { } else if (type === 'wechat') { this.title = '商家微信'; this.popContent = this.orderInfo.merWechat; + } else if (type === 'company') { + this.title = '平台电话'; + this.popContent = this.orderInfo.companyTel; } this.showPhonePopup = true; }, diff --git a/pkg_user/views/gift/components/GiftAddressForm.vue b/pkg_user/views/gift/components/GiftAddressForm.vue new file mode 100644 index 0000000..56d430f --- /dev/null +++ b/pkg_user/views/gift/components/GiftAddressForm.vue @@ -0,0 +1,213 @@ + + + + +]]> \ No newline at end of file diff --git a/pkg_user/views/gift/components/GiftCard.vue b/pkg_user/views/gift/components/GiftCard.vue index eb1fd4e..1ce4aaa 100644 --- a/pkg_user/views/gift/components/GiftCard.vue +++ b/pkg_user/views/gift/components/GiftCard.vue @@ -6,7 +6,10 @@ top: card.productImageY*2 + 'rpx', left: card.productImageX*2 + 'rpx' }"> - + + + + @@ -18,36 +21,49 @@ - - - 您收到一份来自朋友的神秘礼物 - - - - - - - - 您已领取礼包 + + + + 您收到一份来自朋友的神秘礼物 - 查看礼包详情>> - - - - 您已领取礼包,去看看>> + + + - 我也要送礼 + + + 您已领取礼包 + + 查看礼包详情>> + + + + 您已领取礼包,去看看>> + + 我也要送礼 + + + + 礼包已被领取 + + 去商城看看>> + - - - 礼包已被领取 + + + + - 去商城看看>> @@ -56,26 +72,35 @@ - - +