diff --git a/src/router/index.ts b/src/router/index.ts index 625cbd2..a13814c 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -2,6 +2,8 @@ import { createRouter, createWebHistory, RouteRecordRaw } from "vue-router"; import Login from "@/views/login/index.vue"; //登录组件 import Layout from "@/views/layout/index.vue"; //首页布局 import CallBack from "@/views/login/OauthCallBack.vue"; //反馈页面 +import Home from '@/views/home/index.vue'; //家 +import Auth from '@/views/role/pages/Auth.vue'; //权限管理 const routes: Array = [ { @@ -18,6 +20,19 @@ const routes: Array = [ path: "/layout", name: "Layout", component: Layout, + children:[ + { + path:'', + name:'home', + component:Home, + }, + // 后续用动态菜单 + { + path:'role', + name:'roleAuth', + component:Auth + } + ] }, ]; diff --git a/src/views/home/index.vue b/src/views/home/index.vue new file mode 100644 index 0000000..ea74d7c --- /dev/null +++ b/src/views/home/index.vue @@ -0,0 +1,8 @@ + + + + \ No newline at end of file diff --git a/src/views/layout/components/LayoutHeader.vue b/src/views/layout/components/LayoutHeader.vue new file mode 100644 index 0000000..24db979 --- /dev/null +++ b/src/views/layout/components/LayoutHeader.vue @@ -0,0 +1,125 @@ + + + + \ No newline at end of file diff --git a/src/views/layout/components/LayoutNav.vue b/src/views/layout/components/LayoutNav.vue new file mode 100644 index 0000000..ea3d308 --- /dev/null +++ b/src/views/layout/components/LayoutNav.vue @@ -0,0 +1,99 @@ + + + + \ No newline at end of file diff --git a/src/views/layout/index.vue b/src/views/layout/index.vue index e8cff13..a887347 100644 --- a/src/views/layout/index.vue +++ b/src/views/layout/index.vue @@ -1,10 +1,12 @@ + \ No newline at end of file diff --git a/src/views/login/index.vue b/src/views/login/index.vue index ea8edc7..6136b41 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -211,14 +211,10 @@ const handleDemo = () => { console.log('观看演示'); } -const { loginWithRedirect, logout } = useAuth0(); +const { loginWithRedirect } = useAuth0(); const handleLogin = () => { loginWithRedirect(); } -// 登出 -const handleLogout = () => { - logout({ logoutParams: { returnTo: window.location.origin } }); -} // 联系我们 const handleContact = () => { dialog.warning({ diff --git a/src/views/role/pages/Auth.vue b/src/views/role/pages/Auth.vue new file mode 100644 index 0000000..65a85b5 --- /dev/null +++ b/src/views/role/pages/Auth.vue @@ -0,0 +1,8 @@ + + + + \ No newline at end of file