sunchengjie 9 달 전
부모
커밋
7a3916a7d9
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      src/main.js

+ 2 - 2
src/main.js

@@ -54,7 +54,7 @@ router.beforeEach((to, from, next) => {
 			console.log('无openId')
 			getWxOpenId().then(() => {
 				
-				if(to.path == '/') {
+				if(to.path == '/' && from.path == '/') {
 					if(sessionstorage.getItem("isReload") === 'isReloadVlaue'){
 						next()
 						window.location.reload()
@@ -71,7 +71,7 @@ router.beforeEach((to, from, next) => {
 			console.log('overallExample.getOpenid()走完了')
 		} else {
 			console.log('什么都有')
-			if(to.path == '/') {
+			if(to.path == '/' && from.path == '/') {
 				if(sessionstorage.getItem("isReload") === 'isReloadVlaue'){
 					next()
 					window.location.reload()