diff --git a/src/utils/tools.ts b/src/utils/tools.ts index 8e19721..82df9ea 100644 --- a/src/utils/tools.ts +++ b/src/utils/tools.ts @@ -1,4 +1,4 @@ -import http from '@/http/axios' +import client from '@/http/axios' import { DOWNLOAD_DATA, GET, POST } from '@/http/http' import router from '@/router' import { buttonStore, loginStateStore, menuStore, tabStore, authMarkStore } from '@/stores/store' @@ -74,7 +74,7 @@ export const checkAccessToken = async (accessToken: string): Promise => //ten minutes if (jwt.exp - now < 600) { const refreshToken = getLocalStorageItem('refreshToken') - const data = await http.get>('/token/refresh', { + const data = await client.http.get>('/token/refresh', { headers: { Authorization: refreshToken } }) const token = data.data.accessToken diff --git a/src/views/LoginView.vue b/src/views/LoginView.vue index 4d7a735..e5b1683 100644 --- a/src/views/LoginView.vue +++ b/src/views/LoginView.vue @@ -1,7 +1,7 @@