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