feat(提现资料提交页): 对接提交申请接口
This commit is contained in:
parent
bfc5650958
commit
bb04c3c6db
@ -140,3 +140,14 @@ export const withdrawRecords = async () => {
|
|||||||
throw error
|
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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@ -31,6 +31,7 @@
|
|||||||
<div
|
<div
|
||||||
style="
|
style="
|
||||||
padding: 12px 12px 20px;
|
padding: 12px 12px 20px;
|
||||||
|
background: #fff;
|
||||||
box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.25);
|
box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.25);
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
position: relative;
|
position: relative;
|
||||||
@ -118,10 +119,35 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import GeneralHeader from '@/components/GeneralHeader.vue'
|
import GeneralHeader from '@/components/GeneralHeader.vue'
|
||||||
import { ref, onMounted, computed } from '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 cardNum = ref('')
|
||||||
const description = ref('')
|
const description = ref('')
|
||||||
const count = computed(() => description.value.length)
|
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>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user