y595705120 21 часов назад
Родитель
Сommit
ab225f8e26
2 измененных файлов с 15 добавлено и 11 удалено
  1. 1 1
      src/containers/center/market/index.vue
  2. 14 10
      src/containers/center/play/play.vue

+ 1 - 1
src/containers/center/market/index.vue

@@ -517,7 +517,7 @@
         });
       },
       gotoPlay(item) {
-        let courseId = item.course_id;
+        let courseId = item.course_id || item.courseId;
         if( curDatetime() < item.startDate){
           this.$message.warning("还未到学习时间");
           return

+ 14 - 10
src/containers/center/play/play.vue

@@ -481,18 +481,22 @@
               skip,
               position,
               pause,
+              msg,
               closed
             } = res.data
-              if (pause || closed) {
-                that.playNext()
-                return
-              }
-              if (!skip) {
-                let curTimes = parseInt(this.getPlayerTime())
-                if (position < curTimes + 5) {
-                  this.setposition(position)
-                }
-              }
+
+            if(closed){
+              that.$message.errorMsg(msg, 10)
+              return
+            }
+            if (pause) {
+              that.$message.errorMsg(msg, 10)
+              setTimeout(that.playNext(), 10*1000)
+              return
+            }
+            if (!skip) {
+              this.setposition(position)
+            }
             Object.assign(this.media, res.data)
             if( res.data.isFinish == 1){
               this.playNext()