完成发现,个人中心

This commit is contained in:
cbb
2026-01-06 16:35:57 +08:00
parent 07cd0f6b37
commit 578eafafa1
23 changed files with 740 additions and 61 deletions

View File

@@ -8,12 +8,14 @@
getUserBankList,
getUserWithdrawConfig,
getUserIntegral,
addUserWithdraw
} from '/api/my-index'
addUserWithdraw,
getUserPayPwd
} from '@/api/my-index'
import { useUI } from '@/utils/use-ui'
const { showToast, showDialog } = useUI()
const tixian = ref(null)
const popup = ref(null)
const topData = ref({})
const formData = reactive({
@@ -99,14 +101,36 @@
return
}
const data = {
amount: formData.nuber,
withdrawalType: topData.value.withdrawalType,
paymentAccountId: formData.paymentAccountId
const res = await getUserPayPwd()
if (res?.data) {
tixian.value.open()
} else {
const show = await showDialog('提示', '请先设置支付密码')
if (show) {
navigateTo('/pages/my-index/wallet/edit-password', { type: 0 })
}
}
// await addUserWithdraw(data)
// await showToast(`提现成功`, 'success')
// navigateBack()
}
const submit = async e => {
try {
const data = {
payPassword: e.join(''),
amount: formData.nuber,
withdrawalType: topData.value.withdrawalType,
paymentAccountId: formData.paymentAccountId
}
tixian.value.close()
await addUserWithdraw(data)
await showToast(`提现成功`, 'success')
navigateBack()
} catch (error) {
tixian.value.close()
console.log(error)
}
await addUserWithdraw(data)
await showToast(`提现成功`, 'success')
navigateBack()
}
onShow(() => {
@@ -119,6 +143,8 @@
<view class="withdraw-box">
<nav-bar isTopBg isPlaceholder title="提现"></nav-bar>
<uu-pwdModal ref="tixian" @success="submit"></uu-pwdModal>
<view class="view-box">
<!-- 选择提现方式 -->
<view class="withdraw-way">