he2802 4 lat temu
rodzic
commit
42b4bb01ad
2 zmienionych plików z 8 dodań i 7 usunięć
  1. 6 6
      components/home.vue
  2. 2 1
      pages2/plan/detail.vue

+ 6 - 6
components/home.vue

@@ -226,15 +226,15 @@ export default {
 			}
 		},
 		preveItem(){
-			if(self.courseIndex>0){
-				self.courseIndex  = self.courseIndex-1
-				self.courseItem = self.workList[self.courseIndex]
+			if(this.courseIndex>0){
+				this.courseIndex  = this.courseIndex-1
+				this.courseItem = this.workList[this.courseIndex]
 			}
 		},
 		nextItem(){
-			if(self.courseIndex<self.workList.length-1){
-				self.courseIndex  = self.courseIndex+1
-				self.courseItem = self.workList[self.courseIndex]
+			if(this.courseIndex<this.workList.length-1){
+				this.courseIndex  = this.courseIndex+1
+				this.courseItem = this.workList[this.courseIndex]
 			}
 		},
 		jumpCourseDetail(){

+ 2 - 1
pages2/plan/detail.vue

@@ -206,13 +206,14 @@ export default {
 			let currentMonth = date.getMonth() + 1;
 			this.haveNextMonth = false;
 			this.havePreviousMonth = false;
+			this.workList = this.listItem.coursePlanVo;
 			if (this.listItem !== undefined) {
 				for (let i = 0; i < this.listItem.calendarStudyVo.length; i++) {
 					let item = this.listItem.calendarStudyVo[i];
 					if (item.month == currentMonth) {
 						this.monthIndex = i;
 						this.calendarStudyVo = item;
-						this.workList = this.calendarStudyVo.coursePlanVo;
+						
 						if (i > 0) {
 							this.havePreviousMonth = true;
 						}