@@ -107,113 +107,138 @@ export const admins: RouteRecordRaw = {
|
||||
path: "",
|
||||
name: "admin home",
|
||||
component: () => import("~/admin/setting/home.vue"),
|
||||
meta: { requiresAdmin: true },
|
||||
},
|
||||
// 只有super_admin可以访问的路由
|
||||
{
|
||||
path: "config",
|
||||
name: "admin config",
|
||||
component: () => import("admin/setting/config.vue"),
|
||||
meta: { requiresSuperAdmin: true },
|
||||
},
|
||||
{
|
||||
path: "user/list",
|
||||
name: "admin user list",
|
||||
component: () => import("admin/user/list.vue"),
|
||||
meta: { requiresSuperAdmin: true },
|
||||
},
|
||||
{
|
||||
path: "user/generate",
|
||||
name: "admin user generate",
|
||||
component: () => import("~/admin/user/generate.vue"),
|
||||
meta: { requiresSuperAdmin: true },
|
||||
},
|
||||
// admin和super_admin都可以访问的路由 (需要题目权限)
|
||||
{
|
||||
path: "problem/list",
|
||||
name: "admin problem list",
|
||||
component: () => import("admin/problem/list.vue"),
|
||||
meta: { requiresProblemPermission: true },
|
||||
},
|
||||
{
|
||||
path: "problem/create",
|
||||
name: "admin problem create",
|
||||
component: () => import("admin/problem/detail.vue"),
|
||||
meta: { requiresProblemPermission: true },
|
||||
},
|
||||
{
|
||||
path: "problem/edit/:problemID",
|
||||
name: "admin problem edit",
|
||||
component: () => import("admin/problem/detail.vue"),
|
||||
props: true,
|
||||
meta: { requiresProblemPermission: true },
|
||||
},
|
||||
// admin和super_admin都可以访问的路由
|
||||
{
|
||||
path: "contest/list",
|
||||
name: "admin contest list",
|
||||
component: () => import("admin/contest/list.vue"),
|
||||
meta: { requiresAdmin: true },
|
||||
},
|
||||
{
|
||||
path: "contest/create",
|
||||
name: "admin contest create",
|
||||
component: () => import("admin/contest/detail.vue"),
|
||||
meta: { requiresAdmin: true },
|
||||
},
|
||||
{
|
||||
path: "contest/edit/:contestID",
|
||||
name: "admin contest edit",
|
||||
component: () => import("admin/contest/detail.vue"),
|
||||
props: true,
|
||||
meta: { requiresAdmin: true },
|
||||
},
|
||||
{
|
||||
path: "contest/:contestID/problem/list",
|
||||
name: "admin contest problem list",
|
||||
component: () => import("admin/problem/list.vue"),
|
||||
props: true,
|
||||
meta: { requiresAdmin: true },
|
||||
},
|
||||
{
|
||||
path: "contest/:contestID/problem/create",
|
||||
name: "admin contest problem create",
|
||||
component: () => import("admin/problem/detail.vue"),
|
||||
props: true,
|
||||
meta: { requiresAdmin: true },
|
||||
},
|
||||
{
|
||||
path: "contest/:contestID/problem/edit/:problemID",
|
||||
name: "admin contest problem edit",
|
||||
component: () => import("admin/problem/detail.vue"),
|
||||
props: true,
|
||||
meta: { requiresAdmin: true },
|
||||
},
|
||||
// 只有super_admin可以访问的路由
|
||||
{
|
||||
path: "announcement/list",
|
||||
name: "admin announcement list",
|
||||
component: () => import("admin/announcement/list.vue"),
|
||||
meta: { requiresSuperAdmin: true },
|
||||
},
|
||||
{
|
||||
path: "announcement/create",
|
||||
name: "admin announcement create",
|
||||
component: () => import("admin/announcement/detail.vue"),
|
||||
meta: { requiresSuperAdmin: true },
|
||||
},
|
||||
{
|
||||
path: "announcement/edit/:announcementID",
|
||||
name: "admin announcement edit",
|
||||
component: () => import("admin/announcement/detail.vue"),
|
||||
props: true,
|
||||
meta: { requiresSuperAdmin: true },
|
||||
},
|
||||
{
|
||||
path: "comment/list",
|
||||
name: "admin comment list",
|
||||
component: () => import("admin/communication/comments.vue"),
|
||||
meta: { requiresSuperAdmin: true },
|
||||
},
|
||||
{
|
||||
path: "message/list",
|
||||
name: "admin message list",
|
||||
component: () => import("admin/communication/messages.vue"),
|
||||
meta: { requiresSuperAdmin: true },
|
||||
},
|
||||
{
|
||||
path: "tutorial/list",
|
||||
name: "admin tutorial list",
|
||||
component: () => import("admin/tutorial/list.vue"),
|
||||
meta: { requiresSuperAdmin: true },
|
||||
},
|
||||
{
|
||||
path: "tutorial/create",
|
||||
name: "admin tutorial create",
|
||||
component: () => import("admin/tutorial/detail.vue"),
|
||||
meta: { requiresSuperAdmin: true },
|
||||
},
|
||||
{
|
||||
path: "tutorial/edit/:tutorialID",
|
||||
name: "admin tutorial edit",
|
||||
component: () => import("admin/tutorial/detail.vue"),
|
||||
props: true,
|
||||
meta: { requiresSuperAdmin: true },
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user