2022-08-19 21:13:41 +08:00
|
|
|
/** 统一处理 Cookie */
|
|
|
|
|
2022-08-22 14:30:08 +08:00
|
|
|
import CacheKey from "@/constants/cacheKey"
|
2022-08-19 21:13:41 +08:00
|
|
|
import Cookies from "js-cookie"
|
|
|
|
|
2022-08-22 14:30:08 +08:00
|
|
|
export const getToken = () => Cookies.get(CacheKey.TOKEN)
|
|
|
|
export const setToken = (token: string) => Cookies.set(CacheKey.TOKEN, token)
|
|
|
|
export const removeToken = () => Cookies.remove(CacheKey.TOKEN)
|