Fix:3315 【礼品功能】待发货订单退款详情页不要显示物流信息

This commit is contained in:
linxi
2025-02-28 16:03:30 +08:00
parent 1baf5de741
commit c3d6b25a5e
6 changed files with 70 additions and 23 deletions
+39 -15
View File
@@ -107,7 +107,7 @@
<view class="gift-submit" @click="showPayPicker = true">付款并赠送</view>
</view>
<view class="btn-wrap v12-mt-16 v12-justify-center" v-if="isPayOk">
<view class="gift-submit">再送一份</view>
<view class="gift-submit" @click="makeAgain">再送一份</view>
</view>
<view class="tip-wrap v12-justify-center">
<view class="tip-text v12-mr-1">好友未收下礼包将于24小时后自动退款</view>
@@ -119,6 +119,7 @@
:list="coverList"
:product="goodsInfo.productInfo"
@confirm="onCoverConfirm"
:index="defaultIndex"
:message="message"
/>
<passkeyborad
@@ -139,7 +140,8 @@
<script>
import passkeyborad from '@/components/yzc-paykeyboard/yzc-paykeyboard'
import { getGiftCardSendOrderConfirm, getGiftCardSendOrder, getGiftCardSendOrderAmount } from '@/api/gift'
import { getGiftCardSendOrderConfirm, getGiftCardSendOrder, getGiftCardSendOrderAmount, getGiftCardResend } from '@/api/gift'
import { weappPay } from "@/libs/wechat";
import {mapGetters} from "vuex";
import giftTips from './components/giftTips.vue'
import CoverPicker from './components/CoverPicker.vue'
@@ -176,7 +178,9 @@ export default {
payType: '',
isPayOk: false,
giftKey: '',
payPrice: 0
payPrice: 0,
orderId: '',
defaultIndex:0
}
},
onLoad(opts) {
@@ -200,8 +204,27 @@ export default {
})
},
methods: {
makeAgain() {
const params = {
orderId: this.orderId,
}
getGiftCardResend(params).then(res => {
this.isPayOk = false
this.coverList = [...res.data.giftCardTemplates, res.data.specialGiftCardTemplate]
this.cartId = res.data.cartInfo[0].id
this.giftNotice = res.data.giftCardGiftNotice
this.orderKey = res.data.orderKey
this.goodsInfo = res.data.cartInfo[0]
this.templateId = res.data.specialGiftCardTemplate.id
this.defaultIndex = this.coverList.findIndex(item => item.id === this.templateId)
console.log(this.defaultIndex, 'defaultIndex');
this.selectedCover = res.data.specialGiftCardTemplate.cover
this.giftImage = res.data.specialGiftCardTemplate.image
this.couponId = ''
this.computedPrice(this.goodsInfo.cartNum)
})
},
messageChange(e) {
console.log(e);
this.message = e.substring(0, 30)
},
numberChange(e) {
@@ -247,6 +270,8 @@ export default {
this.templateId = res.data.specialGiftCardTemplate.id
this.selectedCover = res.data.specialGiftCardTemplate.cover
this.giftImage = res.data.specialGiftCardTemplate.image
this.defaultIndex = this.coverList.findIndex(item => item.id === this.templateId)
console.log(this.defaultIndex, 'defaultIndex');
if(!this.couponId) {
this.couponId = res.data.couponList.usable[0] && res.data.couponList.usable[0].id || ''
}
@@ -329,6 +354,7 @@ export default {
});
this.isPayOk = true;
this.giftKey = data.giftCard.code;
this.orderId = data.result.orderId || ''
break;
case "WECHAT_H5_PAY":
// H5支付
@@ -341,12 +367,13 @@ export default {
// 小程序支付
weappPay(data.result.jsConfig).finally(() => {
uni.showToast({
title: res.msg,
icon: "none",
duration: 2000
});
this.isPayOk = true;
this.giftKey = data.giftCard.code;
title: res.msg,
icon: "none",
duration: 2000
});
this.isPayOk = true;
this.giftKey = data.giftCard.code;
this.orderId = data.result.orderId || ''
});
break;
@@ -358,13 +385,10 @@ export default {
break;
}
}) .catch(err => {
console.log(err);
uni.hideLoading();
uni.showToast({
title:
err.msg ||
err.response.data.msg ||
err.response.data.message ||
"创建订单失败",
title:"创建订单失败",
icon: "none",
duration: 2000
});