Browse Source

未完成不能考试

y595705120 2 months ago
parent
commit
eafb1f37ba

+ 2 - 0
src/containers/center/play/components/media.vue

@@ -22,6 +22,7 @@
   import {videoPlayer } from 'vue-video-player';
   import 'video.js/dist/video-js.css'
   import { MessageBox } from "element-ui";
+import { config } from "shelljs";
   export default {
     name: "Index",
     data() {
@@ -123,6 +124,7 @@
       },
       updateBlurtime(){
          this.onblurTime = Date.now() + 15*60 * 1000
+         console.log("updateBlurtime", this.onblurTimes)
       },
       startMonitor() {
         let that = this

+ 4 - 0
src/containers/center/play/index.vue

@@ -254,6 +254,10 @@
     methods: {
       startExam() {
         let courseId = this.courseId
+        if (this.info.getXs < this.info.totalXs) {
+          this.$message.errorMsg("课程还未完成", 2)
+          return;
+        }
         delExam()
         this.$router.push(`/center/exam/${courseId}`);
       },