|
@@ -3,8 +3,9 @@ import store from './store'
|
|
|
import { Message } from 'element-ui'
|
|
|
import NProgress from 'nprogress' // progress bar
|
|
|
import 'nprogress/nprogress.css' // progress bar style
|
|
|
-import { getToken } from '@/utils/auth' // get token from cookie
|
|
|
+import { getToken,setUserUrl } from '@/utils/auth' // get token from cookie
|
|
|
import getPageTitle from '@/utils/get-page-title'
|
|
|
+import URL from '@/utils/baseUrl';
|
|
|
|
|
|
NProgress.configure({ showSpinner: false }) // NProgress Configuration
|
|
|
|
|
@@ -66,6 +67,7 @@ router.beforeEach(async(to, from, next) => {
|
|
|
// other pages that do not have permission to access are redirected to the login page.
|
|
|
next(`/login?redirect=${to.path}`)
|
|
|
NProgress.done()
|
|
|
+ setUserUrl(URL.webUrl, 86400)
|
|
|
}
|
|
|
}
|
|
|
})
|