feat(提现资料提交页): 对接提交申请接口

This commit is contained in:
hzj 2025-10-23 18:47:49 +08:00
parent bfc5650958
commit bb04c3c6db
2 changed files with 37 additions and 0 deletions

View File

@ -140,3 +140,14 @@ export const withdrawRecords = async () => {
throw error
}
}
// 提交提现申请
export const withdrawApply = async (data) => {
try {
const response = await post('/activity/lottery/withdraw/apply', data)
return response
} catch (error) {
console.error('Failed to fetch withdraw apply:', error)
throw error
}
}

View File

@ -31,6 +31,7 @@
<div
style="
padding: 12px 12px 20px;
background: #fff;
box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.25);
border-radius: 8px;
position: relative;
@ -118,10 +119,35 @@
<script setup>
import GeneralHeader from '@/components/GeneralHeader.vue'
import { ref, onMounted, computed } from 'vue'
import {
withdrawApply, //
} from '@/api/lottery'
import { showError, showWarning, showInfo, showSuccess } from '@/utils/toast.js'
import { useRouter } from 'vue-router'
const router = useRouter()
const cardNum = ref('')
const description = ref('')
const count = computed(() => description.value.length)
//
const Submit = () => {
let data = {
amount: 10,
contactNumber: cardNum.value,
description: description.value,
cardImages: '',
}
try {
const resApply = withdrawApply(data)
if (resApply.status) {
router.go(-1)
}
} catch (error) {
showError(error.errorMsg)
}
}
</script>
<style lang="scss" scoped>