| 
					
				 | 
			
			
				@@ -9,11 +9,15 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <script> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	import { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	useTabBarHistory 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		useTabBarHistory 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	} from '@/utils/emitEvents.js'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	import { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		toast 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	} from '@/utils/common' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	import cacheManager from "@/utils/cacheManager.js"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	import { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		getUserIdentity 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	} from "@/utils/common.js" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		data() { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -30,45 +34,37 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 						iconPath: 'static/images/tabbar/unselect/my-sj.png', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 						path: `/pages/my/index` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-					// 更多 Tab 项... 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		props: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			nianji: {  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				type: String, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			cardId: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				type: String, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			zhangId: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				type: String, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		methods: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			switchTab(path, params = {}) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				if(path =='/pages/study/index2'||path =='/pages/study/index3'){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-					toast("此功能页面暂未开放!") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-					return false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				if (getUserIdentity() == 'Visitor') { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					uni.redirectTo({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+						url: path + '?nianji=' + this.nianji + '&cardId=' + this.cardId + '&zhangId=' + this 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+							.zhangId 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					}); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				let storage = useTabBarHistory().getTabBarStorage() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				let queryString = Object.keys(storage).map(key => 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-					`${encodeURIComponent(key)}=${encodeURIComponent(storage[key])}`).join('&'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				if (queryString) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-					path += `?${queryString}`; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				}			 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				uni.navigateTo({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-					url: path 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				}); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				// 使用 uni.switchTab 进行跳转(适用于 tabBar 页面) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				// if (this.isTabBarPage(path)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				//   uni.switchTab({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				//     url: path 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				//   }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				// } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				//   // 使用 uni.navigateTo 进行跳转(适用于非 tabBar 页面) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				//   uni.navigateTo({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				//     url: path 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				//   }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				// } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			isTabBarPage(path) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				// 根据你的 tabBar 页面路径进行判断 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				const tabBarPages = ['/pages/study/index', '/pages/study/index', '/pages/study/index', '/pages/my/index']; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				return tabBarPages.includes(path); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		created() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			console.log(this.nianji); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	} 
			 |