cmc-web/packages/common/utils/auth.js

17 lines
325 B
JavaScript

/**
* Created by HaijunZhang on 2018/11/16.
*/
import { tokenKey } from '@/config'
export function getToken() {
return sessionStorage.getItem(tokenKey)
}
export function setToken(token) {
return sessionStorage.setItem(tokenKey, token)
}
export function removeToken() {
return sessionStorage.removeItem(tokenKey)
}