+
@@ -101,7 +101,7 @@ export default {
top: 0;
height: 100%;
position: absolute;
- z-index: 999;
+ z-index: 2001;
}
.fixed-header {
@@ -121,5 +121,9 @@ export default {
width: 100%;
}
-.content_main{padding-top:91px;}
+.content_main{padding-top:141px;}
+
+.navbar_main{width:100%;position:fixed;top:91px;z-index:300;}
+
+
diff --git a/src/permission.js b/src/permission.js
index 0f0f9c4..d01d00d 100644
--- a/src/permission.js
+++ b/src/permission.js
@@ -14,18 +14,23 @@ const whiteList = ['/login'] // no redirect whitelist
router.beforeEach(async(to, from, next) => {
// start progress bar
NProgress.start()
-
+ //console.log(0)
// set page title
document.title = getPageTitle(to.meta.title)
- next()
+ //console.log(hasToken);
+ //next()
// determine whether the user has logged in
const hasToken = getToken()
-
+
if (hasToken) {
+ // console.log(1)
+ // console.log(to.path)
if (to.path === '/login') {
// if is logged in, redirect to the home page
next({ path: '/' })
NProgress.done()
+ }else{
+ next()
}
// else {
// const hasGetUserInfo = store.getters.name
@@ -48,11 +53,13 @@ router.beforeEach(async(to, from, next) => {
// }
} else {
/* has no token*/
-
+ //console.log(to.path)
if (whiteList.indexOf(to.path) !== -1) {
+ //console.log(2)
// in the free login whitelist, go directly
next()
} else {
+ //console.log(3)
// other pages that do not have permission to access are redirected to the login page.
next(`/login?redirect=${to.path}`)
NProgress.done()
diff --git a/src/store/modules/user.js b/src/store/modules/user.js
index 1465abe..bdb1d63 100644
--- a/src/store/modules/user.js
+++ b/src/store/modules/user.js
@@ -33,7 +33,7 @@ const actions = {
const { username, password, captcha} = userInfo
return new Promise((resolve, reject) => {
login({ username: username.trim(), password: password, captcha: captcha}).then(response => {
- const { data } = 1
+ const data = 1;
commit('SET_TOKEN', data)
setToken(data)
resolve(response)
@@ -44,25 +44,25 @@ const actions = {
},
// get user info
- getInfo({ commit, state }) {
- return new Promise((resolve, reject) => {
- getInfo(state.token).then(response => {
- const { data } = response
+// getInfo({ commit, state }) {
+// return new Promise((resolve, reject) => {
+// getInfo(state.token).then(response => {
+// const { data } = response
- if (!data) {
- return reject('Verification failed, please Login again.')
- }
+// if (!data) {
+// return reject('Verification failed, please Login again.')
+// }
- const { name, avatar } = data
+// const { name, avatar } = data
- commit('SET_NAME', name)
- commit('SET_AVATAR', avatar)
- resolve(data)
- }).catch(error => {
- reject(error)
- })
- })
- },
+// commit('SET_NAME', name)
+// commit('SET_AVATAR', avatar)
+// resolve(data)
+// }).catch(error => {
+// reject(error)
+// })
+// })
+// },
// user logout
logout({ commit, state }) {
diff --git a/src/styles/element-ui.scss b/src/styles/element-ui.scss
index a41481e..8f72ae9 100644
--- a/src/styles/element-ui.scss
+++ b/src/styles/element-ui.scss
@@ -49,3 +49,4 @@
}
.el-submenu__title i{color:#FFF;}
+.el-message{z-index:6000 !important;}
diff --git a/src/styles/index.scss b/src/styles/index.scss
index 7dcabab..cae485f 100644
--- a/src/styles/index.scss
+++ b/src/styles/index.scss
@@ -11,7 +11,10 @@
// text-rendering: optimizeLegibility;
// font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;
// }
-
+body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,textarea,select,p,blockquote,th,td{margin:0;padding:0;font-weight:inherit;}
+.vercenter{text-align:center !important;}
+.verleft{text-align:left !important;}
+.textright{text-align:right !important;}
label {
font-weight: 700;
}
@@ -59,7 +62,9 @@ div:focus {
}
}
+
// main-container global css
.app-container {
padding: 20px;
}
+// nprogress
diff --git a/src/styles/publics.scss b/src/styles/publics.scss
index e22f15b..e8ba18b 100644
--- a/src/styles/publics.scss
+++ b/src/styles/publics.scss
@@ -2,7 +2,7 @@
color: #FFF;
height: 91px;
padding: 0 6% 0 36px;
- z-index: 1002;
+ z-index: 2005;
background-color: #2b3245;
position: fixed;
top: 0;
@@ -48,13 +48,5 @@
background-color: #414758;
}
-.toptitle .avatark{height:20px;}
+.toptitle .avatark{display:inline-block;vertical-align:middle;}
.toptitle .avatark>img{width:58px;background-color:#409EFF;border-radius: 50%;}
-
-.svg-icon{
- width: 1em;
- height: 1em;
- vertical-align: -0.15em;
- fill: currentColor;
- overflow: hidden;
-}
\ No newline at end of file
diff --git a/src/styles/sidebar.scss b/src/styles/sidebar.scss
index f94617b..81a985e 100644
--- a/src/styles/sidebar.scss
+++ b/src/styles/sidebar.scss
@@ -17,7 +17,7 @@
top: 91px;
bottom: 0;
left: 0;
- z-index: 1888;
+ z-index: 2002;
overflow: hidden;
.el_submenu_link{width:76%;height:56px;z-index:100;position:absolute;left:0;top:0;bottom:0;right:10%;}
diff --git a/src/views/filemange/index.vue b/src/views/filemange/index.vue
index 1606441..16e4baa 100644
--- a/src/views/filemange/index.vue
+++ b/src/views/filemange/index.vue
@@ -110,7 +110,7 @@