From c07bcb67c9028ff9a9e10be8b676e9a2ff7553a7 Mon Sep 17 00:00:00 2001 From: YWQ HK IX's MacBook Pro <568170040@qq.com> Date: Tue, 24 Oct 2023 15:35:06 +0800 Subject: [PATCH] upload --- src/layout/index copy 2.vue | 119 --- src/layout/index copy.vue | 131 --- src/layout/index.vue | 2 +- src/permission.ts | 49 +- src/router/index.ts | 28 +- src/views/mangage/model.vue | 1992 +++++++++++++++++++++++++++++++++++ 6 files changed, 2041 insertions(+), 280 deletions(-) delete mode 100644 src/layout/index copy 2.vue delete mode 100644 src/layout/index copy.vue create mode 100644 src/views/mangage/model.vue diff --git a/src/layout/index copy 2.vue b/src/layout/index copy 2.vue deleted file mode 100644 index 464d82f..0000000 --- a/src/layout/index copy 2.vue +++ /dev/null @@ -1,119 +0,0 @@ - - - - - diff --git a/src/layout/index copy.vue b/src/layout/index copy.vue deleted file mode 100644 index 3d3ca28..0000000 --- a/src/layout/index copy.vue +++ /dev/null @@ -1,131 +0,0 @@ - - - - - diff --git a/src/layout/index.vue b/src/layout/index.vue index 9ebed9a..3eee778 100644 --- a/src/layout/index.vue +++ b/src/layout/index.vue @@ -11,7 +11,7 @@
-
+
diff --git a/src/permission.ts b/src/permission.ts index c13c976..369452d 100644 --- a/src/permission.ts +++ b/src/permission.ts @@ -9,35 +9,36 @@ NProgress.configure({ showSpinner: false }); // 进度条 const permissionStore = usePermissionStoreHook(); // 白名单路由 -const whiteList = ["/login", "/signSucceed",'/createVideo','/moveImg']; +const whiteList = ["/login", "/signSucceed", "/createVideo", "/moveImg"]; router.beforeEach(async (to, from, next) => { NProgress.start(); const AccessToken = localStorage.getItem("AccessToken"); + next(); // 已登录 - if (AccessToken) { - // 重置密码时可以去往login页面 - if ((to.params.type as string) == "4") { - next(); - } - if (to.query.resetPwd) { - next(); - } - if (to.path === "/login") { - next({ path: "/createVideo" }); - } else { - next(); - } - // 未登录 - } else { - // 未登录可以访问白名单页面 - if (whiteList.indexOf(to.path) !== -1) { - next(); - } else { - // 不在白名单内,跳转登录页 - next({ path: "/login" }); - } - } + // if (AccessToken) { + // // 重置密码时可以去往login页面 + // if ((to.params.type as string) == "4") { + // next(); + // } + // if (to.query.resetPwd) { + // next(); + // } + // if (to.path === "/login") { + // next({ path: "/createVideo" }); + // } else { + // next(); + // } + // // 未登录 + // } else { + // // 未登录可以访问白名单页面 + // if (whiteList.indexOf(to.path) !== -1) { + // next(); + // } else { + // // 不在白名单内,跳转登录页 + // next({ path: "/login" }); + // } + // } }); router.afterEach(() => { diff --git a/src/router/index.ts b/src/router/index.ts index 9598aa7..4f168d0 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -5,13 +5,12 @@ export const Layout = () => import("@/layout/index.vue"); // 静态路由 export const constantRoutes: RouteRecordRaw[] = [ - // 登录 { path: "/login", component: () => import("@/views/login/index.vue"), meta: { hidden: true }, - name:'login' + name: "login", }, { path: "/signSucceed", @@ -55,7 +54,8 @@ export const constantRoutes: RouteRecordRaw[] = [ }, }, ], - }, { + }, + { path: "/", component: Layout, redirect: "/myStore", @@ -72,7 +72,8 @@ export const constantRoutes: RouteRecordRaw[] = [ }, }, ], - }, { + }, + { path: "/", component: Layout, redirect: "/myAPI", @@ -108,7 +109,24 @@ export const constantRoutes: RouteRecordRaw[] = [ }, ], }, - + { + path: "/", + component: Layout, + redirect: "/model", + children: [ + { + path: "model", + component: () => import("@/views/mangage/model.vue"), + name: "model", + meta: { + title: "model", + icon: "homepage", + affix: true, + name: "modelMangage.title", + }, + }, + ], + }, ]; /** diff --git a/src/views/mangage/model.vue b/src/views/mangage/model.vue new file mode 100644 index 0000000..73dd3b3 --- /dev/null +++ b/src/views/mangage/model.vue @@ -0,0 +1,1992 @@ + + + + + +