update
This commit is contained in:
@@ -35,4 +35,14 @@ export const STORAGE_KEY = {
|
||||
JS: "web-js",
|
||||
TAB: "web-tab",
|
||||
FONTSIZE: "web-fontsize",
|
||||
}
|
||||
}
|
||||
|
||||
export const ADMIN_URL =
|
||||
import.meta.env.MODE === "development"
|
||||
? "http://localhost:8000/admin"
|
||||
: "https://web.xuyue.cc/admin"
|
||||
|
||||
export const BASE_URL =
|
||||
import.meta.env.MODE === "development"
|
||||
? "http://localhost:8000/api"
|
||||
: "https://web.xuyue.cc/api"
|
||||
|
||||
@@ -4,6 +4,14 @@ export enum Role {
|
||||
Normal = "normal",
|
||||
}
|
||||
|
||||
export function getRole(role: Role) {
|
||||
return {
|
||||
[Role.Super]: "超级管理员",
|
||||
[Role.Admin]: "管理员",
|
||||
[Role.Normal]: "普通用户",
|
||||
}[role]
|
||||
}
|
||||
|
||||
export interface TutorialSlim {
|
||||
display: number
|
||||
title: string
|
||||
@@ -22,4 +30,4 @@ export interface User {
|
||||
last_login: Date
|
||||
role: Role
|
||||
is_active: boolean
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user