he2802 4 лет назад
Родитель
Сommit
92292bab5f
1 измененных файлов с 3 добавлено и 3 удалено
  1. 3 3
      pages2/course/detail.vue

+ 3 - 3
pages2/course/detail.vue

@@ -237,7 +237,7 @@ export default {
 		Verify.init();
 		this.id = option.id
 		this.$api.courseInfo(option.id).then(res => {
-			this.queryData = res.data.data;
+			this.pageData = res.data.data;
 			this.getTeacher(res.data.data.teacherIds);
 		});
 		this.getChapter(this.id);
@@ -347,7 +347,7 @@ export default {
 				});
 			} else {
 				if (this.collecStatus) {
-					this.$api.coursecollectPD(this.queryData.courseId).then(results => {
+					this.$api.coursecollectPD(self.id).then(results => {
 						self.$api.deletecoursecollect(results.data.data.collectCourseId).then(resz => {
 							self.favoritesStatus();
 						});
@@ -355,7 +355,7 @@ export default {
 				} else {
 					var data = {
 						userId: this.$store.state.userInfo.userId,
-						courseId: this.queryData.courseId
+						courseId: self.id
 					};
 					this.$api.coursecollect(data).then(res => {
 						self.favoritesStatus();