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