You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

19 lines
406 B

import router from "../router";
export function setStaff(key: any, staff: any) {
localStorage.setItem(key, JSON.stringify(staff));
}
export function getStaff(key: any) {
let data = localStorage.getItem(key);
if(data !== null) {
return JSON.parse(data);
} else {
router.push({path: '/Login'});
}
return null;
}
export function clear() {
localStorage.clear();
}