登录功能完成

This commit is contained in:
2024-08-13 19:53:34 +08:00
parent 23fad30ea6
commit aa285cf04e
11 changed files with 14 additions and 11 deletions

View File

@ -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)
})
},

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}