瀏覽代碼

Merge branch 'dev' of http://120.79.166.78:19005/zhongzheng-edu/saas_pc into dev

Tang 2 年之前
父節點
當前提交
6e27b518df
共有 1 個文件被更改,包括 9 次插入6 次删除
  1. 9 6
      src/pages/person-center/my-course/index.vue

+ 9 - 6
src/pages/person-center/my-course/index.vue

@@ -1304,7 +1304,7 @@ export default {
           });
       });
     },
-    checkCanLearn() {
+    checkCanLearn(section) {
       let time = this.$tools.timest();
       let {
         interfaceAccountId,
@@ -1319,7 +1319,7 @@ export default {
       } = this.goodsData;
       if (interfaceAccountId > 0) {
         learnStatus == 1
-          ? this.rebuildSubmit(this.goodsData)
+          ? this.rebuildSubmit(this.goodsData, section)
           : this.$message({
               type: "warning",
               message:
@@ -1351,8 +1351,7 @@ export default {
       return index === -1;
     },
     async studyFunc(courseItem, items) {
-      console.log(items);
-      if (!this.checkCanLearn()) {
+      if (!this.checkCanLearn(items)) {
         return false;
       }
       if (!(await this.orderTopTobottom(courseItem, items, 99))) {
@@ -1502,7 +1501,7 @@ export default {
         let index = this.courseList.findIndex(
           (e) => e.courseId == courseLists.courseId
         );
-        
+
         if (index) {
           let prevItem = this.courseList[index - 1]; //上一课
           if (prevItem.stuAllNum != prevItem.secAllNum) {
@@ -1802,13 +1801,17 @@ export default {
           });
       });
     },
-    rebuildSubmit(item) {
+    rebuildSubmit(item, section) {
       this.$router.push({
         path: `/my-course-detail/${item.goodsId}`,
         query: {
           gradeId: item.gradeId,
           orderGoodsId: item.orderGoodsId,
           rebuild: 1,
+          courseId: section.courseId,
+          chapterId: section.chapterId,
+          moduleId: section.moduleId,
+          sectionId: section.sectionId || section.menuId,
         },
       });
     },