Przeglądaj źródła

Merge branch 'master' of https://gitee.com/he2802/saas_applet

chenxiong 3 lat temu
rodzic
commit
320f49a2a0
1 zmienionych plików z 10 dodań i 7 usunięć
  1. 10 7
      pages2/plan/index.vue

+ 10 - 7
pages2/plan/index.vue

@@ -222,6 +222,7 @@ export default {
 			});
 		},
 		swipeMonth(index) {
+			console.log(index,198)
 			this.isOpen = false;
 			this.haveNextMonth = false;
 			this.havePreviousMonth = false;
@@ -230,6 +231,7 @@ export default {
 			let item = this.listItem.calendarStudyVo[this.monthIndex];
 			this.calendarStudyVo = item;
 			this.workList = this.calendarStudyVo.goodsVos;
+			console.log(this.monthIndex,98)
 			if (this.monthIndex > 0) {
 				this.havePreviousMonth = true;
 			}
@@ -273,9 +275,9 @@ export default {
 			let date = new Date();
 			let num = date.getDate();
 			
-			/* for (let i = 0; i < firstItem.studyDay; i++) {
+			 for (let i = 0; i < firstItem.studyDay; i++) {
 				this.calendarStudyVo.dayStudyList.unshift({ date: 0 });
-			} */
+			} 
 			let todayIndex;
 			let todayItem;
 			for (let i = 0; i < this.calendarStudyVo.dayStudyList.length; i++) {
@@ -301,19 +303,20 @@ export default {
 			}
 			
 			let start 
-			if(todayItem){
-				start = todayIndex - todayItem.studyDay;
+			start = todayIndex - todayItem.studyDay;
+			/* if(todayItem){
+				
 			}else{
 				//今天在下个月不存在,例如31号
 				todayIndex = this.calendarStudyVo.dayStudyList.length-1
 				todayItem = this.calendarStudyVo.dayStudyList[todayIndex]
 				start = todayIndex - todayItem.studyDay;
-			}
-			if ((date.getMonth() + 1) != this.calendarStudyVo.month) {
+			} */
+			/* if ((date.getMonth() + 1) != this.calendarStudyVo.month) {
 				todayIndex = 0
 				todayItem = this.calendarStudyVo.dayStudyList[todayIndex]
 				start = 0;
-			}
+			} */
 			console.log(start,689)
 			/* this.calendarStudyVo.miniDayStudyList = []
 			for(let i=start;i<start + 7;i++){