This commit is contained in:
2025-04-30 10:02:22 +08:00
parent ff17e84aed
commit d7fe2a62a9
10 changed files with 6942 additions and 58 deletions

View File

@@ -1,11 +1,35 @@
<script setup>
import {ref} from "vue";
import {reactive, ref} from "vue";
import {Message} from "@arco-design/web-vue";
import Api from "../../../api/index.js";
const {money} = defineProps({
money: {
type: Number,
default: null
}
});
const visible = ref(false);
const qrInfo = reactive({});
const open = () => {
if (!money) {
Message.warning('充值金额需大于0元');
return;
}
visible.value = true;
initQR();
}
const initQR = async () => {
const {data} = await Api.merchant.rechargeOrderQR({
money: money,
});
Object.assign(qrInfo, data);
}
</script>
<template>
<a-button type="primary" @click="visible=true">立即充值</a-button>
<a-button type="primary" @click="open">立即充值</a-button>
<a-modal
:footer="false"
@@ -18,7 +42,7 @@ const visible = ref(false);
<div class="py-[24px] px-[20px]">
<div class="flex justify-center gap-[15px]">
支付金额: <span class="text-[rgb(var(--arcoblue-6))]">200</span>
支付金额: <span class="text-[rgb(var(--arcoblue-6))]">{{ money }}</span>
</div>
<div class="text-center mt-[20px]">打开支付宝扫描下方二维码支付</div>
<div class="w-[200px] aspect-square mx-auto mt-[5px]">