Fix:3347 【商城小程序】送礼方买礼品后,现在没送出去就无法退款,要增加一个退款功能,以及24小时后自动退款
This commit is contained in:
@@ -55,6 +55,7 @@
|
|||||||
赠言:{{ item.message || '' }}
|
赠言:{{ item.message || '' }}
|
||||||
</view>
|
</view>
|
||||||
<!-- 状态 0-待领取 1-已全部领取 2-已失效 -->
|
<!-- 状态 0-待领取 1-已全部领取 2-已失效 -->
|
||||||
|
<button v-if="item.status === 0" @click="tuikuan(item)" class="btn1">退款</button>
|
||||||
<button
|
<button
|
||||||
v-if="item.status === -1"
|
v-if="item.status === -1"
|
||||||
class="btn"
|
class="btn"
|
||||||
@@ -193,7 +194,8 @@ import Payment from "@/components/Payment";
|
|||||||
import {
|
import {
|
||||||
giftCardReceiveList,
|
giftCardReceiveList,
|
||||||
giftCardSendList,
|
giftCardSendList,
|
||||||
giftNotice
|
giftNotice,
|
||||||
|
refund
|
||||||
} from '@/api/giftList'
|
} from '@/api/giftList'
|
||||||
import {mapGetters} from "vuex";
|
import {mapGetters} from "vuex";
|
||||||
import giftTips from '@/pkg_user/views/gift/components/giftTips.vue'
|
import giftTips from '@/pkg_user/views/gift/components/giftTips.vue'
|
||||||
@@ -245,6 +247,29 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
tuikuan(item) {
|
||||||
|
uni.showModal({
|
||||||
|
title: '提示',
|
||||||
|
content: '是否确定退款?',
|
||||||
|
success: (res) => {
|
||||||
|
if (res.confirm) {
|
||||||
|
uni.showLoading({
|
||||||
|
title: '退款中...',
|
||||||
|
mask: true
|
||||||
|
})
|
||||||
|
refund({
|
||||||
|
id: item.id
|
||||||
|
}).then(qRes => {
|
||||||
|
if (qRes.success) {
|
||||||
|
this.getGiftCardSendList()
|
||||||
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
uni.hideLoading()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
pwdPopFinish(payPwd) {
|
pwdPopFinish(payPwd) {
|
||||||
this.payPassword = payPwd;
|
this.payPassword = payPwd;
|
||||||
|
|
||||||
@@ -500,7 +525,7 @@ export default {
|
|||||||
height: 46rpx;
|
height: 46rpx;
|
||||||
padding: 0 12rpx;
|
padding: 0 12rpx;
|
||||||
margin: 0 0 0 24rpx;
|
margin: 0 0 0 24rpx;
|
||||||
border-radius: 8rpx;
|
border-radius: 100rpx;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
line-height: 46rpx;
|
line-height: 46rpx;
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
@@ -550,4 +575,16 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.btn1{
|
||||||
|
background-color: #fff;
|
||||||
|
color: #333;
|
||||||
|
border-radius: 100rpx;
|
||||||
|
border: 1px solid #333;
|
||||||
|
font-weight: bold;
|
||||||
|
height: 46rpx;
|
||||||
|
padding: 0 12rpx;
|
||||||
|
margin: 0 0 0 24rpx;
|
||||||
|
line-height: 40rpx;
|
||||||
|
font-size: 26rpx;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
Reference in New Issue
Block a user