This commit is contained in:
王一嘉
2025-07-24 20:40:47 +08:00
parent 678e26a3f0
commit ff61918d76
14 changed files with 46 additions and 35 deletions

View File

@@ -1,10 +1,11 @@
<script setup>
import {ref} from "vue";
import {computed, ref} from "vue";
import GoPay from "./GoPay.vue";
import Api from "../../api/index.js";
const id = ref(null);
const payInfo = ref(null);
const refreshKey = ref(0);
const visible = ref(false);
const emits = defineEmits(['close']);
let successFun = () => {
@@ -26,9 +27,12 @@ const success = () => {
const update = async () => {
const {data} = await Api.merchant.startTask({id: id.value});
payInfo.value = data;
Object.assign(payInfo.value, data);
refreshKey.value++;
}
const isDis = computed(() => payInfo.value.user_money >= payInfo.value.total_money);
defineExpose({
open,
close
@@ -70,8 +74,9 @@ defineExpose({
<div>支付方式</div>
<div class="mt-[5px]">
<a-radio
:key="refreshKey"
:disabled="payInfo.user_money < payInfo?.total_money"
:default-checked="payInfo.user_money >= payInfo?.total_money">
:default-checked="isDis">
钱包余额
(可用{{ payInfo?.user_money?.toFixed(2) }})
</a-radio>