From e1aa0ecffbabd618c71e4ad94370fb8dffe6ee1c Mon Sep 17 00:00:00 2001 From: zhanghua <314079846@qq.com> Date: 星期日, 21 一月 2024 20:54:49 +0800 Subject: [PATCH] 优化 --- src/utils/auth.js | 22 +++++++++++----------- 1 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/utils/auth.js b/src/utils/auth.js index f6388e4..12a4292 100644 --- a/src/utils/auth.js +++ b/src/utils/auth.js @@ -1,15 +1,15 @@ -// import Cookies from 'js-cookie' +import Cookies from 'js-cookie' -// const TokenKey = 'loginToken' +const TokenKey = 'loginToken' -// export function getToken() { -// return Cookies.get(TokenKey) -// } +export function getToken() { + return Cookies.get(TokenKey) +} -// export function setToken(token) { -// return Cookies.set(TokenKey, token) -// } +export function setToken(token) { + return Cookies.set(TokenKey, token) +} -// export function removeToken() { -// return Cookies.remove(TokenKey) -// } +export function removeToken() { + return Cookies.remove(TokenKey) +} -- Gitblit v1.8.0