Przeglądaj źródła

Merge branch 'x_bf_1' into dev

谢杰标 2 lat temu
rodzic
commit
2d41166656

+ 347 - 340
src/apis/bank.js

@@ -1,342 +1,349 @@
 import request from '@/axios'
 export default {
-	listGoodsUserQuestion(data) {
-		return request({
-			url: '/bank/question/listGoodsUserQuestion',
-			params: data,
-			method: 'get'
-		})
-	},
-
-
-	goodsBank(data) {
-		return request({
-			url: '/goods/bank/list',
-			method: 'get',
-			params: data,
-		})
-	},
-
-
-	goodsBankQuestionNum(data) {
-		return request({
-			url: '/goods/bank/questionNum/' + data,
-			method: 'get',
-		})
-	},
-
-	examRecordGroupList(data) {
-		return request({
-			url: '/exam/record/group_list',
-			params: data,
-			method: 'GET',
-		})
-	},
-
-	goodsBankDolist(data) {
-		return request({
-			url: '/goods/bank/dolist',
-			method: 'get',
-			params: data
-		})
-	},
-
-
-	bankRecordDoNum(data) {
-		return request({
-			url: '/bank/record/doNum',
-			params: data,
-			method: 'GET',
-		})
-	},
-
-	bankExam(data) {
-		return request({
-			url: '/bank/exam/' + data,
-			method: 'get',
-		})
-	},
-	bankTempExam(data) {
-		return request({
-			url: '/bank/exam/temp/' + data,
-			method: 'get',
-		})
-	},
-	bankRecord(data) {
-		return request({
-			url: '/bank/record',
-			data: data,
-			method: 'POST',
-		})
-	},
-
-	bankRecordEdit(data) {
-		return request({
-			url: '/bank/record/edit',
-			data: data,
-			method: 'POST'
-		})
-	},
-
-	bankReportData(data) {
-		return request({
-			url: '/bank/record/' + data,
-			method: 'get',
-		})
-	},
-	studyExamPhotoRecord(data) {
-		return request({
-			url: '/bank/record/addPhoto',
-			method: 'post',
-			data: data
-		})
-	},
-
-	bankExamExamList(data) {
-		return request({
-			url: '/bank/exam/exam/list',
-			method: 'get',
-			params: data,
-		})
-	},
-
-	examRecordCount(data) {
-		return request({
-			url: '/exam/record/count',
-			params: data,
-			method: 'GET',
-		})
-	},
-
-	getExamDetail(data) {
-		return request({
-			url: '/bank/exam/' + data,
-			method: 'get',
-		})
-	},
-
-	examRecord(data) {
-		return request({
-			url: '/exam/record',
-			data: data,
-			method: 'POST',
-		})
-	},
-
-	examRecordEdit(data) {
-		return request({
-			url: '/exam/record/edit',
-			data: data,
-			method: 'POST',
-		})
-	},
-
-	examWrongRecord(data) {
-		return request({
-			url: '/exam/wwrong/record',
-			data: data,
-			method: 'POST',
-		})
-	},
-
-	examWrongRecordWrongNum(data) {
-		return request({
-			url: `/exam/wwrong/record/wrongNum/${data}`,
-			method: 'get'
-		})
-	},
-
-	bankExamNextExam(data) {
-		return request({
-			url: '/bank/exam/nextExam',
-			params: data,
-			method: 'get',
-		})
-	},
-
-	examReport(data) {
-		return request({
-			url: '/exam/record/' + data,
-			method: 'get',
-		})
-	},
-
-
-	examaperList(data) {
-		return request({
-			url: '/exam/paper/list',
-			params: data,
-			method: 'GET',
-		})
-	},
-
-	goodsCollectExamList(data) {
-		return request({
-			url: '/collect/question/exam_list',
-			method: 'get',
-			params: data
-		})
-	},
-
-	collectQuestionTypeList(data) {
-		return request({
-			url: '/collect/question/type_list',
-			params: data,
-			method: 'GET',
-		})
-	},
-
-	wrongRecordTypeList(data) {
-		return request({
-			url: '/exam/wwrong/record/type_list',
-			params: data,
-			method: 'GET',
-		})
-	},
-
-	wrongRecordList(data) {
-		return request({
-			url: '/exam/wwrong/record/list',
-			method: 'get',
-			params: data
-		})
-	},
-
-	wrongRecordTypeQuestionList(data) {
-		return request({
-			url: '/exam/wwrong/record/type_question_list',
-			params: data,
-			method: 'GET',
-		})
-	},
-
-	wrongRecordDelete(data) {
-		return request({
-			url: '/exam/wwrong/record/delete/question',
-			method: 'post',
-			data: data
-		})
-	},
-
-	wrongRecordExamQuestionList(data) {
-		return request({
-			url: '/exam/wwrong/record/exam_question_list',
-			method: 'get',
-			params: data,
-		})
-	},
-
-	goodsCollectList(data) {
-		return request({
-			url: '/collect/question/list',
-			method: 'get',
-			params: data
-		})
-	},
-
-	collectQuestionExamQuestionList(data) {
-		return request({
-			url: `/collect/question/exam_question_list`,
-			method: 'get',
-			params: data
-		})
-	},
-
-	goodsChapterDolist(data) {
-		return request({
-			url: '/goods/chapter/dolist',
-			method: 'get',
-			params: data
-		})
-	},
-
-	goodsExamDolist(data) {
-		return request({
-			url: '/goods/exam/dolist',
-			method: 'get',
-			params: data
-		})
-	},
-
-	examRecordRightList(data) {
-		return request({
-			url: '/exam/record/right_list',
-			params: data,
-			method: 'GET',
-		})
-	},
-
-	examRecordWrongList(data) {
-		return request({
-			url: '/exam/record/wrong_list',
-			params: data,
-			method: 'GET',
-		})
-	},
-
-	examRecordList(data) {
-		return request({
-			url: '/exam/record/list',
-			params: data,
-			method: 'GET',
-		})
-	},
-
-	bankQuestionListFreeGoodsList(data) {
-		return request({
-			url: '/bank/question/listFreeGoodsList',
-			method: 'get',
-			params: data
-		})
-	},
-	exampapergoodsExamPaper(data) {
-		return request({
-			url: '/exam/paper/goodsExamPaper/' + data,
-			method: 'get',
-		})
-	},
-	bankexamgetPaperExamList(data) {
-		return request({
-			url: '/bank/exam/getPaperExamList',
-			method: 'get',
-			params: data
-		})
-	},
-	//查询用户拥有免费+自购题库商品
-	bankquestionlistUserFreeUnionBuyGoodsList(data) {
-		return request({
-			url: '/bank/question/listUserFreeUnionBuyGoodsList',
-			method: 'get',
-			params: data
-		})
-	},
-	// 每日一练信息
-	getToDayExam(goodsId) {
-		return request({
-			url: `/bank/question/getToDayExam/${goodsId}`,
-			method: 'get'
-		})
-	},
-	// 打卡记录
-	getPunchRecord(data) {
-		return request({
-			url: '/bank/question/get/special/record',
-			method: 'get',
-			params: data
-		})
-	},
-	// 打卡
-	punchClock(data) {
-		return request({
-			url: '/bank/question/special/exam/record',
-			method: 'post',
-			data: data
-		})
-	},
-	getRandomExam(orderGoodsId) {
-		return request({
-			url: `/goods/bank/questionTempNum/${orderGoodsId}`,
-			method: 'get'
-		})
-	},
-}
+  listGoodsUserQuestion(data) {
+    return request({
+      url: '/bank/question/listGoodsUserQuestion',
+      params: data,
+      method: 'get'
+    })
+  },
+
+
+  goodsBank(data) {
+    return request({
+      url: '/goods/bank/list',
+      method: 'get',
+      params: data,
+    })
+  },
+
+
+  goodsBankQuestionNum(data) {
+    return request({
+      url: '/goods/bank/questionNum/' + data,
+      method: 'get',
+    })
+  },
+
+  examRecordGroupList(data) {
+    return request({
+      url: '/exam/record/group_list',
+      params: data,
+      method: 'GET',
+    })
+  },
+
+  goodsBankDolist(data) {
+    return request({
+      url: '/goods/bank/dolist',
+      method: 'get',
+      params: data
+    })
+  },
+
+
+  bankRecordDoNum(data) {
+    return request({
+      url: '/bank/record/doNum',
+      params: data,
+      method: 'GET',
+    })
+  },
+
+  bankExam(data) {
+    return request({
+      url: '/bank/exam/' + data,
+      method: 'get',
+    })
+  },
+  bankTempExam(data) {
+    return request({
+      url: '/bank/exam/temp/' + data,
+      method: 'get',
+    })
+  },
+  bankRecord(data) {
+    return request({
+      url: '/bank/record',
+      data: data,
+      method: 'POST',
+    })
+  },
+
+  bankRecordEdit(data) {
+    return request({
+      url: '/bank/record/edit',
+      data: data,
+      method: 'POST'
+    })
+  },
+
+  bankReportData(data) {
+    return request({
+      url: '/bank/record/' + data,
+      method: 'get',
+    })
+  },
+  studyExamPhotoRecord(data) {
+    return request({
+      url: '/bank/record/addPhoto',
+      method: 'post',
+      data: data
+    })
+  },
+
+  bankExamExamList(data) {
+    return request({
+      url: '/bank/exam/exam/list',
+      method: 'get',
+      params: data,
+    })
+  },
+
+  examRecordCount(data) {
+    return request({
+      url: '/exam/record/count',
+      params: data,
+      method: 'GET',
+    })
+  },
+
+  getExamDetail(data) {
+    return request({
+      url: '/bank/exam/' + data,
+      method: 'get',
+    })
+  },
+
+  examRecord(data) {
+    return request({
+      url: '/exam/record',
+      data: data,
+      method: 'POST',
+    })
+  },
+
+  examRecordEdit(data) {
+    return request({
+      url: '/exam/record/edit',
+      data: data,
+      method: 'POST',
+    })
+  },
+
+  examWrongRecord(data) {
+    return request({
+      url: '/exam/wwrong/record',
+      data: data,
+      method: 'POST',
+    })
+  },
+
+  examWrongRecordWrongNum(data) {
+    return request({
+      url: `/exam/wwrong/record/wrongNum/${data}`,
+      method: 'get'
+    })
+  },
+
+  bankExamNextExam(data) {
+    return request({
+      url: '/bank/exam/nextExam',
+      params: data,
+      method: 'get',
+    })
+  },
+
+  examReport(data) {
+    return request({
+      url: '/exam/record/' + data,
+      method: 'get',
+    })
+  },
+
+
+  examaperList(data) {
+    return request({
+      url: '/exam/paper/list',
+      params: data,
+      method: 'GET',
+    })
+  },
+
+  goodsCollectExamList(data) {
+    return request({
+      url: '/collect/question/exam_list',
+      method: 'get',
+      params: data
+    })
+  },
+
+  collectQuestionTypeList(data) {
+    return request({
+      url: '/collect/question/type_list',
+      params: data,
+      method: 'GET',
+    })
+  },
+
+  wrongRecordTypeList(data) {
+    return request({
+      url: '/exam/wwrong/record/type_list',
+      params: data,
+      method: 'GET',
+    })
+  },
+
+  wrongRecordList(data) {
+    return request({
+      url: '/exam/wwrong/record/list',
+      method: 'get',
+      params: data
+    })
+  },
+
+  wrongRecordTypeQuestionList(data) {
+    return request({
+      url: '/exam/wwrong/record/type_question_list',
+      params: data,
+      method: 'GET',
+    })
+  },
+
+  wrongRecordDelete(data) {
+    return request({
+      url: '/exam/wwrong/record/delete/question',
+      method: 'post',
+      data: data
+    })
+  },
+
+  wrongRecordExamQuestionList(data) {
+    return request({
+      url: '/exam/wwrong/record/exam_question_list',
+      method: 'get',
+      params: data,
+    })
+  },
+
+  goodsCollectList(data) {
+    return request({
+      url: '/collect/question/list',
+      method: 'get',
+      params: data
+    })
+  },
+
+  collectQuestionExamQuestionList(data) {
+    return request({
+      url: `/collect/question/exam_question_list`,
+      method: 'get',
+      params: data
+    })
+  },
+
+  goodsChapterDolist(data) {
+    return request({
+      url: '/goods/chapter/dolist',
+      method: 'get',
+      params: data
+    })
+  },
+
+  goodsExamDolist(data) {
+    return request({
+      url: '/goods/exam/dolist',
+      method: 'get',
+      params: data
+    })
+  },
+
+  examRecordRightList(data) {
+    return request({
+      url: '/exam/record/right_list',
+      params: data,
+      method: 'GET',
+    })
+  },
+
+  examRecordWrongList(data) {
+    return request({
+      url: '/exam/record/wrong_list',
+      params: data,
+      method: 'GET',
+    })
+  },
+
+  examRecordList(data) {
+    return request({
+      url: '/exam/record/list',
+      params: data,
+      method: 'GET',
+    })
+  },
+
+  bankQuestionListFreeGoodsList(data) {
+    return request({
+      url: '/bank/question/listFreeGoodsList',
+      method: 'get',
+      params: data
+    })
+  },
+  exampapergoodsExamPaper(data) {
+    return request({
+      url: '/exam/paper/goodsExamPaper/' + data,
+      method: 'get',
+    })
+  },
+  bankexamgetPaperExamList(data) {
+    return request({
+      url: '/bank/exam/getPaperExamList',
+      method: 'get',
+      params: data
+    })
+  },
+  //查询用户拥有免费+自购题库商品
+  bankquestionlistUserFreeUnionBuyGoodsList(data) {
+    return request({
+      url: '/bank/question/listUserFreeUnionBuyGoodsList',
+      method: 'get',
+      params: data
+    })
+  },
+  // 每日一练信息
+  getToDayExam(goodsId) {
+    return request({
+      url: `/bank/question/getToDayExam/${goodsId}`,
+      method: 'get'
+    })
+  },
+  // 打卡记录
+  getPunchRecord(data) {
+    return request({
+      url: '/bank/question/get/special/record',
+      method: 'get',
+      params: data
+    })
+  },
+  // 打卡排行榜
+  getRankiList(goodsId) {
+    return request({
+      url: `/bank/question/todayExam/tob/${goodsId}`,
+      method: 'get'
+    })
+  },
+  // 打卡
+  punchClock(data) {
+    return request({
+      url: '/bank/question/special/exam/record',
+      method: 'post',
+      data: data
+    })
+  },
+  getRandomExam(orderGoodsId) {
+    return request({
+      url: `/goods/bank/questionTempNum/${orderGoodsId}`,
+      method: 'get'
+    })
+  },
+}

BIN
src/assets/learing.gif


+ 184 - 59
src/pages/course-detail/index.vue

@@ -207,6 +207,15 @@
                                                 </div>
                                               </template>
 
+                                              <div
+                                                class="lear-state"
+                                                v-if="isActive(section)"
+                                              >
+                                                <img
+                                                  src="../../assets/learing.gif"
+                                                  alt=""
+                                                />
+                                              </div>
                                               <template
                                                 v-if="section.durationTime > 0"
                                               >
@@ -2773,6 +2782,38 @@
         </div>
       </div>
     </el-dialog>
+    <el-dialog
+      title="温馨提示"
+      width="380px"
+      center
+      class="tip-dialog"
+      :visible.sync="dialogPalyVisible"
+      :close-on-click-modal="false"
+      :close-on-press-escape="false"
+      :show-close="false"
+    >
+      <template v-if="!isLastVideo"
+        ><p>当前视频已学完,继续学习下一个视频?</p>
+        <div class="btn1">
+          <el-button type="info" plain round @click="dialogPalyVisible = false"
+            >取 消</el-button
+          >
+          <el-button type="primary" @click="playNextVideo" round
+            >确定</el-button
+          >
+        </div></template
+      >
+      <template v-else
+        ><p>
+          当前是最后一个视频并已学习完,请检查所有章节的视频是否已学习完成。
+        </p>
+        <div class="btn2">
+          <el-button type="primary" round @click="dialogPalyVisible = false"
+            >确定</el-button
+          >
+        </div></template
+      >
+    </el-dialog>
     <div id="printTable"></div>
     <!-- <ToolBar></ToolBar> -->
     <Footer></Footer>
@@ -2869,7 +2910,6 @@ export default {
       vidzb: "",
       player: "",
       playerzb: "",
-      activeId: "", //当前选中ID
       vodPlayerJs: "https://player.polyv.net/script/player.js",
       playerJs:
         "https://player.polyv.net/resp/live-h5-player/latest/liveplayer.min.js",
@@ -3134,6 +3174,8 @@ export default {
       sectionExamList: [], //节试卷集合
       sectionExam: [], //节试卷集合
       compareFaceData: 0, // 拍照匹配相似度
+      dialogPalyVisible: false,
+      allVideoList: [],
     };
   },
   computed: {
@@ -3183,6 +3225,18 @@ export default {
         return courseName;
       };
     },
+    isLastVideo() {
+      try {
+        let { sectionId, chapterId } = this.sectionItem;
+        let _m = this.menuList;
+        let lastVideo = _m.slice(-1)[0].list.slice(-1)[0].list.slice(-1)[0];
+        return (
+          sectionId == lastVideo.sectionId && chapterId == lastVideo.chapterId
+        );
+      } catch (error) {
+        return false;
+      }
+    },
   },
   async mounted() {
     this.courseId = +this.$route.query.courseId || "";
@@ -3191,8 +3245,10 @@ export default {
     this.orderGoodsId = this.$route.query.orderGoodsId;
     this.gradeId = this.$route.query.gradeId;
     this.sectionItem = this.$route.query;
-    console.log("this.sectionItem", this.sectionItem);
     let isOther = this.$route.query.isOther || "";
+    // setTimeout(() => {
+    //   this.playNextVideo();
+    // }, 2000);
 
     if (isOther) {
       const confirmText = [
@@ -3230,6 +3286,7 @@ export default {
     }
 
     await this.getGoodsDetail(); //商品详情
+    this.studyRecordMenuAllList();
     this.dictList();
     // this.userConfirmInfoDetail().then((res) => {
     this.getbaseprofiletplists().then(async (res) => {
@@ -3294,17 +3351,21 @@ export default {
       // }
     });
     // });
+    // 切换窗口暂停播放
+    document.addEventListener("visibilitychange", this.pauseVideo);
   },
   beforeDestroy() {
     clearInterval(this.answerTimer);
     clearInterval(this.postTimer);
     clearInterval(this.livingTimer);
+    document.removeEventListener("visibilitychange", this.pauseVideo);
     try {
       this.$msgbox.close();
     } catch (err) {}
     if (this.playSectionId && this.hasStart) {
       this.postStudyRecord();
     }
+
     // if (this.lockTimer) {
     //   clearInterval(this.lockTimer);
     //   this.$request
@@ -3321,6 +3382,13 @@ export default {
   methods: {
     ...mapMutations(["getCartCount"]),
     ...mapActions(["getUserInfo"]),
+    pauseVideo() {
+      if (document.visibilityState === "hidden") {
+        this.player && this.player.j2s_pauseVideo();
+      }else{
+        this.player && this.player.j2s_resumeVideo();
+      }
+    },
     openChangeCourseBoxs() {
       this.dialogVisible = true;
     },
@@ -5099,31 +5167,16 @@ export default {
         self.detail = res.data;
       });
     },
-    openModule(menuItem, status = false) {
-      //重修目录点击
-      console.log(menuItem, "menuItem");
+    openModule(menuItem, status = false, isAuto = false) {
       menuItem.showList = !menuItem.showList;
-
-      if (!menuItem.list.length) {
-        if (menuItem.isRebuild) {
-          this.getReChapterList(menuItem.id, menuItem.courseId, menuItem);
-        } else {
-          this.getBuyChapterList(
-            menuItem.id,
-            menuItem.courseId,
-            menuItem,
-            status
-          );
-        }
-      }
-    },
-    getReChapterList(moduleId, courseId, menuItem) {
-      this.$request
+      let { list, isRebuild, id, courseId } = menuItem;
+      if (list.length) return;
+      return this.$request
         .reChapterList({
-          moduleId: moduleId,
+          moduleId: id,
           gradeId: this.gradeId,
           courseId: courseId,
-          rebuild: 1,
+          rebuild: isRebuild ? 1 : undefined,
         })
         .then((res) => {
           for (let i = 0; i < res.data.length; i++) {
@@ -5132,32 +5185,14 @@ export default {
             item.showList = false;
             item.list = [];
             item.parent = menuItem;
-            item.isRebuild = 1;
+            isRebuild ? (item.isRebuild = 1) : (item.menuType = 2);
           }
           menuItem.list = res.data;
-        });
-    },
-
-    getBuyChapterList(moduleId, courseId, menuItem, status) {
-      this.$request
-        .reChapterList({
-          moduleId: moduleId,
-          gradeId: this.gradeId,
-          courseId: courseId,
-        })
-        .then((res) => {
-          for (let i = 0; i < res.data.length; i++) {
-            let item = res.data[i];
-            item.id = item.chapterId;
-            item.menuType = 2;
-            item.showList = false;
-            item.list = [];
-            item.parent = menuItem;
+          if(isAuto){
+            return Promise.resolve(res.data)
           }
-          menuItem.list = res.data;
+          if (isRebuild) return;
           if (status) {
-            console.log(this.sectionItem, "this.sectionItem");
-            console.log(menuItem.list, "menuItem.list");
             const FindIndexs = menuItem.list.findIndex((item) => {
               return item.chapterId == this.sectionItem.chapterId;
             });
@@ -5168,14 +5203,12 @@ export default {
             }
           } else {
             if (this.needOpen) {
-              // this.needOpen = false;
               this.openChapter(menuItem.list[0]);
             }
           }
         });
     },
-    openChapter(chapter) {
-      console.log(chapter, "chapter");
+    async openChapter(chapter) {
       //获取节试卷列表
       this.$request
         .reSectionExamList({
@@ -5185,19 +5218,18 @@ export default {
         })
         .then((res) => {
           this.sectionExam = [...this.sectionExam, ...res.data];
-          // this.sectionExam = res.data
         });
       chapter.showList = !chapter.showList;
       if (!chapter.list.length) {
         if (chapter.isRebuild) {
-          this.getReSectionList(
+          return await this.getReSectionList(
             chapter.id,
             chapter.courseId,
             chapter.moduleId || 0,
             chapter
           );
         } else {
-          this.getBuySectionList(
+          return await this.getBuySectionList(
             chapter.id,
             chapter.courseId,
             chapter.moduleId || 0,
@@ -5207,7 +5239,7 @@ export default {
       }
     },
     getReSectionList(chapterId, courseId, moduleId, chapter) {
-      this.$request
+      return this.$request
         .reSectionList({
           chapterId: chapterId,
           gradeId: this.gradeId,
@@ -5231,12 +5263,13 @@ export default {
             section.parent = chapter;
           });
           chapter.list = res.data;
+          return Promise.resolve(chapter.list);
         });
     },
 
     getBuySectionList(chapterId, courseId, moduleId = 0, chapter) {
       // /course/sectionList 查询章与节关系列表+章卷同级展示
-      this.$request
+      return this.$request
         .reSectionList({
           chapterId: chapterId,
           gradeId: this.gradeId,
@@ -5270,6 +5303,7 @@ export default {
               // this.getResource(chapter.list[0]);
             }
           }
+          return Promise.resolve(chapter.list);
         });
     },
     getGoodsDetail() {
@@ -5843,6 +5877,7 @@ export default {
             goodsId: this.goodsId,
           })
           .then((res) => {
+            this.allVideoList = res.data;
             resolve(res.data);
           });
       });
@@ -5880,9 +5915,7 @@ export default {
     loadPlayer() {
       var self = this;
       const polyvPlayer = window.polyvPlayer;
-      console.log(polyvPlayer, this.recordObj.videoCurrentTime, 666);
       self.$request.obtainpolyvvideosign(self.vid).then((res) => {
-        console.log(res, "res2");
         self.player = polyvPlayer({
           wrap: "#player",
           width: 810,
@@ -5963,11 +5996,62 @@ export default {
             type: "success",
             message: "播放完毕",
           });
+          this.dialogPalyVisible = true;
+          if (this.isFullScreen()) {
+            this.exitFullscreen();
+          }
           this.postStudyRecord(1);
         });
       });
     },
-
+    async playNextVideo() {
+      this.dialogPalyVisible = false;
+      this.autoplay = true;
+      let { sectionId, chapterId, moduleId } = this.sectionItem;
+      let moduleIndex = this.menuList.findIndex((e) => e.id == moduleId);
+      let chapterList = this.menuList[moduleIndex].list.filter(
+        (e) => e.type == 1
+      );
+      let playChapterIndex = chapterList.findIndex(
+        (e) => e.chapterId == chapterId
+      );
+      let playChapter = chapterList[playChapterIndex].list.filter(
+        (e) => e.type == 1
+      );
+      let playVideoIndex = playChapter.findIndex(
+        (e) => e.sectionId == sectionId
+      );
+      if (playVideoIndex < playChapter.length - 1) {
+        this.getResource(playChapter[playVideoIndex + 1], 1);
+      } else if (playChapterIndex < chapterList.length - 1) {
+        // 不是最后一杰
+        let nextChapter = chapterList[playChapterIndex + 1].list
+        if (nextChapter.length) {
+          this.getResource(nextChapter.list[0], 1);
+        } else {
+          // 去请求数据回来
+          let data = await this.openChapter(chapterList[playChapterIndex + 1]);
+          this.getResource(data[0], 1);
+        }
+      } else {
+        // 章最后一个视频  跳去下一章
+        let nextChapterList = this.menuList[moduleIndex + 1].list
+        if (!nextChapterList.length) {
+          this.needOpen = true;
+          nextChapterList = await this.openModule(
+            this.menuList[moduleIndex + 1],
+            false,
+            true
+          );
+        }
+        if(nextChapterList[0].list.length){
+          this.getResource(nextChapterList[0].list[0], 1);
+        }else{
+          let data = await this.openChapter(nextChapterList[0]);
+          this.getResource(data[0], 1);
+        }
+      }
+    },
     timeEventLiving() {
       var polyvPlayerContext = this.playerzb;
       if (polyvPlayerContext) {
@@ -6874,7 +6958,6 @@ export default {
                   !this.sectionItem.moduleId
                 ) {
                   this.menuIndex = [i];
-                  // this.needOpen = false;
                   this.openChapter(this.menuList[i]);
                   break;
                 }
@@ -6889,7 +6972,6 @@ export default {
                     break;
                   } else if (res.rows[i].type == 2) {
                     this.menuIndex = [i];
-                    // this.needOpen = false;
                     this.openChapter(this.menuList[i]);
                     break;
                   }
@@ -7511,6 +7593,16 @@ export default {
                         display: flex;
                         align-items: center;
 
+                        .lear-state {
+                          height: 20px;
+                          padding-right: 8px;
+                          img {
+                            width: 20px;
+                            height: 20px;
+                            // margin-right: 4px;
+                          }
+                        }
+
                         &.active {
                           background: #132b4d;
                           font-size: 14px;
@@ -8154,7 +8246,40 @@ export default {
       }
     }
   }
-
+  .tip-dialog {
+    /deep/ {
+      .el-dialog__body {
+        padding: 6px 40px 44px;
+      }
+      .el-dialog__header {
+        padding-top: 36px;
+      }
+      .el-dialog__title {
+        font-weight: bold;
+        color: #222222;
+      }
+    }
+    p {
+      color: #666666;
+      font-size: 16px;
+      text-align: center;
+    }
+    .btn1 {
+      display: flex;
+      justify-content: space-between;
+      margin-top: 50px;
+      .el-button {
+        width: 140px;
+      }
+    }
+    .btn2 {
+      width: 200px;
+      margin: 32px auto 0;
+      .el-button {
+        width: 200px;
+      }
+    }
+  }
   .take-photo {
     /deep/ .el-dialog__header {
       display: none;

+ 7 - 0
src/pages/goods-detail/course-detail.vue

@@ -632,6 +632,7 @@ export default {
     if (this.player) {
       this.player.destroy();
     }
+    document.removeEventListener('visibilitychange', this.pauseVideo)
   },
   watch: {
     "$route.params.goodsId": {
@@ -645,6 +646,7 @@ export default {
   },
   mounted() {
     this.getInit();
+    document.addEventListener('visibilitychange', this.pauseVideo)
   },
   computed: {
     compyRecommend: function () {
@@ -665,6 +667,11 @@ export default {
   },
   methods: {
     ...mapMutations(["setCurrentRouter", "getCartCount"]),
+    pauseVideo() {
+      if (document.visibilityState === 'hidden') {
+        this.player && this.player.j2s_pauseVideo();
+      }
+    },
     getInit() {
       this.goodsId = this.$route.params.goodsId;
       this.getGoodsDetail();

+ 9 - 0
src/pages/goods-detail/live-detail.vue

@@ -652,6 +652,7 @@ export default {
     if (this.$tools.isLogin()) {
       this.getProvinceList();
     }
+    document.addEventListener('visibilitychange', this.pauseVideo)
   },
   computed: {
     compyRecommend: function () {
@@ -672,6 +673,11 @@ export default {
   },
   methods: {
     ...mapMutations(["setCurrentRouter", "getCartCount"]),
+    pauseVideo() {
+      if (document.visibilityState === 'hidden') {
+        this.player && this.player.j2s_pauseVideo();
+      }
+    },
     appCommonGoodsCourseModuleFreeExamList() {
       this.$request
         .appCommonGoodsCourseModuleFreeExamList(this.goodsId)
@@ -1703,6 +1709,9 @@ export default {
         });
     },
   },
+  beforeDestroy(){
+    document.removeEventListener('visibilitychange', this.pauseVideo)
+  }
 };
 </script>
 

+ 11 - 0
src/pages/goodsTopic/components/catalogue.vue

@@ -381,6 +381,11 @@ export default {
     ...mapGetters(["header"]),
   },
   methods: {
+    pauseVideo() {
+      if (document.visibilityState === 'hidden') {
+        this.player && this.player.j2s_pauseVideo();
+      }
+    },
     getTel(tel) {
       return tel ? tel.split(";") : [];
     },
@@ -798,6 +803,12 @@ export default {
       }
     },
   },
+  mounted(){
+    document.addEventListener('visibilitychange', this.pauseVideo)
+  },
+  beforeDestroy(){
+    document.removeEventListener('visibilitychange', this.pauseVideo)
+  }
 };
 </script>
 

+ 7 - 3
src/pages/live-detail/index.vue

@@ -2807,9 +2807,6 @@ export default {
       };
     },
   },
-  // beforeDestroy() {
-  //   this.player.destroy();
-  // },
   async mounted() {
     this.courseId = +this.$route.query.courseId || "";
     this.nowTime = Number(new Date().getTime() / 1000).toFixed(0);
@@ -2864,6 +2861,7 @@ export default {
       console.log("------");
       this.studyRecordQueryLiveLast();
     }
+    document.addEventListener('visibilitychange', this.pauseVideo)
     // let noteSecond = this.$route.query.noteSecond;
     // if (noteSecond > 0) {
     //   let item = {
@@ -2888,6 +2886,7 @@ export default {
     clearInterval(this.answerTimer);
     clearInterval(this.postTimer);
     clearInterval(this.livingTimer);
+    document.removeEventListener('visibilitychange', this.pauseVideo)
     try {
       this.$msgbox.close();
     } catch (err) {}
@@ -2910,6 +2909,11 @@ export default {
   },
   methods: {
     ...mapMutations(["getCartCount"]),
+    pauseVideo() {
+      if (document.visibilityState === 'hidden') {
+        this.player && this.player.j2s_pauseVideo();
+      }
+    },
     isLast(item) {
       if (this.liveLast) {
         let sectionASame =

+ 244 - 296
src/pages/person-center/my-bank/bank-detailCopy/index.vue

@@ -4,58 +4,75 @@
       <div class="section__body">
         <div class="left-box">
           <el-tabs v-model="activeName" @tab-click="handelTab">
-            <el-tab-pane
-              v-for="tab in newList"
-              :key="tab.paperId"
-              :label="tab.paperName"
-              :name="tab.paperId + ''"
-            >
-              <div
-                v-if="tab.paperName == '每日一练'"
-                style="background: #f8f8fa; padding: 20px"
-              >
+            <el-tab-pane v-for="tab in newList" :key="tab.paperId" :label="tab.paperName" :name="tab.paperId + ''">
+              <div v-if="tab.paperName == '每日一练'" style="background: #f8f8fa; padding: 20px">
                 <template v-if="tab.examInfo">
-                  <div class="day-box">
-                    <div>
-                      <p>
-                        打卡天数<span>{{ tab.examInfo.recordCount }}</span
-                        >天
-                      </p>
-                      <p>
-                        打卡进度超过了{{ tab.examInfo.recordPercentage }}的学员
-                      </p>
-                    </div>
-                    <div @click="handelPunchClock(tab)">
-                      {{ tab.examInfo.examRecord ? "今日已打卡" : "今日打卡" }}
-                    </div>
-                    <img src="../../../../assets/basket.png" alt="" />
-                  </div>
-                  <div class="clock-in-box">
-                    <div class="clock-in-box-item">
-                      <p class="clock-title">明日打卡任务</p>
-                      <div class="clock-task">
-                        {{ tab.examInfo.examNameBelow || "暂无" }}
+                  <el-row :gutter="20">
+                    <el-col :span="16">
+                      <div class="day-box">
+                        <div>
+                          <p>
+                            打卡天数<span>{{ tab.examInfo.recordCount }}</span>天
+                          </p>
+                          <p>
+                            打卡进度超过了{{ tab.examInfo.recordPercentage }}的学员
+                          </p>
+                        </div>
+                        <div @click="handelPunchClock(tab)">
+                          {{ tab.examInfo.examRecord ? "今日已打卡" : "今日打卡" }}
+                        </div>
+                        <img src="../../../../assets/basket.png" alt="" />
                       </div>
-                    </div>
-                    <div class="clock-in-box-item">
-                      <p class="clock-title">打卡记录</p>
-                      <div class="clock-calendar">
-                        <el-calendar :first-day-of-week="7">
-                          <template slot="dateCell" slot-scope="{ date, data }">
-                            <p
-                              v-if="!isSelected(data.day)"
-                              :class="isToday(data.day) ? 'date-today' : ''"
-                            >
-                              {{ data.day.split("-").slice(2).join("-") }}
-                            </p>
-                            <p v-else class="is-Select">
-                              <img src="../../../../assets/tick.png" alt="" />
+                      <div class="clock-in-box">
+                        <div class="clock-in-box-item">
+                          <p class="clock-title">明日打卡任务</p>
+                          <div class="clock-task">
+                            {{ tab.examInfo.examNameBelow || "暂无" }}
+                          </div>
+                        </div>
+                        <div class="clock-in-box-item">
+                          <p class="clock-title">打卡记录</p>
+                          <div class="clock-calendar">
+                            <el-calendar :first-day-of-week="7">
+                              <template slot="dateCell" slot-scope="{ date, data }">
+                                <p v-if="!isSelected(data.day)" :class="isToday(data.day) ? 'date-today' : ''">
+                                  {{ data.day.split("-").slice(2).join("-") }}
+                                </p>
+                                <p v-else class="is-Select">
+                                  <img src="../../../../assets/tick.png" alt="" />
+                                </p>
+                              </template>
+                            </el-calendar>
+                          </div>
+                        </div>
+                      </div>
+                    </el-col>
+                    <el-col :span="8">
+                      <div class="ranki-list">
+                        <p class="ranki-list-title">打卡PK榜</p>
+                        <ul>
+                          <li style="font-size: 12px;">
+                            <p>排名</p>
+                            <p>用户ID</p>
+                            <p>打卡天数</p>
+                          </li>
+                          <li v-for="(item, index) in  rankiList" :key="index">
+                            <p>{{ index > 8 ? index + 1 : '0' + (index + 1) }}</p>
+                            <p>
+                              <el-image :src="$tools.splitImgHost(item.avatar)">
+                                <div slot="error" class="image-slot">
+                                  <i class="el-icon-picture-outline"></i>
+                                </div>
+                              </el-image>
+                              {{ item.userName }}
                             </p>
-                          </template>
-                        </el-calendar>
+                            <p style="color: #222222;">{{ item.recordCount }}</p>
+                          </li>
+                        </ul>
                       </div>
-                    </div>
-                  </div>
+                    </el-col>
+                  </el-row>
+
                 </template>
                 <div class="no-data" v-else>
                   <div>
@@ -64,19 +81,12 @@
                   </div>
                 </div>
               </div>
-              <div
-                v-else-if="tab.paperName == '随机练习'"
-                style="background: #f8f8fa; padding: 20px"
-              >
+              <div v-else-if="tab.paperName == '随机练习'" style="background: #f8f8fa; padding: 20px">
                 <div class="random-box">
                   <div class="random-box-top">
                     <p class="random-box-title">试卷情况</p>
                     <div class="random-box-top-num">
-                      <img
-                        style="margin-right: 12px"
-                        src="../../../../assets/testpaper.png"
-                        alt=""
-                      />
+                      <img style="margin-right: 12px" src="../../../../assets/testpaper.png" alt="" />
                       <div>
                         <p>{{ tab.examInfo ? tab.examInfo.doNum : "-" }}</p>
                         <p>已完成提数</p>
@@ -90,13 +100,13 @@
                       <div>
                         <p>
                           {{
-                            tab.examInfo
-                              ? toFixed(
+                              tab.examInfo
+                                ? toFixed(
                                   (tab.examInfo.rightNum /
                                     tab.examInfo.totalNum) *
-                                    100
+                                  100
                                 )
-                              : "-"
+                                : "-"
                           }}%
                         </p>
                         <p>正确率</p>
@@ -106,19 +116,12 @@
                   <div class="random-box-bom">
                     <p class="random-box-title">做题数量</p>
                     <div class="sle-num-box">
-                      <div
-                        :class="activeNum == val ? 'actvie' : ''"
-                        v-for="val in numList"
-                        :key="val"
-                        @click="handelNum(val)"
-                      >
+                      <div :class="activeNum == val ? 'actvie' : ''" v-for="val in numList" :key="val"
+                        @click="handelNum(val)">
                         {{ val }}
                       </div>
                     </div>
-                    <div
-                      class="random-box-bom-btn"
-                      @click="beginExam(tab.examInfo)"
-                    >
+                    <div class="random-box-bom-btn" @click="beginExam(tab.examInfo)">
                       开始做题
                     </div>
                   </div>
@@ -126,71 +129,37 @@
               </div>
               <div class="goods-menu" v-else>
                 <div class="goods-menu__body">
-                  <div
-                    class="item"
-                    v-for="(item, index) in bankList"
-                    :key="index"
-                  >
+                  <div class="item" v-for="(item, index) in bankList" :key="index">
                     <template v-if="item.type == 1">
                       <div class="item__title" @click="moduleExam(item)">
                         {{ item.name }}
-                        <span
-                          style="float: right; color: #99a0a7; font-weight: 400"
-                          >{{ item.showList ? "收起∧" : "展开∨" }}
+                        <span style="float: right; color: #99a0a7; font-weight: 400">{{ item.showList ? "收起∧" : "展开∨" }}
                         </span>
                       </div>
                       <div class="item__content" v-if="item.showList">
                         <div class="bank-chapter">
-                          <div
-                            class="bank-chapter__item"
-                            v-for="(chapter, chapterIndex) in item.list"
-                            :key="chapterIndex"
-                          >
-                            <div
-                              class="bank-chapter__item__text"
-                              @click="chapterExam(chapter, item.majorId)"
-                            >
-                              <span
-                                style="
+                          <div class="bank-chapter__item" v-for="(chapter, chapterIndex) in item.list"
+                            :key="chapterIndex">
+                            <div class="bank-chapter__item__text" @click="chapterExam(chapter, item.majorId)">
+                              <span style="
                                   margin-left: 21px;
                                   margin-right: 8px;
                                   color: #a7b0b8;
-                                "
-                                ><span v-if="chapterIndex + 1 < 10"
-                                  >0{{ chapterIndex + 1 }}</span
-                                ><span v-else>
+                                "><span v-if="chapterIndex + 1 < 10">0{{ chapterIndex + 1 }}</span><span v-else>
                                   {{ chapterIndex + 1 }}
-                                </span></span
-                              >{{ chapter.name }}
-                              <i
-                                v-if="chapter.showList"
-                                class="el-icon-arrow-up"
-                                style="float: right; margin-right: 20px"
-                              ></i>
-                              <i
-                                v-else
-                                class="el-icon-arrow-down"
-                                style="float: right; margin-right: 20px"
-                              ></i>
+                                </span></span>{{ chapter.name }}
+                              <i v-if="chapter.showList" class="el-icon-arrow-up"
+                                style="float: right; margin-right: 20px"></i>
+                              <i v-else class="el-icon-arrow-down" style="float: right; margin-right: 20px"></i>
                             </div>
 
                             <div class="bank-section" v-if="chapter.showList">
-                              <div
-                                class="bank-section__item"
-                                v-for="(section, sectionIndex) in chapter.list"
-                                :key="sectionIndex"
-                              >
+                              <div class="bank-section__item" v-for="(section, sectionIndex) in chapter.list"
+                                :key="sectionIndex">
                                 <div class="bank-section__item__text">
-                                  <span
-                                    style="margin-right: 8px; color: #a7b0b8"
-                                    >●</span
-                                  >
+                                  <span style="margin-right: 8px; color: #a7b0b8">●</span>
                                   {{ section.examName }}
-                                  <span
-                                    v-if="section.newRecordStatus"
-                                    class="upStudyStyle"
-                                    >上次做到</span
-                                  >
+                                  <span v-if="section.newRecordStatus" class="upStudyStyle">上次做到</span>
                                 </div>
                                 <div class="btn_div">
                                   <!-- 正确率
@@ -202,64 +171,44 @@
                                       )
                                     }}%</span
                                   > -->
-                                  <span style="margin-left: 6px">题目数: </span
-                                  ><span style="color: blue">{{
-                                    section.doQuestionNum || 0
+                                  <span style="margin-left: 6px">题目数: </span><span style="color: blue">{{
+                                      section.doQuestionNum || 0
                                   }}</span>
                                   /
                                   {{ section.questionNum || 0 }}
                                 </div>
-                                <el-button
-                                  v-if="section.recordStatus == -1"
-                                  type="primary"
-                                  @click="
-                                    toDo(
-                                      section,
-                                      chapter.chapterExamId,
-                                      item.majorId
-                                    )
-                                  "
-                                  class="btn"
-                                  >开始做题</el-button
-                                >
-                                <el-button
-                                  v-if="
-                                    section.recordStatus == 0 &&
-                                    section.doType == 1
-                                  "
-                                  type="primary"
-                                  @click="
-                                    continueDo(
-                                      section,
-                                      chapter.chapterExamId,
-                                      item.majorId
-                                    )
-                                  "
-                                  class="btn"
-                                  >继续做题</el-button
-                                >
-
-                                <el-button
-                                  v-if="
-                                    section.recordStatus == 1 ||
-                                    (section.recordStatus == 0 &&
-                                      section.doType == 2)
-                                  "
-                                  :disabled="
-                                    section.answerNum > 0 &&
-                                    section.doNum >= section.answerNum
-                                  "
-                                  type="primary"
-                                  @click="
-                                    doRepeat(
-                                      section,
-                                      chapter.chapterExamId,
-                                      item.majorId
-                                    )
-                                  "
-                                  class="btn"
-                                  >重新做题</el-button
-                                >
+                                <el-button v-if="section.recordStatus == -1" type="primary" @click="
+                                  toDo(
+                                    section,
+                                    chapter.chapterExamId,
+                                    item.majorId
+                                  )
+                                " class="btn">开始做题</el-button>
+                                <el-button v-if="
+                                  section.recordStatus == 0 &&
+                                  section.doType == 1
+                                " type="primary" @click="
+  continueDo(
+    section,
+    chapter.chapterExamId,
+    item.majorId
+  )
+" class="btn">继续做题</el-button>
+
+                                <el-button v-if="
+                                  section.recordStatus == 1 ||
+                                  (section.recordStatus == 0 &&
+                                    section.doType == 2)
+                                " :disabled="
+  section.answerNum > 0 &&
+  section.doNum >= section.answerNum
+" type="primary" @click="
+  doRepeat(
+    section,
+    chapter.chapterExamId,
+    item.majorId
+  )
+" class="btn">重新做题</el-button>
                               </div>
                             </div>
                           </div>
@@ -271,57 +220,29 @@
                       <div class="item__content">
                         <div class="bank-chapter">
                           <div class="bank-chapter__item">
-                            <div
-                              class="bank-chapter__item__text"
-                              @click="chapterExam(item, 0)"
-                            >
-                              <span
-                                style="
+                            <div class="bank-chapter__item__text" @click="chapterExam(item, 0)">
+                              <span style="
                                   margin-left: 21px;
                                   margin-right: 8px;
                                   color: #a7b0b8;
-                                "
-                              >
-                                <span v-if="index + 1 < 10"
-                                  >0{{ index + 1 }}</span
-                                ><span v-else>
+                                ">
+                                <span v-if="index + 1 < 10">0{{ index + 1 }}</span><span v-else>
                                   {{ index + 1 }}
-                                </span> </span
-                              >{{ item.name }}
-                              <i
-                                v-if="item.showList"
-                                class="el-icon-arrow-up"
-                                style="float: right; margin-right: 20px"
-                              ></i>
-                              <i
-                                v-else
-                                class="el-icon-arrow-down"
-                                style="float: right; margin-right: 20px"
-                              ></i>
+                                </span> </span>{{ item.name }}
+                              <i v-if="item.showList" class="el-icon-arrow-up"
+                                style="float: right; margin-right: 20px"></i>
+                              <i v-else class="el-icon-arrow-down" style="float: right; margin-right: 20px"></i>
                             </div>
 
                             <div class="bank-section" v-if="item.showList">
-                              <div
-                                class="bank-section__item"
-                                v-for="(section, sectionIndex) in item.list"
-                                :key="sectionIndex"
-                              >
+                              <div class="bank-section__item" v-for="(section, sectionIndex) in item.list"
+                                :key="sectionIndex">
                                 <div class="bank-section__item__text">
-                                  <span
-                                    style="margin-right: 8px; color: #a7b0b8"
-                                    >●</span
-                                  >
+                                  <span style="margin-right: 8px; color: #a7b0b8">●</span>
                                   {{ section.examName }}
-                                  <span
-                                    v-if="section.newRecordStatus"
-                                    class="upStudyStyle"
-                                    >上次做到</span
-                                  >
+                                  <span v-if="section.newRecordStatus" class="upStudyStyle">上次做到</span>
                                 </div>
-                                <div
-                                  style="width: auto; padding: 0px 14px"
-                                  class="btn_div"
-                                >
+                                <div style="width: auto; padding: 0px 14px" class="btn_div">
                                   <!-- 正确率
                                   <span style="color: rgb(52, 216, 71)"
                                     >{{
@@ -331,45 +252,28 @@
                                       )
                                     }}%</span
                                   > -->
-                                  <span style="margin-left: 6px">题目数: </span
-                                  ><span style="color: blue">{{
-                                    section.doQuestionNum || 0
+                                  <span style="margin-left: 6px">题目数: </span><span style="color: blue">{{
+                                      section.doQuestionNum || 0
                                   }}</span>
                                   /
                                   {{ section.questionNum || 0 }}
                                 </div>
-                                <el-button
-                                  v-if="section.recordStatus == -1"
-                                  type="primary"
-                                  @click="toDo(section, item.majorId, 0)"
-                                  class="btn"
-                                  >开始做题</el-button
-                                >
-                                <el-button
-                                  v-if="
-                                    section.recordStatus == 0 &&
-                                    section.doType == 1
-                                  "
-                                  type="primary"
-                                  @click="continueDo(section, item.majorId, 0)"
-                                  class="btn"
-                                  >继续做题
+                                <el-button v-if="section.recordStatus == -1" type="primary"
+                                  @click="toDo(section, item.majorId, 0)" class="btn">开始做题</el-button>
+                                <el-button v-if="
+                                  section.recordStatus == 0 &&
+                                  section.doType == 1
+                                " type="primary" @click="continueDo(section, item.majorId, 0)" class="btn">继续做题
                                 </el-button>
 
-                                <el-button
-                                  v-if="
-                                    section.recordStatus == 1 ||
-                                    (section.recordStatus == 0 &&
-                                      section.doType == 2)
-                                  "
-                                  :disabled="
-                                    section.answerNum > 0 &&
-                                    section.doNum >= section.answerNum
-                                  "
-                                  type="primary"
-                                  @click="doRepeat(section, item.majorId, 0)"
-                                  class="btn"
-                                  >重新做题
+                                <el-button v-if="
+                                  section.recordStatus == 1 ||
+                                  (section.recordStatus == 0 &&
+                                    section.doType == 2)
+                                " :disabled="
+  section.answerNum > 0 &&
+  section.doNum >= section.answerNum
+" type="primary" @click="doRepeat(section, item.majorId, 0)" class="btn">重新做题
                                 </el-button>
                               </div>
                             </div>
@@ -383,20 +287,11 @@
                         <div class="bank-section">
                           <div class="bank-section__item">
                             <div class="bank-section__item__text">
-                              <span style="margin-right: 8px; color: #a7b0b8"
-                                >●</span
-                              >
+                              <span style="margin-right: 8px; color: #a7b0b8">●</span>
                               {{ item.name }}
-                              <span
-                                v-if="item.newRecordStatus"
-                                class="upStudyStyle"
-                                >上次做到</span
-                              >
+                              <span v-if="item.newRecordStatus" class="upStudyStyle">上次做到</span>
                             </div>
-                            <div
-                              style="width: auto; padding: 0px 14px"
-                              class="btn_div"
-                            >
+                            <div style="width: auto; padding: 0px 14px" class="btn_div">
                               <!-- 正确率
                               <span style="color: rgb(52, 216, 71)"
                                 >{{
@@ -406,41 +301,23 @@
                                   )
                                 }}%</span
                               > -->
-                              <span style="margin-left: 6px">题目数: </span
-                              ><span style="color: blue">{{
-                                item.doQuestionNum || 0
+                              <span style="margin-left: 6px">题目数: </span><span style="color: blue">{{
+                                  item.doQuestionNum || 0
                               }}</span>
                               / {{ item.questionNum || 0 }}
                             </div>
-                            <el-button
-                              v-if="item.recordStatus == -1"
-                              type="primary"
-                              @click="toDo(item, 0, 0)"
-                              class="btn"
-                              >开始做题</el-button
-                            >
-                            <el-button
-                              v-if="item.recordStatus == 0 && item.doType == 1"
-                              type="primary"
-                              @click="continueDo(item, 0, 0)"
-                              class="btn"
-                              >继续做题</el-button
-                            >
-
-                            <el-button
-                              v-if="
-                                item.recordStatus == 1 ||
-                                (item.recordStatus == 0 && item.doType == 2)
-                              "
-                              :disabled="
-                                item.answerNum > 0 &&
-                                item.doNum >= item.answerNum
-                              "
-                              type="primary"
-                              @click="doRepeat(item, 0, 0)"
-                              class="btn"
-                              >重新做题</el-button
-                            >
+                            <el-button v-if="item.recordStatus == -1" type="primary" @click="toDo(item, 0, 0)"
+                              class="btn">开始做题</el-button>
+                            <el-button v-if="item.recordStatus == 0 && item.doType == 1" type="primary"
+                              @click="continueDo(item, 0, 0)" class="btn">继续做题</el-button>
+
+                            <el-button v-if="
+                              item.recordStatus == 1 ||
+                              (item.recordStatus == 0 && item.doType == 2)
+                            " :disabled="
+  item.answerNum > 0 &&
+  item.doNum >= item.answerNum
+" type="primary" @click="doRepeat(item, 0, 0)" class="btn">重新做题</el-button>
                           </div>
                         </div>
                       </div>
@@ -488,9 +365,10 @@ export default {
       numList: [5, 10, 15, 20, 50, 100],
       activeNum: 5,
       punchList: [],
+      rankiList: []
     };
   },
-  mounted() {},
+  mounted() { },
   computed: {
     compyRecommend: function () {
       return function (array) {
@@ -749,9 +627,14 @@ export default {
       if (item.paperName == "每日一练") {
         this.$request.getToDayExam(this.goodsId).then((res) => {
           this.$set(item, "examInfo", res.data);
-        });
-        this.$request.getPunchRecord({ goodsId: this.goodsId }).then((res) => {
-          this.punchList = res.data;
+          if (res.data) {
+            this.$request.getPunchRecord({ goodsId: this.goodsId }).then((res) => {
+              this.punchList = res.data;
+            });
+            this.$request.getRankiList(this.goodsId).then((res) => {
+              this.rankiList = res.data;
+            });
+          }
         });
         return;
       } else if (item.paperName == "随机练习") {
@@ -1170,6 +1053,7 @@ export default {
 
     &__body {
       .left-box {
+
         // float: left;
         // width: 768px;
         .day-box {
@@ -1182,6 +1066,7 @@ export default {
           padding-left: 36px;
           padding-top: 16px;
           position: relative;
+
           div {
             &:nth-of-type(1) {
               p {
@@ -1230,6 +1115,69 @@ export default {
           }
         }
 
+        .ranki-list {
+          padding: 20px 16px 0;
+          background: #FFFFFF;
+
+          .ranki-list-title {
+            color: #484848;
+            font-size: 14px;
+            font-weight: bold;
+            border-bottom: 1px solid #E9E9E9;
+            padding-bottom: 14px;
+          }
+
+          ul {
+            height: 520px;
+
+            li {
+              height: 30px;
+              line-height: 30px;
+              display: flex;
+              color: #6C7386;
+              margin-bottom: 16px;
+
+              p {
+                &:nth-of-type(1) {
+                  width: 42px;
+                  padding-left: 16px;
+                }
+
+                &:nth-of-type(2) {
+                  flex: 1;
+                  margin-left: 24px;
+                  display: flex;
+                  align-items: center;
+
+                  .el-image {
+                    width: 30px;
+                    height: 30px;
+                    border-radius: 50%;
+                    margin-right: 12px;
+                  }
+                }
+
+                &:nth-of-type(3) {
+                  padding-right: 16px;
+
+                }
+              }
+
+              &:nth-of-type(1) {
+                height: 40px;
+                line-height: 40px;
+                background: #F8F8FA;
+                color: #888691;
+                margin-bottom: 8px;
+
+                p {
+                  font-size: 13px;
+                }
+              }
+            }
+          }
+        }
+
         .no-data {
           padding: 90px 0;
 

+ 69 - 8
src/pages/person-center/my-course/index.vue

@@ -38,6 +38,11 @@
           @click="changeTest()"
           >预约考试
         </el-button>
+        <div class="note">
+          {{ goodsData.courseNum }}课程
+          {{ goodsData.secAllNum + goodsData.examNum }}节
+          {{ goodsData.classHours }}学时
+        </div>
       </h4>
       <div style="margin: 14px 0px">
         <el-button
@@ -46,7 +51,7 @@
           :type="newActiveSubjectId === item.id ? 'primary' : ''"
           :key="index"
           @click="newActiveSubjectId = item.id"
-          >{{ item.name }}</el-button
+          >{{ item.name }}1</el-button
         >
       </div>
       <div
@@ -149,7 +154,8 @@
                               v-if="i.doType == 1"
                               @click="getResource(item, i, 3)"
                               >进入学习</el-button
-                            ><el-button
+                            >
+                            <el-button
                               size="mini"
                               style="width: 90px !important"
                               type="text"
@@ -205,6 +211,16 @@
                                   : ""
                               }}</span>
                               <span class="span_style">{{ is.name }}</span>
+                              <!-- <div
+                                class="btn btn--green"
+                                v-if="
+                                  is.studyDuration > 0 &&
+                                  is.durationTime > 0 &&
+                                  is.studyDuration == is.durationTime
+                                "
+                              >
+                                已学完
+                              </div> -->
                               <span v-if="is.recordStatus" class="upStudyStyle"
                                 >上次学到</span
                               >
@@ -262,7 +278,8 @@
                                 v-if="is.doType == 1"
                                 @click="getResource(item, is, 1)"
                                 >进入学习</el-button
-                              ><el-button
+                              >
+                              <el-button
                                 size="mini"
                                 style="width: 90px !important"
                                 type="text"
@@ -310,8 +327,9 @@
                                 "
                                 @click="studyFunc(item, is)"
                                 >未开始</el-button
-                              > </el-col
-                            ><el-col :span="2" :offset="1" v-else>
+                              >
+                            </el-col>
+                            <el-col :span="2" :offset="1" v-else>
                               <el-button
                                 size="mini"
                                 plain
@@ -446,7 +464,8 @@
                             v-if="i.doType == 1"
                             @click="getResource(item, i, 1)"
                             >进入学习</el-button
-                          ><el-button
+                          >
+                          <el-button
                             size="mini"
                             style="width: 90px !important"
                             type="text"
@@ -608,7 +627,8 @@
                         v-if="items.doType == 1"
                         @click="getResource(item, items, 2)"
                         >进入学习</el-button
-                      ><el-button
+                      >
+                      <el-button
                         size="mini"
                         style="width: 90px !important"
                         type="text"
@@ -1799,19 +1819,28 @@ export default {
   color: #222;
   font-weight: bold;
   font-size: 24px;
-  padding: 28px 0px;
+  padding: 28px 0px 20px;
   border-bottom: 1px solid #eee;
+  .note {
+    margin: 4px 0 0 10px;
+    color: #777777;
+    font-size: 16px;
+    font-weight: 500;
+  }
 }
+
 .firstTop {
   padding: 24px 0px;
   // margin: 24px 0px;
   display: flex;
   align-items: center;
   justify-content: space-between;
+
   .doubles {
     display: flex;
     align-items: center;
   }
+
   .iconStyle {
     background-color: #3f8dfd;
     color: #fff;
@@ -1821,11 +1850,13 @@ export default {
     font-size: 12px;
     vertical-align: text-top;
   }
+
   .titles {
     font-weight: bold;
     color: #333;
     font-size: 18px;
   }
+
   .showHide {
     cursor: pointer;
     user-select: none;
@@ -1833,12 +1864,14 @@ export default {
     color: #99a0a7;
   }
 }
+
 .moduleStyle {
   padding: 17px;
   background-color: #f8f8f9;
   font-weight: bold;
   color: #222;
   margin-bottom: 16px;
+
   .showHide {
     cursor: pointer;
     user-select: none;
@@ -1846,8 +1879,10 @@ export default {
     color: #99a0a7;
   }
 }
+
 .chapterStyle {
   font-weight: 400;
+
   .iconStyle {
     background-color: #fff;
     color: #3f8dfd;
@@ -1858,25 +1893,30 @@ export default {
     font-size: 10px;
     vertical-align: text-top;
   }
+
   .showHide {
     cursor: pointer;
     user-select: none;
     float: right;
     color: #99a0a7;
   }
+
   margin-bottom: 16px;
   padding: 17px;
   border-bottom: 1px solid #eee;
 }
+
 .sectionStyle {
   color: #99a0a7;
   padding: 10px;
+
   .iconStyles {
     color: #99a0a7;
     margin-right: 8px;
     padding: 0px 2px;
   }
 }
+
 .upStudyStyle {
   background-color: #f2f7ff;
   border: 1px solid #3f8dfd;
@@ -1884,6 +1924,7 @@ export default {
   padding: 3px 4px;
   border-radius: 4px;
 }
+
 .sizeStyle {
   font-size: 12px;
   background-color: #fff !important;
@@ -1891,28 +1932,47 @@ export default {
   color: #979ea5 !important;
   padding: 2px 3px !important;
 }
+
 .hoverStyle {
   cursor: pointer;
   transition: all 0.2s;
+
   &:hover {
     background-color: #eaf3ff;
   }
 }
+
+.btn--green {
+  display: inline-block;
+  margin-left: 16px;
+  border: 1px solid #34c759;
+  background: #34c759;
+  width: 48px;
+  height: 20px;
+  border-radius: 4px;
+  line-height: 18px;
+  color: #fff;
+  text-align: center;
+}
 .hoverStyleSection {
   transition: all 0.2s;
+
   &:hover {
     background-color: #eaf3ff;
   }
 }
+
 .span_style {
   max-width: 400px;
   display: inline-block;
   vertical-align: middle;
 }
+
 // 老师名字样式
 .teacher_names {
   display: flex;
   margin-left: 20px;
+
   .names {
     font-size: 13px;
     color: #666666;
@@ -1921,6 +1981,7 @@ export default {
     background: #f8f8f8;
     border-radius: 4px;
     padding: 3px 6px;
+
     &.nactive {
       color: #3f8dfd;
       background: #f2f7ff;