auth.js 356 字节
Newer Older
yma16's avatar
yma16 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14
import { getCookie, setCookie, removeCookie } from './util.cookies.js'
const TOKEN_KEY = 'token'
    /**
     * 获取tonken
     */
export function getToken() {
    return getCookie(TOKEN_KEY)
}
export function setToken(token, optins) {
    return setCookie(TOKEN_KEY, token, optins)
}
export function removeToken() {
    return removeCookie(TOKEN_KEY)
}