mirror of
https://github.com/jeecgboot/JeecgBoot.git
synced 2026-02-02 16:45:24 +08:00
JEECG-BOOT 2.0.2版本发布
This commit is contained in:
19
ant-design-vue-jeecg/src/utils/auth.js
Normal file
19
ant-design-vue-jeecg/src/utils/auth.js
Normal file
@ -0,0 +1,19 @@
|
||||
/**
|
||||
* 弃用
|
||||
*/
|
||||
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)
|
||||
}
|
||||
Reference in New Issue
Block a user