mirror of
https://gitee.com/durcframework/SOP.git
synced 2025-08-12 07:02:14 +08:00
新增监控日志
This commit is contained in:
@@ -35,7 +35,7 @@ Object.assign(Vue.prototype, {
|
||||
const resp = response.data
|
||||
const code = resp.code
|
||||
if (!code || code === '-9') {
|
||||
that.$message.error('系统错误')
|
||||
that.$message.error(resp.msg || '系统错误')
|
||||
return
|
||||
}
|
||||
if (code === '-100' || code === '18' || code === '21') { // 未登录
|
||||
@@ -96,6 +96,9 @@ Object.assign(Vue.prototype, {
|
||||
},
|
||||
logout: function() {
|
||||
removeToken()
|
||||
this.$router.push({ path: `/login?redirect=${this.$route.fullPath}` })
|
||||
const fullPath = this.$route.fullPath
|
||||
if (fullPath.indexOf('login?redirect') === -1) {
|
||||
this.$router.push({ path: `/login?redirect=${fullPath}` })
|
||||
}
|
||||
}
|
||||
})
|
||||
|
Reference in New Issue
Block a user