diff --git a/src/api/merchant.js b/src/api/merchant.js index f389329..aab230c 100644 --- a/src/api/merchant.js +++ b/src/api/merchant.js @@ -102,7 +102,7 @@ const merchant = { return Promise.resolve({ data: [ { - id: null, + id: 0, name: '不选择' }, { diff --git a/src/components/Pay/Alipay.vue b/src/components/Pay/Alipay.vue index 443e536..42f9ed6 100644 --- a/src/components/Pay/Alipay.vue +++ b/src/components/Pay/Alipay.vue @@ -4,6 +4,7 @@ import {Message} from "@arco-design/web-vue"; import Api from "../../api/index.ts"; import {QrcodeCanvas} from "qrcode.vue"; +const emits = defineEmits(['success']); const {money} = defineProps({ money: { type: Number, @@ -54,7 +55,10 @@ const initQR = async () => { watch( () => visible.value, (val) => { - if (!val) clearInterval(timer); + if (!val) { + clearInterval(timer); + emits('success'); + } }, {deep: true} ) diff --git a/src/components/Pay/GoPay.vue b/src/components/Pay/GoPay.vue index 26d5b1d..1a8da69 100644 --- a/src/components/Pay/GoPay.vue +++ b/src/components/Pay/GoPay.vue @@ -2,6 +2,7 @@ import {ref} from "vue"; import Alipay from "./Alipay.vue"; +const emits = defineEmits(['success']); const visible = ref(false); const money = ref(null); @@ -32,7 +33,7 @@ const money = ref(null);