sunchengjie il y a 9 mois
Parent
commit
7a3916a7d9
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  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()