sunchengjie hai 9 meses
pai
achega
de14f9aae6
Modificáronse 1 ficheiros con 3 adicións e 3 borrados
  1. 3 3
      src/main.js

+ 3 - 3
src/main.js

@@ -46,7 +46,7 @@ const whiteList = ['/Login']
 router.beforeEach((to, from, next) => {
 	// if (to.matched.some(record => record.meta.needLogin)) { // 判断该路由是否需要登录权限
 	if (!whiteList.includes(to.path)) {
-		console.log('有登录权限',to,to.path)
+		console.log('有登录权限',to,to.path,from)
 		if (!localStorage.getItem('courierUserId')) { // 判断当前用户的登录信息userId是否存在
 			console.log('无userId')
 			next('/Login')
@@ -55,7 +55,7 @@ router.beforeEach((to, from, next) => {
 			getWxOpenId().then(() => {
 				if(to.path == '/') {
 					console.log('window.location.reload()')
-					window.location.reload()
+					// window.location.reload()
 					next()
 				}else {
 					next()
@@ -66,7 +66,7 @@ router.beforeEach((to, from, next) => {
 			console.log('什么都有')
 			if(to.path == '/') {
 				console.log('window.location.reload()')
-				window.location.reload()
+				// window.location.reload()
 				next()
 			}else {
 				next()