| | |
| | | <template> |
| | | <div class="login-panel"> |
| | | <div class="login-img"> |
| | | <img src="src/assets/images/loginImg.png"> |
| | | <img :src="loginImgPng"> |
| | | </div> |
| | | <el-form ref="loginRef" :model="loginForm" :rules="loginRules" class="login-form"> |
| | | <h3 class="title">登录系统</h3> |
| | |
| | | import { Register } from "@/layout/components"; |
| | | import { Base64 } from 'js-base64' |
| | | import menu from "@/layout/components/Sidebar/menu"; |
| | | import loginImgPng from "@/assets/images/loginImg.png" |
| | | |
| | | const userStore = useUserStore() |
| | | const route = useRoute(); |
| | |
| | | // return acc; |
| | | // }, {}); |
| | | const userInfo = JSON.parse(Cookies.get('userInfo')) |
| | | if(userInfo.identity === 0 || userInfo.identity === 1 ) { |
| | | if(userInfo.identity === 0 ) { |
| | | sidebarRouters.value = menu.adminMenu |
| | | Cookies.set('routers',JSON.stringify(sidebarRouters.value)) |
| | | }else if(userInfo.identity === 1) { |
| | | sidebarRouters.value = menu.agencyMenu |
| | | Cookies.set('routers',JSON.stringify(sidebarRouters.value)) |
| | | } |
| | | let path = "" |
| | | if(sidebarRouters.value[0].children && sidebarRouters.value[0].children.length > 0){ |
| | | path = sidebarRouters.value[0].path + '/'+ sidebarRouters.value[0].children[0].path |
| | | }else { |
| | | path = sidebarRouters.value[0].path |
| | | } |
| | | |
| | | router.push({ |
| | | path: sidebarRouters.value[0].path |
| | | path: path |
| | | }) |
| | | // router.push({ path: redirect.value || "/", query: otherQueryParams }); |
| | | }).catch(() => { |