feat: 重构充值提现功能,添加冷钱包管理
后端改动: - 新增冷钱包管理模块(ColdWallet实体、Mapper、Service、Controller) - 充值流程:创建订单→显示钱包地址→用户确认打款→管理员审核 - 提现流程:用户输入地址和联系方式→冻结余额→管理员审核 - OrderFund新增字段:walletId, walletAddress, withdrawContact, payTime, confirmTime 前端改动(monisuo-admin): - 新增冷钱包管理页面(wallets.vue) - 优化订单管理页面,支持新的状态流转 - 添加调试日志帮助排查登录问题 前端改动(flutter_monisuo): - 更新OrderFund模型支持新字段 - 充值成功后显示钱包地址弹窗 - 提现时收集提现地址和联系方式 - 新增资金订单页面 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -28,12 +28,16 @@ export function useAuth() {
|
||||
|
||||
try {
|
||||
const result = await loginMutation.mutateAsync({ username, password })
|
||||
console.log('Login result:', result)
|
||||
|
||||
if (result.code === '0000' && result.data) {
|
||||
console.log('Setting token and adminInfo...')
|
||||
authStore.setToken(result.data.token)
|
||||
authStore.setAdminInfo(result.data.adminInfo)
|
||||
console.log('isLogin after setToken:', authStore.isLogin)
|
||||
|
||||
const redirect = router.currentRoute.value.query.redirect as string
|
||||
console.log('Redirecting to:', redirect || '/monisuo/dashboard')
|
||||
if (!redirect || redirect.startsWith('//')) {
|
||||
toHome()
|
||||
}
|
||||
@@ -42,10 +46,12 @@ export function useAuth() {
|
||||
}
|
||||
}
|
||||
else {
|
||||
console.log('Login failed:', result.code, result.msg)
|
||||
error.value = result.msg || '登录失败'
|
||||
}
|
||||
}
|
||||
catch (e: any) {
|
||||
console.error('Login error:', e)
|
||||
error.value = e.response?.data?.msg || '网络错误,请稍后重试'
|
||||
}
|
||||
finally {
|
||||
|
||||
Reference in New Issue
Block a user