wangxy il y a 2 mois
Parent
commit
7b639e7966
2 fichiers modifiés avec 22 ajouts et 1 suppressions
  1. 21 0
      App.vue
  2. 1 1
      components/custom-tabbar/custom-tabbar.vue

+ 21 - 0
App.vue

@@ -49,6 +49,27 @@
 			// 		url: '/pages/login/index' 
 			// 	});
 			// }
+			
+			if (cacheManager.get('auth')) {
+				uni.reLaunch({
+					url: `/pages/study/index`,
+					success() {
+						  plus.navigator.closeSplashscreen();
+					}
+				})
+			}else if(cacheManager.get('wxLogin') &&!(cacheManager.get('wxLogin').bind)){
+					console.log('微信登录且未绑定')
+				// 微信登录且未绑定 
+			} else {
+				cacheManager.clearAll()
+				uni.reLaunch({
+					url: '/pages/login/index' ,
+					success() {
+						  plus.navigator.closeSplashscreen();
+					}
+				});
+			}
+			
 			const webview = plus.webview.currentWebview();
 			plus.key.addEventListener('backbutton', () => {
 				const store = useIsCanBack();

+ 1 - 1
components/custom-tabbar/custom-tabbar.vue

@@ -110,7 +110,7 @@
 						});
 						return;
 					} */
-					uni.redirectTo({
+					uni.navigateTo({
 						url: path,
 						"animationType": "fade-in",
 						"animationDuration":0