xuqiaoying 2 anos atrás
pai
commit
0385991e59

+ 8 - 3
components/course/courseChapter.vue

@@ -30,6 +30,7 @@
           ></courseSection>
           <u-line v-if="indexM < list.length - 1"></u-line>
         </view>
+        <!-- 章卷 -->
         <view v-if="itemM.type == 2">
           <u-line></u-line>
           <view
@@ -259,7 +260,10 @@ export default {
      * 去做题
      */
     async toDo(id, goodsId = 0, moduleId = 0, chapterId = 0, item, index) {
+      console.log('moduleId:', moduleId, 'chapterId:', chapterId);
+      // 查询用户商品今天学习节数- /goods/todayStudySectionNum
       let learnNum = await this.goodsTodayStudySectionNum();
+      // 检查用户是否学习过节 - /grade/grade/checkGoodsStudy
       let hasLearn = await this.gradeCheckGoodsStudy(id);
 
       if (this.sectionMaxNum > 0) {
@@ -271,7 +275,6 @@ export default {
           return;
         }
       }
-      // console.log(this.learningOrder, "this.learningOrder");
       if (this.learningOrder == 1) {
         if (this.canLearn) {
           let num = await this.bankRecordDoNum(item.typeId);
@@ -336,6 +339,7 @@ export default {
         }
       } else if (this.learningOrder == 2 && !item.rebuild) {
         let canLearn = this.list[index - 1].learning == 1;
+        // /study/record/menuAllList - 查询课程所有子目录结构列表
         let rows = await this.studyRecordMenuAllList();
         let isStop = false;
         let newRows = [];
@@ -359,7 +363,7 @@ export default {
             }
           }
         }
-        // console.log(newRows);
+        console.log(newRows);
         let isAllLearn = newRows.every((item) => {
           return item.studyStatus == 1;
         });
@@ -505,7 +509,7 @@ export default {
       this.down = !this.down;
       if (!this.down && this.list.length == 0) {
         // console.log(item.id, 69);
-        //获取章下面所有节试卷列表
+        //获取章下面所有节试卷列表-course/sectionExamList
         await this.$api.reSectionExamList({
           chapterId: item.chapterId || item.menuId,
           courseId: item.courseId,
@@ -612,6 +616,7 @@ export default {
     },
     getBuySectionList(chapterId, courseId, moduleId) {
       let self = this;
+      // /course/sectionList
       this.$api
         .reSectionList({
           chapterId: chapterId,

+ 7 - 7
components/course/courseModule.vue

@@ -17,6 +17,7 @@
 						:isRebuild="isRebuild"  :menuItem="itemM" :levelId="levelId+'-'+itemM.chapterId">
 				</courseChapter>
 				<u-line v-if="indexM<list.length-1"></u-line>
+				<!-- 模块卷 -->
 				<view v-if="itemM.type == 2">
 					<view
 						class="examBox"
@@ -155,7 +156,6 @@ export default {
 			}
 		},
 			getChapterList(moduleId) {
-					let self = this
                     // url: '/app/common/course/chapterList/'+data,
 					this.$api.chapterList(moduleId).then(res => {
 						if(res.data.code==200){
@@ -164,12 +164,11 @@ export default {
 								item.id = item.chapterId
 								item.menuType = 2;
 							}
-							self.list = res.data.data
+							this.list = res.data.data
 						}
 					});
 				},
 		getReChapterList(moduleId,courseId) {
-			let self = this
 			this.$api.reChapterList({moduleId:moduleId,gradeId:this.gradeId,courseId:courseId,rebuild:1}).then(res => {
 				if(res.data.code==200){
 					for(let i=0;i<res.data.data.length;i++){
@@ -177,12 +176,12 @@ export default {
 						item.id = item.chapterId
 						
 					}
-					self.list = res.data.data
+					this.list = res.data.data
 				}
 			});
 		},
 		getBuyChapterList(moduleId,courseId) {
-			let self = this
+			// course/chapterList
 			this.$api.reChapterList({moduleId:moduleId,gradeId:this.gradeId,courseId:courseId}).then(res => {
 				if(res.data.code==200){
 					for(let i=0;i<res.data.data.length;i++){
@@ -190,10 +189,11 @@ export default {
 						item.id = item.chapterId
 						item.menuType = 2;
 					}
-					self.list = res.data.data
+					this.list = res.data.data
 				}
+				console.log('-----------list', this.list)
 			});
-			// console.log('-----------list', this.list)
+			
 		},
 		/**
 		 * 去做题

+ 2 - 2
components/course/courseSection.vue

@@ -298,7 +298,7 @@ export default {
 			})
 		},
 		async getVideo(){
-			
+			console.log('点击节', this.preItem, this.menuItem);
 			if(this.clickLock) {
 				return;
 			}
@@ -325,7 +325,7 @@ export default {
 					let isAllLearn = newRows.every(item => {
 						return item.studyStatus == 1;
 					})
-					
+					console.log('isAllLearn:', isAllLearn);
 					if(isAllLearn) {
 						this.playVideo();
 					} else {

+ 9 - 8
pages3/polyv/detail.vue

@@ -766,7 +766,6 @@ export default {
     }
   },
   onLoad(option) {
-    console.log('index:--onLoad')
     this.courseId = Number(option.id) || '';
     this.goodsId = Number(option.goodsId);
     this.orderGoodsId = Number(option.orderGoodsId) || '';
@@ -782,22 +781,16 @@ export default {
     
     this.$store.getters.dictObj;
   },
-  onReady() {
-    console.log('index:--onReady')
-  },
   onShow() {
-    console.log('index:--onShow')
     if (this.$method.isGoLogin()) { // 从公众号消息进来的没登录需要跳到登录页,登录后返回
       return;
     }
     this.courseCourseList();
   },
   onUnload() {
-    console.log('index:--onUnload')
     this.originUnload()
   },
   onHide() {
-    console.log('index:--onHide')
     this.originUnload()
   },
   mounted() {
@@ -866,6 +859,7 @@ export default {
      * 获取业务层次详情
      */
     courseBusiness(businessId) {
+      // '/app/common/course/business/'+data,
       this.$api.courseBusiness(businessId).then((res) => {
         this.businessData = res.data.data
       });
@@ -1571,6 +1565,7 @@ export default {
 			})
 		},
 		studyRecordMenuAllList() {
+      // study/record/menuAllList
 			this.$api.studyRecordMenuAllList({
 				courseId:this.courseId,
 				gradeId:this.gradeId,
@@ -2569,7 +2564,7 @@ export default {
       })
     },
     onStateChange(newstate, oldstate) {
-      console.log('视频的开始播放事件', newstate.detail.newstate, this.needSeek)
+      // console.log('视频的开始播放事件', newstate.detail.newstate, this.needSeek)
       if (newstate.detail.newstate == "playing") {
         if (this.needSeek) {
           var polyvPlayerContext = this.selectComponent("#playerVideo");
@@ -2788,6 +2783,7 @@ export default {
     },
     getGoodsDetail() {
       let self = this;
+      // '/goods/'+ data,
       this.$api.goodsDetail(this.goodsId).then((res) => {
         this.goodsData = res.data.data;
 				if(self.goodsData.buyNote) {
@@ -2843,6 +2839,7 @@ export default {
         });
     },
     getReMenuList() {
+      console.log('重修的目录');
       let self = this;
       this.$api
         .reMenuList({
@@ -2860,6 +2857,7 @@ export default {
               item.name = item.menuName;
             }
             self.reMenuList = res.data.rows;
+            console.log('reMenuList:' , this.reMenuList);
             if (self.reMenuList.length > 0) {
               this.showNotes = false;
               self.list = [
@@ -2899,6 +2897,7 @@ export default {
         });
     },
     getMenuList() {
+      console.log('menuList的目录');
       let self = this;
       // /course/menuList 查询课程目录结构列表
       this.$api
@@ -2923,11 +2922,13 @@ export default {
                 break;
               }
             }
+            console.log('menuList: ---', this.menuList, 'menuIndex:', this.menuIndex);
           }
         });
     },
     courseDetail() {
       let self = this;
+      // '/course/'+data,
       this.$api.courseDetail(this.courseId).then((res) => {
         if (res.data.code == 200) {
           // if (res.data.data.educationName == "继续教育") {