加入后台管理模块。

This commit is contained in:
2023-03-23 18:39:15 +08:00
parent a03da1bba9
commit cca2f449ac
15 changed files with 626 additions and 82 deletions

View File

@@ -10,6 +10,7 @@
import { StaffInfo } from "@/data/cpicxim/StaffInfo.js";
const STUFF_ITEM = "stuff_info";
const USER_TYPE_ITEM = "user_type";
function loadStaffInfo(): StaffInfo
{
@@ -48,4 +49,22 @@ function cleanStaffInfo(): void
window.localStorage.removeItem( STUFF_ITEM );
}
export { loadStaffInfo, saveStaffInfo, cleanStaffInfo };
function saveUserType( userType: string ): void
{
window.localStorage.setItem( USER_TYPE_ITEM, userType );
}
function getUserType(): string
{
const userType = window.localStorage.getItem( USER_TYPE_ITEM ) ?? "";
return userType;
}
export {
loadStaffInfo,
saveStaffInfo,
cleanStaffInfo,
saveUserType,
getUserType
};