feat: 订单退款功能对接

This commit is contained in:
duanshuwen
2025-09-29 21:59:07 +08:00
parent 2580e7a266
commit 9cc7b48d36
5 changed files with 212 additions and 299 deletions

View File

@@ -39,12 +39,7 @@
<script setup>
import { defineProps, computed, ref, defineEmits } from "vue";
import {
preOrder,
orderPayNow,
orderCancel,
orderRefund,
} from "@/request/api/OrderApi";
import { orderPayNow } from "@/request/api/OrderApi";
// 支付方式映射常量
const PAY_WAY_MAP = {
@@ -57,7 +52,7 @@ const PAY_WAY_MAP = {
const isLoading = ref(false);
// 定义事件发射器
const emit = defineEmits(['show-refund-popup']);
const emit = defineEmits(["show-refund-popup"]);
const props = defineProps({
orderData: {
@@ -116,7 +111,7 @@ const handleButtonClick = async () => {
if (status === "2") {
// 情况2待使用状态显示退款弹窗
emit('show-refund-popup');
emit("show-refund-popup");
return; // 直接返回,不执行后续代码
}