This commit is contained in:
王一嘉
2025-07-22 16:45:11 +08:00
parent c58ae0d06e
commit 12eec0a6b7
4 changed files with 13 additions and 4 deletions

View File

@@ -1,7 +1,9 @@
<script setup>
import {ref} from "vue";
import GoPay from "./GoPay.vue";
import Api from "../../api/index.js";
const id = ref(null);
const payInfo = ref(null);
const visible = ref(false);
const emits = defineEmits(['close']);
@@ -10,6 +12,7 @@ let successFun = () => {
const open = (options) => {
const {props, success} = options;
successFun = success;
id.value = props.id;
payInfo.value = props.payInfo;
visible.value = true;
}
@@ -21,6 +24,11 @@ const success = () => {
successFun && successFun.apply();
}
const update = async () => {
const {data} = await Api.merchant.startTask({id: id.value});
payInfo.value = data;
}
defineExpose({
open,
close
@@ -71,7 +79,7 @@ defineExpose({
<div v-if="payInfo.user_money < payInfo?.total_money" class="text-[12px] text-[#86909C] pl-[20px]">
*余额不足本次任务所需,请充值后再进行支付
</div>
<go-pay @success="">
<go-pay @success="update">
<a-button class="mt-[20px]" type="primary">去充值
</a-button>
</go-pay>