Browse Source

记录最新学习课节

natasha 1 year ago
parent
commit
0e239cc47c

+ 20 - 20
src/views/bookShelf/components/CourseList.vue

@@ -38,25 +38,25 @@ export default {
     handleLink(item,flag,index){
         if(flag){
             let url  = this.LoginNavIndex +'&&&'+ this.userBg +'&&&'+ this.headerBorder +'&&&'+ this.headerBg
-            if(getToken()){
-                let MethodName = "/CourseServer/Client/ReadingManager/RecordMyPlayLocation_LBCourse";
-                let data = {
-                    cs_item_id: item.id
-                }
-                getLogin(MethodName, data)
-                .then((res) => {
-                    if(res.status === 1){
-                        this.$router.push({
-                            path: this.cardType===1?"/courseDetail":"/videoDetail",
-                            query: {
-                                headerConfig: encodeURIComponent(url),
-                                index: index,
-                                id: this.$route.query.id?this.$route.query.id:''
-                            },
-                        });
-                    }
-                })
-            }else{
+            // if(getToken()){
+            //     let MethodName = "/CourseServer/Client/ReadingManager/RecordMyPlayLocation_LBCourse";
+            //     let data = {
+            //         cs_item_id: item.id
+            //     }
+            //     getLogin(MethodName, data)
+            //     .then((res) => {
+            //         if(res.status === 1){
+            //             this.$router.push({
+            //                 path: this.cardType===1?"/courseDetail":"/videoDetail",
+            //                 query: {
+            //                     headerConfig: encodeURIComponent(url),
+            //                     index: index,
+            //                     id: this.$route.query.id?this.$route.query.id:''
+            //                 },
+            //             });
+            //         }
+            //     })
+            // }else{
                 this.$router.push({
                     path: this.cardType===1?"/courseDetail":"/videoDetail",
                     query: {
@@ -65,7 +65,7 @@ export default {
                         id: this.$route.query.id?this.$route.query.id:''
                     },
                 });
-            }
+            // }
         }
     }
   },

+ 9 - 0
src/views/bookShelf/courseDetail.vue

@@ -205,6 +205,15 @@ export default {
         .catch(() => {
             this.loading = false
         });
+        if(getToken()){
+            let MethodName = "/CourseServer/Client/ReadingManager/RecordMyPlayLocation_LBCourse";
+            let data = {
+                cs_item_id: index||index===0?this.lessonCatalog[index].id:this.lessonCatalog[this.lessonIndex].id
+            }
+            getLogin(MethodName, data)
+            .then((res) => {
+            })
+        }
     },
     // 添加播放记录
     addPlayRecord(){

+ 12 - 1
src/views/bookShelf/videoDetail.vue

@@ -301,7 +301,18 @@ export default {
                 this.player.on('ended',()=>{
                     clearInterval(this.timer);
                 })
-                this.getBarrageList()
+                if(this.isDanmu){
+                    this.getBarrageList()
+                }
+                if(getToken()){
+                    let MethodName = "/CourseServer/Client/ReadingManager/RecordMyPlayLocation_LBCourse";
+                    let data = {
+                        cs_item_id: index||index===0?this.lessonCatalog[index].id:this.lessonCatalog[this.lessonIndex].id
+                    }
+                    getLogin(MethodName, data)
+                    .then((res) => {
+                    })
+                }
             }
         })
         .catch(() => {