Fix:3961 【商城小程序】这部分功能未出接口,出接口后指派给前端
This commit is contained in:
@@ -42,7 +42,7 @@
|
||||
<view class="font-color-white statusTag v12-primary" v-if="order.isTickets===1 && order._status._type === 1">
|
||||
待核销
|
||||
</view>
|
||||
<view class="font-color-white statusTag v12-primary" v-else>{{ getStatus(order) }}</view>
|
||||
<view class="font-color-white statusTag v12-primary" v-else>{{ order.isGiftCardSend ? '礼包' :getStatus(order) }}</view>
|
||||
</view>
|
||||
<view @click="goOrderDetails(order)">
|
||||
<view class="item-info acea-row row-between row-top" v-for="(cart,cartInfoIndex) in order.cartInfo"
|
||||
@@ -103,7 +103,7 @@
|
||||
<text class="money font-color-lightred v12-font-28 v12-primary-text v12-font-bold">{{ force2Decimal(order.payPrice) }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bottom flex jc-between ai-center">
|
||||
<view class="bottom flex jc-between ai-center" v-if="!order.isGiftCardSend">
|
||||
<view class="group-btn"
|
||||
v-if="(Number(order._status._type) === 2 || Number(order._status._type) === 3) &&
|
||||
order.isTickets === 0">
|
||||
@@ -156,6 +156,21 @@
|
||||
</template>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bottom" v-else>
|
||||
<view class="v12-font-24 v12-grey tips-text">
|
||||
{{ getGiftTips(order.giftCardInfo) }}
|
||||
</view>
|
||||
<view class="flex jc-between ai-center">
|
||||
<view class="bnt btn-service flex jc-center ai-center v12-font-24" @click="goRoom(order)"
|
||||
v-if="order.merName">联系商家
|
||||
</view>
|
||||
<view class="v12-align-center">
|
||||
<button v-if="order.giftCardInfo.giftCardStatus !== 2 && order.giftCardInfo.giftNum !== order.giftCardInfo.receiveNum" open-type="share" @click="shareGift(item)" class="gift-btn service v12-primary-text v12-primary-border" >送给朋友</button>
|
||||
<!-- 查看详情 -->
|
||||
<view class="bnt service v12-primary-text v12-primary-border" @click="goOrderDetails(order)">查看详情</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="v12-px-3 v12-pb-4" v-if="order._status._type == 1">
|
||||
<view class="v12-font-22 v12-secondary-dark-text order-tips" v-if="order.isFastPost !== 0">商家已接收您的订单,支付成功后预计{{ order.isFastPost === 1 ? 48 : 72 }}小时内发货</view>
|
||||
</view>
|
||||
@@ -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;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -316,6 +316,23 @@
|
||||
<text class="money font-color-red">¥{{ force2Decimal(orderInfo.payPrice) }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="gift-wrap">
|
||||
<view class="v12-justify-between v12-align-center">
|
||||
<view class="v12-font-28 v12-font-bold v12-align-center">
|
||||
<u-icon :name="webUrl + '/icon/gift-primary.png'" size="24"></u-icon>
|
||||
{{ `已领取${orderInfo.giftCardInfo.receiveNum}/${orderInfo.giftCardInfo.giftNum}份礼包` }}
|
||||
</view>
|
||||
<view class="v12-font-bold v12-primary-text v12-font-24">{{ `剩余${orderInfo.giftCardInfo.refundNum}份已退回` }}</view>
|
||||
</view>
|
||||
<view
|
||||
v-for="(receive, index) in orderInfo.giftCardInfo.receiveInfo"
|
||||
:key="index"
|
||||
class="v12-mt-3 v12-justify-between v12-align-center"
|
||||
>
|
||||
<view class="v12-font-24">{{ receive.userNickname }}</view>
|
||||
<view class="v12-font-24">{{ receive.receiveStatus ? '已领取' : '未领取' }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view style="height:100rpx;" v-if="!refundOrder && offlineStatus"></view>
|
||||
<view class="footer acea-row row-right row-middle" v-if="!refundOrder && offlineStatus">
|
||||
<template v-if="status.type == 0">
|
||||
@@ -1192,4 +1209,10 @@ export default {
|
||||
text-align: left !important;
|
||||
}
|
||||
}
|
||||
.gift-wrap{
|
||||
background: #fff;
|
||||
border-radius: 20rpx;
|
||||
margin-top: 30rpx;
|
||||
padding: 30rpx;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user