登录功能完成
This commit is contained in:
parent
23fad30ea6
commit
aa285cf04e
|
|
@ -240,7 +240,10 @@ export default {
|
|||
// 退出登录
|
||||
onLogout() {
|
||||
loginOut().then(res => {
|
||||
location.href = '/login#/container/login'
|
||||
location.href = '/#/container/login'
|
||||
setTimeout(() => {
|
||||
location.reload()
|
||||
}, 100)
|
||||
localStorage.setItem('isLogin', false)
|
||||
})
|
||||
},
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ export default {
|
|||
},
|
||||
created() {
|
||||
const isLogin = localStorage.getItem('isLogin')
|
||||
if (isLogin == 'false') {
|
||||
if (isLogin == 'false' || isLogin == '' || isLogin == undefined) {
|
||||
this.$router.push({ name: 'home' })
|
||||
return
|
||||
}
|
||||
|
|
|
|||
|
|
@ -248,7 +248,7 @@ export default {
|
|||
},
|
||||
created() {
|
||||
const isLogin = localStorage.getItem('isLogin')
|
||||
if (isLogin == 'false') {
|
||||
if (isLogin == 'false' || isLogin == '' || isLogin == undefined) {
|
||||
this.$router.push({ name: 'home' })
|
||||
return
|
||||
}
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ export default {
|
|||
},
|
||||
created() {
|
||||
const isLogin = localStorage.getItem('isLogin')
|
||||
if (isLogin == 'false') {
|
||||
if (isLogin == 'false' || isLogin == '' || isLogin == undefined) {
|
||||
this.$router.push({ name: 'home' })
|
||||
return
|
||||
}
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ export default {
|
|||
},
|
||||
created() {
|
||||
const isLogin = localStorage.getItem('isLogin')
|
||||
if (isLogin == 'false') {
|
||||
if (isLogin == 'false' || isLogin == '' || isLogin == undefined) {
|
||||
this.$router.push({ name: 'home' })
|
||||
return
|
||||
}
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ export default {
|
|||
},
|
||||
created() {
|
||||
const isLogin = localStorage.getItem('isLogin')
|
||||
if (isLogin == 'false') {
|
||||
if (isLogin == 'false' || isLogin == '' || isLogin == undefined) {
|
||||
this.$router.push({ name: 'home' })
|
||||
return
|
||||
}
|
||||
|
|
|
|||
|
|
@ -143,7 +143,7 @@ export default {
|
|||
},
|
||||
created() {
|
||||
const isLogin = localStorage.getItem('isLogin')
|
||||
if (isLogin == 'false') {
|
||||
if (isLogin == 'false' || isLogin == '' || isLogin == undefined) {
|
||||
this.$router.push({ name: 'home' })
|
||||
return
|
||||
}
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ export default {
|
|||
},
|
||||
created() {
|
||||
const isLogin = localStorage.getItem('isLogin')
|
||||
if (isLogin == 'false') {
|
||||
if (isLogin == 'false' || isLogin == '' || isLogin == undefined) {
|
||||
this.$router.push({ name: 'home' })
|
||||
return
|
||||
}
|
||||
|
|
|
|||
|
|
@ -219,7 +219,7 @@ export default {
|
|||
},
|
||||
created() {
|
||||
const isLogin = localStorage.getItem('isLogin')
|
||||
if (isLogin == 'false') {
|
||||
if (isLogin == 'false' || isLogin == '' || isLogin == undefined) {
|
||||
this.$router.push({ name: 'home' })
|
||||
return
|
||||
}
|
||||
|
|
|
|||
|
|
@ -137,7 +137,7 @@ export default {
|
|||
},
|
||||
created() {
|
||||
const isLogin = localStorage.getItem('isLogin')
|
||||
if (isLogin == 'false') {
|
||||
if (isLogin == 'false' || isLogin == '' || isLogin == undefined) {
|
||||
this.$router.push({ name: 'home' })
|
||||
return
|
||||
}
|
||||
|
|
|
|||
|
|
@ -247,7 +247,7 @@ export default {
|
|||
},
|
||||
created() {
|
||||
const isLogin = localStorage.getItem('isLogin')
|
||||
if (isLogin == 'false') {
|
||||
if (isLogin == 'false' || isLogin == '' || isLogin == undefined) {
|
||||
this.$router.push({ name: 'home' })
|
||||
return
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue