sunchengjie 9 miesięcy temu
rodzic
commit
5a292d3c77
1 zmienionych plików z 4 dodań i 4 usunięć
  1. 4 4
      src/main.js

+ 4 - 4
src/main.js

@@ -56,13 +56,13 @@ router.beforeEach((to, from, next) => {
 				
 				if(to.path == '/' && from.path == '/') {
 					if(localStorage.getItem("isReload") === 'isReloadVlaue'){
-						next()
 						console.log('有isReloadVlaue')
+						next()
 					}else{
 						localStorage.setItem("isReload",'isReloadVlaue')
+						console.log('无isReloadVlaue')
 						next()
 						window.location.reload()
-						console.log('无isReloadVlaue')
 					}
 				}else {
 					next()
@@ -73,13 +73,13 @@ router.beforeEach((to, from, next) => {
 			console.log('什么都有')
 			if(to.path == '/' && from.path == '/') {
 				if(localStorage.getItem("isReload") === 'isReloadVlaue'){
-					next()
 					console.log('有isReloadVlaue')
+					next()
 				}else{
 					localStorage.setItem("isReload",'isReloadVlaue')
+					console.log('无isReloadVlaue')
 					next()
 					window.location.reload()
-					console.log('无isReloadVlaue')
 				}
 			}else {
 				next()