From a9c77081191fdb76ac350029fbd7a20b33e4b358 Mon Sep 17 00:00:00 2001 From: TianQian <38515093+TianQian-A@users.noreply.github.com> Date: Thu, 8 Aug 2024 23:48:09 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=B8=BA=20createServerTokenAuthenticat?= =?UTF-8?q?ion=20=E6=B7=BB=E5=8A=A0=20statesHook=20=E7=B1=BB=E5=9E=8B=20(#?= =?UTF-8?q?32)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/service/http/alova.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/service/http/alova.ts b/src/service/http/alova.ts index 5eb8147..82d61fb 100644 --- a/src/service/http/alova.ts +++ b/src/service/http/alova.ts @@ -1,5 +1,5 @@ import { createAlova } from 'alova' -import VueHook from 'alova/vue' +import VueHook, { type VueHookType } from 'alova/vue' import adapterFetch from 'alova/fetch' import { createServerTokenAuthentication } from 'alova/client' import { @@ -14,7 +14,7 @@ import { } from './config' import { local } from '@/utils' -const { onAuthRequired, onResponseRefreshToken } = createServerTokenAuthentication({ +const { onAuthRequired, onResponseRefreshToken } = createServerTokenAuthentication({ // 服务端判定token过期 refreshTokenOnSuccess: { // 当服务端返回401时,表示token过期