diff --git a/src/router/elegant/routes.ts b/src/router/elegant/routes.ts index a477040..7e58c59 100644 --- a/src/router/elegant/routes.ts +++ b/src/router/elegant/routes.ts @@ -184,24 +184,26 @@ export const generatedRoutes: GeneratedRoute[] = [ order: 3 }, children: [ - { - name: 'withdraw_approved', - path: '/withdraw/approved', - component: 'view.withdraw_approved', - meta: { - title: 'withdraw_approved', - i18nKey: 'route.withdraw_approved' - } - }, { name: 'withdraw_fiat', path: '/withdraw/fiat', component: 'view.withdraw_fiat', meta: { 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 + }, + }, ] } ]; diff --git a/src/service/api/client.ts b/src/service/api/client.ts index 181a013..54a020e 100644 --- a/src/service/api/client.ts +++ b/src/service/api/client.ts @@ -2,6 +2,7 @@ import type { Ref, WatchSource } from 'vue'; import { ref, watch } from 'vue'; import { treaty } from '@elysiajs/eden'; import type { App } from '@riwa/api-types'; +import { useAuthStore } from '@/store/modules/auth'; import { getServiceBaseURL } from '@/utils/service'; import { localStg } from '@/utils/storage'; import { $t } from '@/locales'; @@ -67,6 +68,9 @@ export function safeClient( type: 'error' }); } + } else if (res.status === 401) { + const authStore = useAuthStore(); + authStore.resetStore(); } else if (!options.silent) { window.$message?.create((res.error as any).message || 'Error', { type: 'error'