登录功能完成
This commit is contained in:
parent
d433cc75f6
commit
23fad30ea6
|
|
@ -241,6 +241,7 @@ export default {
|
|||
onLogout() {
|
||||
loginOut().then(res => {
|
||||
location.href = '/login#/container/login'
|
||||
localStorage.setItem('isLogin', false)
|
||||
})
|
||||
},
|
||||
// 获取登录信息
|
||||
|
|
@ -248,6 +249,7 @@ export default {
|
|||
initInfo().then(res => {
|
||||
Cookies.set('JSESSIONID', res.map.FrameSessionId);
|
||||
this.isLogin = res.login
|
||||
localStorage.setItem('isLogin', res.login)
|
||||
if (this.isLogin) {
|
||||
this.menuList = this.adminMenu
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -91,7 +91,11 @@ export default {
|
|||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
const isLogin = localStorage.getItem('isLogin')
|
||||
if (isLogin == 'false') {
|
||||
this.$router.push({ name: 'home' })
|
||||
return
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleBtn(item) {
|
||||
|
|
|
|||
|
|
@ -247,6 +247,11 @@ export default {
|
|||
}
|
||||
},
|
||||
created() {
|
||||
const isLogin = localStorage.getItem('isLogin')
|
||||
if (isLogin == 'false') {
|
||||
this.$router.push({ name: 'home' })
|
||||
return
|
||||
}
|
||||
this.getData()
|
||||
},
|
||||
methods: {
|
||||
|
|
|
|||
|
|
@ -119,6 +119,11 @@ export default {
|
|||
}
|
||||
},
|
||||
created() {
|
||||
const isLogin = localStorage.getItem('isLogin')
|
||||
if (isLogin == 'false') {
|
||||
this.$router.push({ name: 'home' })
|
||||
return
|
||||
}
|
||||
this.getData()
|
||||
},
|
||||
methods: {
|
||||
|
|
|
|||
|
|
@ -119,6 +119,11 @@ export default {
|
|||
}
|
||||
},
|
||||
created() {
|
||||
const isLogin = localStorage.getItem('isLogin')
|
||||
if (isLogin == 'false') {
|
||||
this.$router.push({ name: 'home' })
|
||||
return
|
||||
}
|
||||
this.getData()
|
||||
},
|
||||
methods: {
|
||||
|
|
|
|||
|
|
@ -119,6 +119,11 @@ export default {
|
|||
}
|
||||
},
|
||||
created() {
|
||||
const isLogin = localStorage.getItem('isLogin')
|
||||
if (isLogin == 'false') {
|
||||
this.$router.push({ name: 'home' })
|
||||
return
|
||||
}
|
||||
this.getData()
|
||||
},
|
||||
methods: {
|
||||
|
|
|
|||
|
|
@ -142,6 +142,11 @@ export default {
|
|||
}
|
||||
},
|
||||
created() {
|
||||
const isLogin = localStorage.getItem('isLogin')
|
||||
if (isLogin == 'false') {
|
||||
this.$router.push({ name: 'home' })
|
||||
return
|
||||
}
|
||||
this.getData()
|
||||
},
|
||||
methods: {
|
||||
|
|
|
|||
|
|
@ -109,6 +109,11 @@ export default {
|
|||
}
|
||||
},
|
||||
created() {
|
||||
const isLogin = localStorage.getItem('isLogin')
|
||||
if (isLogin == 'false') {
|
||||
this.$router.push({ name: 'home' })
|
||||
return
|
||||
}
|
||||
this.getData()
|
||||
},
|
||||
methods: {
|
||||
|
|
|
|||
|
|
@ -218,6 +218,11 @@ export default {
|
|||
}
|
||||
},
|
||||
created() {
|
||||
const isLogin = localStorage.getItem('isLogin')
|
||||
if (isLogin == 'false') {
|
||||
this.$router.push({ name: 'home' })
|
||||
return
|
||||
}
|
||||
// this.init()
|
||||
},
|
||||
methods: {
|
||||
|
|
|
|||
|
|
@ -136,6 +136,11 @@ export default {
|
|||
}
|
||||
},
|
||||
created() {
|
||||
const isLogin = localStorage.getItem('isLogin')
|
||||
if (isLogin == 'false') {
|
||||
this.$router.push({ name: 'home' })
|
||||
return
|
||||
}
|
||||
// this.init()
|
||||
},
|
||||
methods: {
|
||||
|
|
|
|||
|
|
@ -246,6 +246,11 @@ export default {
|
|||
}
|
||||
},
|
||||
created() {
|
||||
const isLogin = localStorage.getItem('isLogin')
|
||||
if (isLogin == 'false') {
|
||||
this.$router.push({ name: 'home' })
|
||||
return
|
||||
}
|
||||
// this.init()
|
||||
const arr = [
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue