feat: 新增提现法币路由,优化提现审批路由配置;在安全客户端中处理401错误,重置认证状态

This commit is contained in:
2025-12-22 03:13:58 +07:00
parent 0655cc2f5a
commit b29ec8f601
2 changed files with 18 additions and 12 deletions

View File

@@ -184,24 +184,26 @@ export const generatedRoutes: GeneratedRoute[] = [
order: 3 order: 3
}, },
children: [ children: [
{
name: 'withdraw_approved',
path: '/withdraw/approved',
component: 'view.withdraw_approved',
meta: {
title: 'withdraw_approved',
i18nKey: 'route.withdraw_approved'
}
},
{ {
name: 'withdraw_fiat', name: 'withdraw_fiat',
path: '/withdraw/fiat', path: '/withdraw/fiat',
component: 'view.withdraw_fiat', component: 'view.withdraw_fiat',
meta: { meta: {
title: 'withdraw_fiat', title: 'withdraw_fiat',
i18nKey: 'route.withdraw_fiat' i18nKey: 'route.withdraw_fiat',
} order: 1
} },
},
{
name: 'withdraw_approved',
path: '/withdraw/approved',
component: 'view.withdraw_approved',
meta: {
title: 'withdraw_approved',
i18nKey: 'route.withdraw_approved',
order: 2
},
},
] ]
} }
]; ];

View File

@@ -2,6 +2,7 @@ import type { Ref, WatchSource } from 'vue';
import { ref, watch } from 'vue'; import { ref, watch } from 'vue';
import { treaty } from '@elysiajs/eden'; import { treaty } from '@elysiajs/eden';
import type { App } from '@riwa/api-types'; import type { App } from '@riwa/api-types';
import { useAuthStore } from '@/store/modules/auth';
import { getServiceBaseURL } from '@/utils/service'; import { getServiceBaseURL } from '@/utils/service';
import { localStg } from '@/utils/storage'; import { localStg } from '@/utils/storage';
import { $t } from '@/locales'; import { $t } from '@/locales';
@@ -67,6 +68,9 @@ export function safeClient<T, E>(
type: 'error' type: 'error'
}); });
} }
} else if (res.status === 401) {
const authStore = useAuthStore();
authStore.resetStore();
} else if (!options.silent) { } else if (!options.silent) {
window.$message?.create((res.error as any).message || 'Error', { window.$message?.create((res.error as any).message || 'Error', {
type: 'error' type: 'error'