修复修改密码后,返回登录页面404
parent
e8293f88d1
commit
6b74b78223
|
@ -8,6 +8,7 @@ var routers
|
||||||
router.beforeEach((to, from, next) => {
|
router.beforeEach((to, from, next) => {
|
||||||
if (to.path == `/login`) {
|
if (to.path == `/login`) {
|
||||||
sessionStorage.clear()
|
sessionStorage.clear()
|
||||||
|
routers = null
|
||||||
}
|
}
|
||||||
if (sessionStorage.getItem('user')) {
|
if (sessionStorage.getItem('user')) {
|
||||||
if (!routers) {
|
if (!routers) {
|
||||||
|
|
|
@ -137,7 +137,7 @@ import Screenfull from '@/components/Screenfull'
|
||||||
import SizeSelect from '@/components/SizeSelect'
|
import SizeSelect from '@/components/SizeSelect'
|
||||||
import { requestFN } from '@/utils/request'
|
import { requestFN } from '@/utils/request'
|
||||||
import { upload } from '@/utils/upload'
|
import { upload } from '@/utils/upload'
|
||||||
import { MessageBox } from 'element-ui'
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
Breadcrumb,
|
Breadcrumb,
|
||||||
|
@ -362,13 +362,13 @@ export default {
|
||||||
// this.fwebsocket.close()
|
// this.fwebsocket.close()
|
||||||
// this.fwebsocket && this.fwebsocket.close()
|
// this.fwebsocket && this.fwebsocket.close()
|
||||||
sessionStorage.clear()
|
sessionStorage.clear()
|
||||||
location.reload()
|
this.$router.push('/login')
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
// this.fwebsocket.close()
|
// this.fwebsocket.close()
|
||||||
this.fwebsocket && this.fwebsocket.close()
|
this.fwebsocket && this.fwebsocket.close()
|
||||||
sessionStorage.clear()
|
sessionStorage.clear()
|
||||||
location.reload()
|
this.$router.push('/login')
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
changePassword() {
|
changePassword() {
|
||||||
|
@ -402,12 +402,10 @@ export default {
|
||||||
OPERATIONTYPE: '1' }
|
OPERATIONTYPE: '1' }
|
||||||
).then((data) => {
|
).then((data) => {
|
||||||
if (this.userForm.newpwd) {
|
if (this.userForm.newpwd) {
|
||||||
MessageBox.alert('密码修改成功,请重新登录!', {
|
this.$alert('密码修改成功,请重新登录!', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
callback: action => {
|
callback: action => {
|
||||||
sessionStorage.clear()
|
|
||||||
this.goOut()
|
this.goOut()
|
||||||
location.reload()
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -131,12 +131,10 @@ export default {
|
||||||
BZ: this.userForm.BZ,
|
BZ: this.userForm.BZ,
|
||||||
OPERATIONTYPE: '1' }
|
OPERATIONTYPE: '1' }
|
||||||
).then((data) => {
|
).then((data) => {
|
||||||
MessageBox.alert('密码修改成功,请重新登录!', {
|
this.$alert('密码修改成功,请重新登录!', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
callback: action => {
|
callback: action => {
|
||||||
sessionStorage.clear()
|
|
||||||
this.goOut()
|
this.goOut()
|
||||||
location.reload()
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.dialogFormEdit = false
|
this.dialogFormEdit = false
|
||||||
|
@ -155,14 +153,12 @@ export default {
|
||||||
).then((data) => {
|
).then((data) => {
|
||||||
// this.fwebsocket.close()
|
// this.fwebsocket.close()
|
||||||
sessionStorage.clear()
|
sessionStorage.clear()
|
||||||
window.location.href = localStorage.getItem('out_url')
|
this.$router.push('/login')
|
||||||
// window.location.href = 'http://192.168.0.112:8080/'
|
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
// this.fwebsocket.close()
|
// this.fwebsocket.close()
|
||||||
sessionStorage.clear()
|
sessionStorage.clear()
|
||||||
window.location.href = localStorage.getItem('out_url')
|
this.$router.push('/login')
|
||||||
// window.location.href = 'http://192.168.0.112:8080/'
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
closeWarn(){
|
closeWarn(){
|
||||||
|
|
Loading…
Reference in New Issue