remove frontend directory from git tracking

This commit is contained in:
2026-09-14 17:56:43 +08:00
parent 4f296eb58c
commit 6d44b8ff37
34 changed files with 0 additions and 2648 deletions
-40
View File
@@ -1,40 +0,0 @@
const TOKEN_KEY = "huaxia_token";
export function getToken() {
if (typeof window === "undefined") return null;
return localStorage.getItem(TOKEN_KEY);
}
export function setToken(token: string) {
localStorage.setItem(TOKEN_KEY, token);
}
export function clearToken() {
localStorage.removeItem(TOKEN_KEY);
}
export const roleLabels: Record<string, string> = {
投顾: "投顾专员",
投顾专员: "投顾专员",
风控专员: "风控专员",
ADMIN: "员工通用",
EMPLOYEE: "员工通用",
};
export function getRoleLabel(role?: string | null) {
return role ? roleLabels[role] ?? "员工通用" : "员工通用";
}
export function getPostLoginPath(user?: { user_type?: string | null; employee_role?: string | null }) {
if (!user || user.user_type === "CUSTOMER") return "/account";
if (user.user_type === "ADMIN") return "/admin/common";
switch (getRoleLabel(user.employee_role)) {
case "投顾专员":
return "/admin/advisor";
case "风控专员":
return "/admin/risk";
default:
return "/admin/common";
}
}