From 768ae544d3007323db6d35a64d1b0e1a21241c06 Mon Sep 17 00:00:00 2001 From: odjbin <1042039504@qq.com> Date: Tue, 8 Oct 2024 22:57:27 +0800 Subject: [PATCH] =?UTF-8?q?fix=20:=20=E6=B5=8B=E8=AF=95=E5=AD=97=E5=85=B8?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=B2=A1=E5=8A=A0token?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/auth.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/utils/auth.js b/src/utils/auth.js index 55243e8..f59a239 100644 --- a/src/utils/auth.js +++ b/src/utils/auth.js @@ -1,25 +1,25 @@ -import Cookies from "js-cookie"; + export const getToken = () => { - return Cookies.get('Authorization') + return localStorage.getItem('Authorization') } export const setToken = (token) => { - return Cookies.set('Authorization', token) + return localStorage.setItem('Authorization', token) } export const removeToken = () => { - return Cookies.remove('Authorization') + return localStorage.removeItem('Authorization') } export const getAuthInfo = () => { - return Cookies.get('authinfo') + return localStorage.get('authinfo') } export const setAuthInfo = (info) => { - return Cookies.set('authinfo', info) + return localStorage.set('authinfo', info) } export const removeAuthInfo = () => { - return Cookies.remove('authinfo') -} \ No newline at end of file + return localStorage.remove('authinfo') +}