4 Commits 069dd1171e ... ab225f8e26

Autor SHA1 Mensagem Data
  y595705120 ab225f8e26 视频 1 mês atrás
  y595705120 ef41db2702 自动播放下一个 1 mês atrás
  y595705120 7eaa33f3ae 页面调整 1 mês atrás
  y595705120 5d3541fec4 开启画中画 3 anos atrás

+ 1 - 1
src/containers/center/components/menu/iheader.vue

@@ -14,7 +14,7 @@
         </li>
 
         <li :class="{'navfirst': isActive('/center/class/train')}">
-          <a href="#/center/class/train" @click="goto('/center/class/train')">我的课程</a>
+          <a href="#/center/class/train" @click="goto('/center/class/train')">我的学习</a>
         </li>
 
         <li :class="{'navfirst': isActive('/center/market')}">

+ 1 - 1
src/containers/center/components/menu/menu.js

@@ -11,7 +11,7 @@ const menu = [
 	},
    {
      path: '/center/class/train',
-     name: '我的课程',
+     name: '我的学习',
      icon: 'ico-course'
    },
    {

+ 4 - 0
src/containers/center/components/navbar/index.css

@@ -105,6 +105,10 @@
 .header .nav .ico-center {
   background-position: -240px 0;
 }
+
+.header .nav .ico-course {
+  background-position: -96px -428px;
+}
 .header .nav .ico-exit {
   background-position: -270px 0;
 }

+ 3 - 3
src/containers/center/components/navbar/index.vue

@@ -25,9 +25,9 @@
           <span class="nav-txt">继续教育</span>
         </a>
 
-        <a href="javascript:void(0)" @click="gotoPage('/center/trainMarket')" :class="{'current': $route.path == '/center/trainMarket'}">
-          <span class="p-ico2 ico-bmpx"></span>
-          <span class="nav-txt">教育培训</span>
+        <a href="javascript:void(0)" @click="gotoPage('/center/class/train')" :class="{'current': $route.path == '/center/class/train'}">
+          <span class="p-ico2 ico-course"></span>
+          <span class="nav-txt">我的学习</span>
         </a>
 
         <span class="p-ico2 ico-line"></span>

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

@@ -244,7 +244,7 @@ export default {
       let courseId = this.info.courseId
       this.timer &&  window.clearInterval(this.timer);
       delExam( )
-      this.$router.push(`/center/play/${courseId}`);
+      this.$router.push({name:'play', params:{courseId}})
     },
     submitPaper() {
       let that = this

+ 1 - 1
src/containers/center/exam/indexTest.vue

@@ -314,7 +314,7 @@ export default {
       let courseId = this.info.courseId
       this.timer &&  window.clearInterval(this.timer);
       delExam( )
-      this.$router.push(`/center/play/${courseId}`);
+      this.$router.push({name:'play', params:{courseId}})
     },
     submitPaper() {
       let that = this

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

@@ -497,7 +497,7 @@
         this.showAllRzcodeDialog = false;
       },
       gotoDetail(courseId) {
-        this.$router.push(`/main/course/${courseId}`);
+        this.$router.push({name:'play', params:{courseId}})
       },
       goPay(item) {
         this.showPay = false;
@@ -517,7 +517,7 @@
         });
       },
       gotoPlay(item) {
-        let courseId = item.courseId;
+        let courseId = item.course_id || item.courseId;
         if( curDatetime() < item.startDate){
           this.$message.warning("还未到学习时间");
           return

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

@@ -476,7 +476,7 @@
         })
       },
       gotoDetail(courseId) {
-        this.$router.push(`/main/course/${courseId}`);
+        this.$router.push({name:'play', params:{courseId}})
       },
       uploadBuyImg(url) {
         this.buyForm.buyImg = url;

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

@@ -474,29 +474,29 @@
           position: curTimes,
           isFinish
         };
+        let that = this
         httpServer("course.tick", param, true).then(res => {
           if (res.code == 200) {
             let {
               skip,
               position,
               pause,
+              msg,
               closed
             } = res.data
-            if (pause || closed) {
-              this.doPause();
-              if (closed) {
-                this.$message.errorMsg("禁止多处同时学习", 5);
-              } else if (pause) {
-                this.$message.errorMsg("禁止多处同时学习", 5);
-              }
+
+            if(closed){
+              that.$message.errorMsg(msg, 10)
+              return
+            }
+            if (pause) {
+              that.$message.errorMsg(msg, 10)
+              setTimeout(that.playNext(), 10*1000)
               return
             }
-              if (!skip) {
-                let curTimes = parseInt(this.getPlayerTime())
-                if (position < curTimes + 5) {
-                  this.setposition(position)
-                }
-              }
+            if (!skip) {
+              this.setposition(position)
+            }
             Object.assign(this.media, res.data)
             if( res.data.isFinish == 1){
               this.playNext()
@@ -506,6 +506,7 @@
       },
       loadMedia(item) {
         this.media = item;
+        this.stopTick()
         httpServer('course.GetMedia', {
           id: item.id
         }).then(res => {
@@ -525,7 +526,6 @@
           this.onPlay = false
           this.hasSeeked = false
           this.hiddenStartTime = 0
-          this.stopTick()
           this.options = {
             ...this.options,
             sources: [{

+ 1 - 5
src/containers/login/login.vue

@@ -180,11 +180,7 @@ export default {
          this.$message.errorMsg("暂未开放", 1)
          return
       }
-      if( item.isNew){
-        this.$router.push( {path:'/center/trainMarket', query:{type: item.name}})
-      }else{
-        this.$router.push( {path:'/center/market', query:{type: item.name}})
-      }
+      this.$router.push( {path:'/center/market', query:{type: item.name}})
     },
     closeDialog() {
       this.loginDialog = false;

+ 2 - 2
src/containers/main/index/index.vue

@@ -177,7 +177,7 @@ export default {
       });
     },
     gotoDetail(courseId) {
-      this.$router.push(`/main/course/${courseId}`);
+      this.$router.push({name:'play', params:{courseId}})
     },
     goPay(index) {
       let item = this.list[index];
@@ -206,7 +206,7 @@ export default {
           this.user = { nickname, token, uid };
           this.loginOk = true
           this.loginDialog = false
-        } 
+        }
       })
      }
   },

+ 0 - 4
src/router/index.js

@@ -192,10 +192,6 @@ export default new Router({
           path: 'market',
           component: CenterMarket,
         },
-        {
-          path: 'trainMarket',
-          component: CenterTrainMarket,
-        },
         {
           path: 'sign',
           component: CenterSign,