From 44ec02424fb5e32f263c1af4b10cd335843171d1 Mon Sep 17 00:00:00 2001 From: Rewrite0 <49576640+Rewrite0@users.noreply.github.com> Date: Wed, 31 May 2023 23:11:19 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E6=9E=84=20api=20=E8=B0=83=E7=94=A8?= =?UTF-8?q?=E6=93=8D=E4=BD=9C=20&=20=E5=A2=9E=E5=8A=A0=20token=20=E5=88=B7?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 3 ++ src/api/auth.ts | 15 +++---- src/hooks/useApi.ts | 4 +- src/hooks/useAuth.ts | 99 ++++++++++++++++++++++++++++---------------- 4 files changed, 74 insertions(+), 47 deletions(-) diff --git a/src/App.vue b/src/App.vue index e3c47df7..1b89ad97 100644 --- a/src/App.vue +++ b/src/App.vue @@ -10,6 +10,9 @@ const theme: GlobalThemeOverrides = { color: '#fff', }, }; + +const { refresh } = useAuth(); +refresh();