|
|
@@ -40,7 +40,6 @@ const whiteList = ['/login', '/register', '/forget', '/authredirect']
|
|
|
* 权限验证
|
|
|
*/
|
|
|
router.beforeEach(async(to, from, next) => {
|
|
|
- console.log(window.location)
|
|
|
const parmObj = {}
|
|
|
if (window.location.search !== '') {
|
|
|
const str = window.location.search.slice(1, window.location.search.length)
|
|
|
@@ -48,10 +47,11 @@ router.beforeEach(async(to, from, next) => {
|
|
|
if (strArr.length > 0) {
|
|
|
strArr.forEach((e, i) => {
|
|
|
const arr = e.split('=')
|
|
|
- parmObj[arr[0]] = arr[1]
|
|
|
+ if (e !== '') {
|
|
|
+ parmObj[arr[0]] = arr[1]
|
|
|
+ }
|
|
|
})
|
|
|
}
|
|
|
- console.log(router, str)
|
|
|
}
|
|
|
// 进度条
|
|
|
NProgress.start()
|