| 
					
				 | 
			
			
				@@ -50,11 +50,31 @@ Page({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     let bd = util.formatTime(bdd).substring(0, 10).replace(/\//g, '-') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     let edd = new Date(now.setDate(now.getDate() + this.data.dayScope)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     let ed = util.formatTime(edd).substring(0, 10).replace(/\//g, '-') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    this.setData({ beginDate: bd, endDate: ed, list: [] }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    if (o.action == '3') { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      // 根据curDate 算出前后七天, 其实时间晚于当天,已次日为其实时间 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      // console.log('item.queryDate : ' + item.curDate); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      const temDate = new Date(s.attenceDate.replace(/-/g, '/') + ' 00:00:00') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      temDate.setDate(temDate.getDate() + 7); // 一周后 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      ed = temDate.getFullYear() + '-' + this.addZero(temDate.getMonth() + 1) + '-' + this.addZero(temDate.getDate()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      // console.log('ed : ' + ed); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      temDate.setDate(temDate.getDate() - 14); // 往前推2周 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      bd = temDate.getFullYear() + '-' + this.addZero(temDate.getMonth() + 1) + '-' + this.addZero(temDate.getDate()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      // console.log('bd : ' + bd); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      // 如果早于当前日期 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      let nextDay = util.formatTime(new Date(new Date().getTime() + 86400000)).substring(0, 10).replace(/\//g, '-') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      // console.log('nextDay : ' + nextDay); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      if (parseInt(bd.replace(/-/g, '')) < parseInt(nextDay.replace(/-/g, ''))) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        bd = nextDay; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    this.setData({ beginDate: bd, endDate: ed, list: [] }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     this.queryList() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  addZero: function (n) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    return (n < 10 ? '0' : '') + n; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    * 生命周期函数--监听页面初次渲染完成 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    */ 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -221,7 +241,7 @@ Page({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           this.setData({ list: classItem }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           wx.hideLoading() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          if(classItem.length <= 0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          if (classItem.length <= 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             wx.showModal({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               title: '提示', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               content: '暂无目标课程', 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -230,7 +250,7 @@ Page({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               cancelColor: '#999999', //取消文字的颜色 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               confirmText: "确定", //默认是“确定” 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               // confirmColor: 'skyblue', //确定文字的颜色 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              success(){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              success() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 wx.navigateBack({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                   delta: 1, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 }) 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -316,7 +336,7 @@ Page({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           let tempItems = []; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           if (this.len(c.beginTime) > 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             let bt = c.beginTime.replace('T', ' ').substring(0, 16) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            item.newDate = bt.substring(0.10) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            item.newDate = bt.substring(0, 10) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             item.beginTime = bt.substring(11); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             item.endTime = this.addZero(it.endHours) + ':' + this.addZero(it.endMinutes); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             tempItems.push(item); 
			 |