diff --git a/mock/asyncRoutes.ts b/mock/asyncRoutes.ts
deleted file mode 100644
index da6a559..0000000
--- a/mock/asyncRoutes.ts
+++ /dev/null
@@ -1,49 +0,0 @@
-// 模拟后端动态生成路由
-import { MockMethod } from "vite-plugin-mock";
-
-/**
- * roles:页面级别权限,这里模拟二种 "admin"、"common"
- * admin:管理员角色
- * common:普通角色
- */
-
-const permissionRouter = {
- path: "/permission",
- meta: {
- title: "权限管理",
- icon: "lollipop",
- rank: 10
- },
- children: [
- {
- path: "/permission/page/index",
- name: "PermissionPage",
- meta: {
- title: "页面权限",
- roles: ["admin", "common"]
- }
- },
- {
- path: "/permission/button/index",
- name: "PermissionButton",
- meta: {
- title: "按钮权限",
- roles: ["admin", "common"],
- auths: ["btn_add", "btn_edit", "btn_delete"]
- }
- }
- ]
-};
-
-export default [
- {
- url: "/getAsyncRoutes",
- method: "get",
- response: () => {
- return {
- success: true,
- data: [permissionRouter]
- };
- }
- }
-] as MockMethod[];
diff --git a/mock/login.ts b/mock/login.ts
deleted file mode 100644
index cddd4e4..0000000
--- a/mock/login.ts
+++ /dev/null
@@ -1,36 +0,0 @@
-// 根据角色动态生成路由
-import { MockMethod } from "vite-plugin-mock";
-
-export default [
- {
- url: "/login",
- method: "post",
- response: ({ body }) => {
- if (body.username === "admin") {
- return {
- success: true,
- data: {
- username: "admin",
- // 一个用户可能有多个角色
- roles: ["admin"],
- accessToken: "eyJhbGciOiJIUzUxMiJ9.admin",
- refreshToken: "eyJhbGciOiJIUzUxMiJ9.adminRefresh",
- expires: "2023/10/30 00:00:00"
- }
- };
- } else {
- return {
- success: true,
- data: {
- username: "common",
- // 一个用户可能有多个角色
- roles: ["common"],
- accessToken: "eyJhbGciOiJIUzUxMiJ9.common",
- refreshToken: "eyJhbGciOiJIUzUxMiJ9.commonRefresh",
- expires: "2023/10/30 00:00:00"
- }
- };
- }
- }
- }
-] as MockMethod[];
diff --git a/mock/refreshToken.ts b/mock/refreshToken.ts
deleted file mode 100644
index 87b8995..0000000
--- a/mock/refreshToken.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-import { MockMethod } from "vite-plugin-mock";
-
-// 模拟刷新token接口
-export default [
- {
- url: "/refreshToken",
- method: "post",
- response: ({ body }) => {
- if (body.refreshToken) {
- return {
- success: true,
- data: {
- accessToken: "eyJhbGciOiJIUzUxMiJ9.newAdmin",
- refreshToken: "eyJhbGciOiJIUzUxMiJ9.newAdminRefresh",
- // `expires`选择这种日期格式是为了方便调试,后端直接设置时间戳或许更方便(每次都应该递增)。如果后端返回的是时间戳格式,前端开发请来到这个目录`src/utils/auth.ts`,把第`38`行的代码换成expires = data.expires即可。
- expires: "2023/10/30 23:59:59"
- }
- };
- } else {
- return {
- success: false,
- data: {}
- };
- }
- }
- }
-] as MockMethod[];
diff --git a/src/views/system/menu/index.vue b/src/views/system/menu/index.vue
new file mode 100644
index 0000000..5ee101a
--- /dev/null
+++ b/src/views/system/menu/index.vue
@@ -0,0 +1,12 @@
+
+
+
+
+ 角色管理
+
+
diff --git a/src/views/system/role/index.vue b/src/views/system/role/index.vue
new file mode 100644
index 0000000..34faac1
--- /dev/null
+++ b/src/views/system/role/index.vue
@@ -0,0 +1,12 @@
+
+
+
+
+ 用户管理
+
+
diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue
new file mode 100644
index 0000000..34faac1
--- /dev/null
+++ b/src/views/system/user/index.vue
@@ -0,0 +1,12 @@
+
+
+
+
+ 用户管理
+
+