| 
					
				 | 
			
			
				@@ -8,14 +8,14 @@ Component({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				const pages = getCurrentPages(), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					prevPage = pages[pages.length - 1]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				if (prevPage.route == 'pages/login/selectSite' || prevPage.route.includes('pages/tabbar/')) this.setData({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-					Permission: ['首页', '信息', '我的'] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					Permission: ['首页', '我的'] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	data: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		active: 'home', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Permission: ['首页', '信息', '我的'], //可看模块 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		Permission: ['首页', '我的'], //可看模块 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		tabbarList: [{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				icon: 'icon-a-biaoqianlanshouyexuanzhong', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				acicon: 'icon-a-biaoqianlanshouyexuanzhong', 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -23,13 +23,6 @@ Component({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				url: '/pages/tabbar/home/index', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				name: 'home' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				icon: 'icon-a-biaoqianlanxiaoxi', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				acicon: 'icon-a-biaoqianlanxiaoxixuanzhong', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				text: '信息', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				url: '/pages/tabbar/message/index', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				name: 'message' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				icon: 'icon-a-biaoqianlanwode', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				acicon: 'icon-a-biaoqianlanwodexuanzhong', 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -56,34 +49,6 @@ Component({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			this.setData({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				active: obj.name 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			}); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			//socket 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			if (!getApp().globalData.socketEstablish) getApp().initSocket(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			if (!getApp().globalData.socketCallback) getApp().globalData.socketCallback = this.unReadMessageCount.bind(this); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			this.setUnReadMessageCount(getApp().globalData.fcount); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		/* 设置未读数量 */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		setUnReadMessageCount(fcount) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			let i = this.data.tabbarList.findIndex(v => v.text == '信息'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			this.setData({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				[`tabbarList[${i}].fcount`]: fcount 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		/* 更新信息数量 */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		unReadMessageCount() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			_Http.basic({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				"classname": "system.message.Message", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				"method": "unReadMessageCount", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				"content": { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-					nocache: true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			}, false).then(res => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				console.log('信息数量', res) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				if (res.msg != '成功') return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				let fcount = res.data.fcount > 99 ? '99+' : res.data.fcount; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				if (res.data.fcount == 0) fcount = ""; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				getApp().globalData.fcount = fcount; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				this.setUnReadMessageCount(fcount); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 }) 
			 |