update
This commit is contained in:
@@ -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]">
|
||||
|
||||
Reference in New Issue
Block a user