| 
					
				 | 
			
			
				@@ -6,6 +6,7 @@ Page({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	data: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		PageCur: 'Home', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		collectCount: "", //购物车商品数量 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		msgList: [] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	onLoad(options) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		if (options.PageCur) this.setData({ 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -13,7 +14,9 @@ Page({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		this.refreshData(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		this.getCollectCount(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		this.updateMsgCount(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		getApp().globalData.getCollectCount = this.getCollectCount.bind(this); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		getApp().globalData.socketCallback = this.updateMsgCount.bind(this); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	/** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	 * 更新站点信息 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -37,7 +40,7 @@ Page({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					icon: "work-shangcheng" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				}, { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					name: "销售订单", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-					PageCur: "OrderForm", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					path: "/packageA/orderForm/index", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					icon: "work-dingdan" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				}, { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					name: "账户", 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -145,6 +148,8 @@ Page({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				bannerList: banner ? banner.ads : [] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			}); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			pageInit.Home = true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      page.selectComponent("#ListBox").setHeight(".head", page); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		} else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			setTimeout(this.refreshData, 10); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			return; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -167,13 +172,51 @@ Page({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			return res.data.num; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		}); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	/* 更新消息数量 */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	updateMsgCount() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		pageInit.Message = false; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		_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 = ""; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			this.setData({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				fcount 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		}); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		_Http.basic({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			"classname": "system.message.Message", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			"method": "queryMessage", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			content: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				nocache: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				pageNumber: 1, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				pageSize: 3, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				pageTotal: 1, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				type: "", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				where: {} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		}).then(res => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			if (res.msg != '成功') return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			this.selectComponent("#Home").setData({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				msgList: res.data 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	/**  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	 * 切换页面 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	 */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	NavChange(e) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		this.cutBar({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			detail: e.currentTarget.dataset.cur 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		}); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		if (!getApp().globalData.socketEstablish) getApp().initSocket(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	/**  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	 * 切换bar 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -189,5 +232,5 @@ Page({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		this.setData({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			PageCur: detail 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 }) 
			 |