浏览代码

fix 主页日历

he2802 3 年之前
父节点
当前提交
20211a3dbe
共有 1 个文件被更改,包括 21 次插入22 次删除
  1. 21 22
      pages/index/index.vue

+ 21 - 22
pages/index/index.vue

@@ -304,30 +304,29 @@ export default {
 			let num = date.getDate();
 			let month = date.getMonth() + 1;
 			let list = [];
-			for (let i = 0; i < calendarStudyVo.length; i++) {
-				let item = calendarStudyVo[i];
-				if (item.month == month) {
-					list = item.dayStudyList;
-				}
-			}
-			for (let i = 0; i < list.length; i++) {
-				let item = list[i];
-				item.color = 0;
-				if (item.date == num) {
-					item.color = 3;
-				}
-				if (item.perform == 1) {
-					item.color = 1;
-				}
-				if (item.perform == 2) {
-					item.color = 2;
-				}
-				item.note = item.studyCourseKnob;
-				if (item.note > 0) {
-					item.dot = true;
+			for (let j = 0; j < calendarStudyVo.length; j++) {
+				let item = calendarStudyVo[j];
+				list = item.dayStudyList;
+				for (let i = 0; i < list.length; i++) {
+					let item = list[i];
+					item.color = 0;
+					if (item.date == num) {
+						item.color = 3;
+					}
+					if (item.perform == 1) {
+						item.color = 1;
+					}
+					if (item.perform == 2) {
+						item.color = 2;
+					}
+					item.note = item.studyCourseKnob;
+					if (item.note > 0) {
+						item.dot = true;
+					}
+					self.date_num.push(item);
 				}
-				self.date_num.push(item);
 			}
+			
 		},
 		userPlanSeven() {
 			let self = this;