Fix:3347 【商城小程序】送礼方买礼品后,现在没送出去就无法退款,要增加一个退款功能,以及24小时后自动退款

This commit is contained in:
modendeveloper
2025-04-01 11:27:01 +08:00
parent 4dcfa23a10
commit da929cfe3b
+39 -2
View File
@@ -55,6 +55,7 @@
赠言{{ item.message || '' }}
</view>
<!-- 状态 0-待领取 1-已全部领取 2-已失效 -->
<button v-if="item.status === 0" @click="tuikuan(item)" class="btn1">退款</button>
<button
v-if="item.status === -1"
class="btn"
@@ -193,7 +194,8 @@ import Payment from "@/components/Payment";
import {
giftCardReceiveList,
giftCardSendList,
giftNotice
giftNotice,
refund
} from '@/api/giftList'
import {mapGetters} from "vuex";
import giftTips from '@/pkg_user/views/gift/components/giftTips.vue'
@@ -245,6 +247,29 @@ export default {
}
},
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) {
this.payPassword = payPwd;
@@ -500,7 +525,7 @@ export default {
height: 46rpx;
padding: 0 12rpx;
margin: 0 0 0 24rpx;
border-radius: 8rpx;
border-radius: 100rpx;
color: #fff;
line-height: 46rpx;
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>