提交数据
This commit is contained in:
parent
a88cac36aa
commit
388577a540
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 127 KiB |
|
|
@ -30,6 +30,7 @@ router.beforeEach(async(to, from, next) => {
|
||||||
// 路由添加进去了没有及时更新 需要重新进去一次拦截
|
// 路由添加进去了没有及时更新 需要重新进去一次拦截
|
||||||
|
|
||||||
if(!store.state.permission.routes.length){
|
if(!store.state.permission.routes.length){
|
||||||
|
|
||||||
// 获取权限列表进行接口访问 因为这里页面要切换权限
|
// 获取权限列表进行接口访问 因为这里页面要切换权限
|
||||||
// const roles = await store.dispatch('user/getInfo')
|
// const roles = await store.dispatch('user/getInfo')
|
||||||
const accessRoutes = await store.dispatch('permission/generateRoutes', store.getters.roles)
|
const accessRoutes = await store.dispatch('permission/generateRoutes', store.getters.roles)
|
||||||
|
|
|
||||||
|
|
@ -57,11 +57,12 @@ const actions = {
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
// 在这判断是否有权限,哪些角色拥有哪些权限
|
// 在这判断是否有权限,哪些角色拥有哪些权限
|
||||||
let accessedRoutes
|
let accessedRoutes
|
||||||
if (roles.includes('admin')) {
|
if (roles&&roles.length) {
|
||||||
accessedRoutes = asyncRoutes || []
|
|
||||||
} else {
|
|
||||||
accessedRoutes = filterAsyncRoutes(asyncRoutes, roles)
|
accessedRoutes = filterAsyncRoutes(asyncRoutes, roles)
|
||||||
|
} else {
|
||||||
|
accessedRoutes = asyncRoutes || []
|
||||||
}
|
}
|
||||||
|
|
||||||
commit('SET_ROUTES', accessedRoutes)
|
commit('SET_ROUTES', accessedRoutes)
|
||||||
resolve(accessedRoutes)
|
resolve(accessedRoutes)
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,13 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="login-container">
|
<div class="login-container">
|
||||||
|
<video
|
||||||
|
poster="@/assets/mp4/3.jpeg"
|
||||||
|
loop
|
||||||
|
autoplay
|
||||||
|
muted
|
||||||
|
>
|
||||||
|
<source src="@/assets/mp4/2.mp4">
|
||||||
|
</video>
|
||||||
<div class="login-box">
|
<div class="login-box">
|
||||||
<!--登录功能-->
|
<!--登录功能-->
|
||||||
<div style="color: white;text-align: center;margin-bottom: 15px">登录系统-密码账号随便填 admin admin</div>
|
<div style="color: white;text-align: center;margin-bottom: 15px">登录系统-密码账号随便填 admin admin</div>
|
||||||
|
|
@ -105,10 +113,21 @@
|
||||||
max-width: 500px;
|
max-width: 500px;
|
||||||
}
|
}
|
||||||
.login-container{
|
.login-container{
|
||||||
|
video{
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
-o-object-fit: cover;
|
||||||
|
object-fit: cover;
|
||||||
|
z-index: -1;
|
||||||
|
}
|
||||||
min-height: 100%;
|
min-height: 100%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
background: #2d3a4b;
|
|
||||||
background-size:cover;
|
background-size:cover;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue