From b29ec8f601c38a2d3ac3ba51698142ec80177707 Mon Sep 17 00:00:00 2001 From: Seven Date: Mon, 22 Dec 2025 03:13:58 +0700 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9E=E6=8F=90=E7=8E=B0?= =?UTF-8?q?=E6=B3=95=E5=B8=81=E8=B7=AF=E7=94=B1=EF=BC=8C=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E6=8F=90=E7=8E=B0=E5=AE=A1=E6=89=B9=E8=B7=AF=E7=94=B1=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=EF=BC=9B=E5=9C=A8=E5=AE=89=E5=85=A8=E5=AE=A2=E6=88=B7?= =?UTF-8?q?=E7=AB=AF=E4=B8=AD=E5=A4=84=E7=90=86401=E9=94=99=E8=AF=AF?= =?UTF-8?q?=EF=BC=8C=E9=87=8D=E7=BD=AE=E8=AE=A4=E8=AF=81=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/elegant/routes.ts | 26 ++++++++++++++------------ src/service/api/client.ts | 4 ++++ 2 files changed, 18 insertions(+), 12 deletions(-) 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'