diff --git a/pages/order/MyOrder/index.vue b/pages/order/MyOrder/index.vue index ffdf697..9ceb6a4 100644 --- a/pages/order/MyOrder/index.vue +++ b/pages/order/MyOrder/index.vue @@ -42,7 +42,7 @@ 待核销 - {{ getStatus(order) }} + {{ order.isGiftCardSend ? '礼包' :getStatus(order) }} {{ force2Decimal(order.payPrice) }} - + @@ -156,6 +156,21 @@ + + + {{ getGiftTips(order.giftCardInfo) }} + + + 联系商家 + + + + + 查看详情 + + + 商家已接收您的订单,支付成功后预计{{ order.isFastPost === 1 ? 48 : 72 }}小时内发货 @@ -202,6 +217,7 @@ export default { mixins: [pageListenMixins], data() { return { + giftItem: {}, isShowPayPwdPop: false, inputStyle: { height: '64rpx', @@ -302,7 +318,39 @@ export default { this.type = this.type || parseInt(this.$yroute.query.type) || 0; this.changeType(this.type); }, + onShareAppMessage() { + uni.updateShareMenu({ + isPrivateMessage: true, + withShareTicket: true + }) + return { + title: this.giftItem.message || '礼笺轻启,礼藏心意', + path: `/pkg_user/views/gift/receive?code=${this.giftItem.code}`, + imageUrl: this.giftItem.templateInfo.image + } + }, methods: { + shareGift(item) { + this.giftItem = item + }, + getGiftTips(giftCardInfo) { + // giftCardStatus int 礼品卡状态 0-未领取 1-已领取 2-已失效 + // (1)礼品全部领取:礼品已全部被好友领取,不支持取消哦! + // (2)礼品部分领取:礼品已领取X/X份,不支持取消哦! + // (3)礼品还未被领取过:下单成功,记得分享给朋友领取哦 + // giftNum int 礼品数量 + // receiveNum int 已被领取数量 + if (!giftCardInfo) { + return '' + } + if (giftCardInfo.giftCardStatus === 0) { + return '下单成功,记得分享给朋友领取哦' + } else if (giftCardInfo.giftCardStatus === 1) { + return giftCardInfo.giftNum === giftCardInfo.receiveNum ? '礼品已全部被好友领取,不支持取消哦!' : '礼品已领取' + giftCardInfo.receiveNum + '/' + giftCardInfo.giftNum + '份,不支持取消哦!' + } else if (giftCardInfo.giftCardStatus === 2) { + return '礼品已领取' + giftCardInfo.receiveNum + '/' + giftCardInfo.giftNum + '份,不支持取消哦!' + } + }, handleBody() { this.orderList.forEach((e) => { e.showMore = false @@ -416,7 +464,8 @@ export default { this.$yrouter.push({ path: "/pages/order/OrderDetails/index", query: { - id: order.orderId + id: order.orderId, + isGift: order.isGiftCardSend ? 1 : '', } }); }, @@ -711,7 +760,8 @@ page { .bottom { border-top: 0rpx solid #eee; - + height: auto !important; + padding: 30rpx !important; .bnt { display: flex; justify-content: center; @@ -800,4 +850,30 @@ page { .my-order .list .item .item-info .text .name { width: calc(100% - 160rpx); } +.tips-text{ + padding: 0 12rpx; + height: 60rpx; + background: rgba(248,246,246,0.39); + color: #C52733; + line-height: 60rpx; + margin-bottom: 30rpx; +} +.gift-btn{ + display: flex; + align-items: center; + text-align: center; + height: 52rpx; + padding: 0 12rpx; + border-radius: 100rpx; + border: 1px solid #C52733 !important; + line-height: 60rpx; + font-size: 26rpx; + color: #C52733; + background: #fff; + padding: 1px 3px; + width: 142rpx; + width: 142rpx; + justify-content: center; + margin-right: 20rpx; +} diff --git a/pages/order/OrderDetails/index.vue b/pages/order/OrderDetails/index.vue index 90a3b87..607ad90 100644 --- a/pages/order/OrderDetails/index.vue +++ b/pages/order/OrderDetails/index.vue @@ -316,6 +316,23 @@ ¥{{ force2Decimal(orderInfo.payPrice) }} + + + + + {{ `已领取${orderInfo.giftCardInfo.receiveNum}/${orderInfo.giftCardInfo.giftNum}份礼包` }} + + {{ `剩余${orderInfo.giftCardInfo.refundNum}份已退回` }} + + + {{ receive.userNickname }} + {{ receive.receiveStatus ? '已领取' : '未领取' }} + +