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