Skip to content

Commit 03899a2

Browse files
authored
fix(core): Cancel the automatic logout operate if the current user is not logged in (#372)
fix #369
1 parent f7360bf commit 03899a2

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/lin/plugin/auto-jump.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,13 @@
22
import Vue from 'vue'
33
import Config from '@/config'
44
import store from '@/store'
5+
import router from '@/router'
56

67
const Plugin = {
78
install(vue) {
8-
// eslint-disable-next-line
99
vue.prototype.$_lin_jump = () => {
10-
// eslint-disable-line
11-
if (!Config.openAutoJumpOut) {
12-
return
13-
}
10+
if (router.currentRoute.path === '/' || router.currentRoute.path === '/login' || !Config.openAutoJumpOut) return
11+
1412
clearTimeout(this.timer)
1513
this.timer = setTimeout(() => {
1614
store.dispatch('loginOut')

0 commit comments

Comments
 (0)