This commit is contained in:
王一嘉
2025-07-21 11:28:08 +08:00
parent d3881cefe1
commit c58ae0d06e
8 changed files with 48 additions and 13 deletions

View File

@@ -4,6 +4,7 @@ import {Message} from "@arco-design/web-vue";
import Api from "../../api/index.ts";
import {QrcodeCanvas} from "qrcode.vue";
const emits = defineEmits(['success']);
const {money} = defineProps({
money: {
type: Number,
@@ -54,7 +55,10 @@ const initQR = async () => {
watch(
() => visible.value,
(val) => {
if (!val) clearInterval(timer);
if (!val) {
clearInterval(timer);
emits('success');
}
},
{deep: true}
)

View File

@@ -2,6 +2,7 @@
import {ref} from "vue";
import Alipay from "./Alipay.vue";
const emits = defineEmits(['success']);
const visible = ref(false);
const money = ref(null);
</script>
@@ -32,7 +33,7 @@ const money = ref(null);
<template v-slot:footer>
<div class="flex gap-[24px] justify-end">
<a-button @click="visible=false">取消</a-button>
<Alipay :money="money">
<Alipay :money="money" @success="emits('success')">
<a-button type="primary" @click="visible=false">下一步</a-button>
</Alipay>
</div>

View File

@@ -10,7 +10,6 @@ let successFun = () => {
const open = (options) => {
const {props, success} = options;
successFun = success;
console.log('?????', options)
payInfo.value = props.payInfo;
visible.value = true;
}
@@ -41,7 +40,7 @@ defineExpose({
title="开始任务"
v-model:visible="visible">
<a-alert>平台提示该款项不会直接打给达人只有您对子任务确认结算后才会打款给达人</a-alert>
<div class="px-[30px] py-[16px] flex flex-col gap-[8px] justify-start items-start" v-if="payInfo">
<div class="px-[30px] py-[16px] flex flex-col gap-[8px] justify-start items-start" v-if="payInfo && visible">
<div class="text-[#4E5969]">支付详情</div>
<div class="flex">
<div class="w-[100px]">任务金额(</div>
@@ -64,7 +63,7 @@ defineExpose({
<div class="mt-[5px]">
<a-radio
:disabled="payInfo.user_money < payInfo?.total_money"
:default-checked="payInfo.user_money > payInfo?.total_money">
:default-checked="payInfo.user_money >= payInfo?.total_money">
钱包余额
(可用¥{{ payInfo?.user_money?.toFixed(2) }})
</a-radio>
@@ -72,7 +71,7 @@ defineExpose({
<div v-if="payInfo.user_money < payInfo?.total_money" class="text-[12px] text-[#86909C] pl-[20px]">
*余额不足本次任务所需,请充值后再进行支付
</div>
<go-pay>
<go-pay @success="">
<a-button class="mt-[20px]" type="primary">去充值
</a-button>
</go-pay>