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()