From fd14b454eb838194dbd42150b2735b8a16258e75 Mon Sep 17 00:00:00 2001 From: Ai <513618446@qq.com> Date: Thu, 8 Aug 2024 18:01:39 +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?= 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过期