26 lines
707 B
JavaScript
26 lines
707 B
JavaScript
import SessionStorage from 'sessionstorage';
|
||
|
||
const TokenKey = 'Admin-Token';
|
||
|
||
// 设置教学,实训,仿真系统token, 设置城市轨道交通设计平台token
|
||
export function getToken() {
|
||
return SessionStorage.getItem(TokenKey);
|
||
}
|
||
export function setToken(token) {
|
||
return SessionStorage.setItem(TokenKey, token);
|
||
}
|
||
export function removeToken() {
|
||
return SessionStorage.removeItem(TokenKey);
|
||
}
|
||
|
||
// 操作sessionStorage
|
||
export function getSessionStorage(key) {
|
||
return SessionStorage.getItem(key);
|
||
}
|
||
export function setSessionStorage(key, value) {
|
||
return SessionStorage.setItem(key, value);
|
||
}
|
||
export function removeSessionStorage(key) {
|
||
return SessionStorage.removeItem(key);
|
||
}
|