AnalysisSystemForRadionucli.../src/utils/auth.js
2023-05-06 15:58:45 +08:00

19 lines
360 B
JavaScript

/**
* 弃用
*/
import { setStore, getStore, clearStore } from "@/utils/storage"
export const TokenKey = 'Access-Token'
export function getToken() {
return getStore(TokenKey)
}
export function setToken(token) {
// key, token, timeout = 86400s
return setStore(TokenKey, token, 86400)
}
export function removeToken() {
return clearStore(TokenKey)
}