fix: 待支付|再次预定交互逻辑调整

This commit is contained in:
duanshuwen
2025-10-07 16:31:35 +08:00
parent 3646870695
commit 500c44ebea
5 changed files with 117 additions and 74 deletions

View File

@@ -23,7 +23,11 @@
<GoodsInfo :orderData="orderData" />
<UserInfo :orderData="orderData" />
<NoticeInfo :orderData="orderData" />
<OrderInfo :orderData="orderData" @show-refund-popup="showRefundPopup" />
<OrderInfo
:orderData="orderData"
@show-refund-popup="showRefundPopup"
@pay-success="handlePaySuccess"
/>
<!-- 退款状态显示 -->
<RefundPopup
@@ -51,12 +55,14 @@ import RefundPopup from "./components/RefundPopup/index.vue";
const refundVisible = ref(false);
const orderData = ref({});
onLoad(async ({ orderId }) => {
const res = await userOrderDetail({ orderId });
onLoad(({ orderId }) => getOrderDetail(orderId));
// 获取订单详情
const getOrderDetail = async (orderId) => {
const res = await userOrderDetail({ orderId });
orderData.value = res.data;
console.log(res);
});
};
// 监听页面滚动事件
const backgroundColor = ref("transparent");
@@ -105,6 +111,11 @@ const handleRefundConfirm = async ({ orderId }) => {
});
}
};
// 再次预定
const handlePaySuccess = ({ orderId }) => {
getOrderDetail(orderId);
};
</script>
<style lang="scss" scoped>