提交 | 用户 | 时间 | ||
fd2207 | 1 | import Cookies from 'js-cookie' |
懒 | 2 | |
3 | const TokenKey = 'Admin-Token' | |
4 | ||
5 | export function getToken() { | |
6 | return Cookies.get(TokenKey) | |
7 | } | |
8 | ||
9 | export function setToken(token) { | |
10 | return Cookies.set(TokenKey, token) | |
11 | } | |
12 | ||
13 | export function removeToken() { | |
14 | return Cookies.remove(TokenKey) | |
15 | } |