Tang 2 年之前
父節點
當前提交
fa008ce8ac

+ 1 - 1
build/webpack.base.conf.js

@@ -17,7 +17,7 @@ module.exports = {
   },
   output: {
     path: config.build.assetsRoot,
-    filename: '[name].js',
+    filename: '[name].[hash].js',
     publicPath: process.env.NODE_ENV === 'production'
       ? config.build.assetsPublicPath
       : config.dev.assetsPublicPath

+ 2 - 2
build/webpack.prod.conf.js

@@ -46,8 +46,8 @@ const webpackConfig = merge(baseWebpackConfig, {
   devtool: config.build.productionSourceMap ? config.build.devtool : false,
   output: {
     path: config.build.assetsRoot,
-    filename: utils.assetsPath('js/[name].[chunkhash].js'),
-    chunkFilename: utils.assetsPath('js/[id].[chunkhash].js')
+    filename: utils.assetsPath('js/[name].[hash].js'),
+    chunkFilename: utils.assetsPath('js/[id].[hash].js')
   },
   plugins: [
     // http://vuejs.github.io/vue-loader/en/workflow/production.html

+ 14 - 2
src/apis/course.js

@@ -247,7 +247,12 @@ export default {
 			params: data
 		})
 	},
-
+	orderstudycheck(data) {
+		return request({
+			url: '/order/study/check/' + data,
+			method: 'get',
+		})
+	},
 	goodsTodayStudySectionNum(data) {
 		return request({
 			url: '/goods/todayStudySectionNum',
@@ -263,7 +268,14 @@ export default {
 			data: data
 		})
 	},
-
+	
+	ordersevenyear(data) {
+		return request({
+			url: '/order/seven/year/' + data,
+			method: 'get',
+		})
+	},
+	
 	faceCertificationCompareFace(data) {
 		return request({
 			url: '/face/certification/CompareFace',

+ 8 - 5
src/axios.js

@@ -2,7 +2,7 @@ import axios from 'axios'
 import store from './store'
 import { Notification } from 'element-ui'
 export const BASE_URL = process.env.BASE_URL    //测试-外网
-// export const BASE_URL = "http://192.168.1.24:5055"    //测试-外网
+// export const BASE_URL = "http://192.168.1.7:5055"    //测试-外网
 export const tenantId = process.env.TENANT_ID
 import tools from './common/tools'
 import router from './router'
@@ -78,16 +78,19 @@ request.interceptors.response.use(async (response) => {
         title: "您已被强制下线"
       })
       store.commit('setCurrentRouter', router.currentRoute)
+      store.commit('setUserInfo', null)
       localStorage.removeItem('user_account')
       localStorage.removeItem('token')
       router.push({
         path: '/login'
       })
     } else if (code == 500) {
-      // Message({
-      //   message: res.msg,
-      //   type: "error",
-      // });
+      if (res.msg !== '无其他端在操作') {
+        // Message({
+        //   message: res.msg,
+        //   type: "error",
+        // });
+      }
       // localStorage.removeItem('user_account')
       // localStorage.removeItem('token')
       // console.log('222222')

+ 17 - 9
src/components/dataReview/index.vue

@@ -210,12 +210,20 @@ export default {
       this.STATUS = status;
       this.activeData = item;
       //获取初始数据
-      await this.getInitData();
-      //获取历史数据
-      await this.getHistoricalRecord();
-      this.isShow = true;
-      //回填数据
-      this.backFillData();
+      try {
+        await this.getInitData();
+        console.log('1')
+        //获取历史数据
+        await this.getHistoricalRecord();
+        console.log('2')
+        this.isShow = true;
+        //回填数据
+        this.backFillData();
+        console.log('3')
+      } catch (error) {
+        console.log('4')
+        console.log("抛出:", error);
+      }
     },
     getInitData() {
       return new Promise((resolve, reject) => {
@@ -230,7 +238,7 @@ export default {
             //不需要填写
             this.isShow = false;
             this.$emit("callbackDataReview");
-            return reject();
+            return reject("不需要填写");
           }
           let Ary = [
             ...JSON.parse(res.data.keyValue),
@@ -360,14 +368,14 @@ export default {
               this.isShow = false;
               //不需要填写
               this.$emit("callbackDataReview");
-              return reject();
+              return reject("不需要填写");
             }
           });
       });
     },
     //回填数据
     backFillData() {
-      if (this.historyData.id) {
+      if (this.historyData || this.historyData.id) {
         for (let i in this.historyData) {
           this.$set(this.infoForm, i, this.historyData[i].value);
         }

+ 2 - 0
src/components/rebuildModal/index.vue

@@ -102,6 +102,7 @@ export default {
         .getcourseperiodcheat({
           goodsId: item.goodsId,
           gradeId: item.gradeId,
+          orderGoodsId:item.orderGoodsId
         })
         .then((res) => {
           this.rebuildItems = res.rows;
@@ -146,6 +147,7 @@ export default {
         .courseperiodrebuild({
           goodsId: this.rebuildItem.goodsId,
           gradeId: this.rebuildItem.gradeId,
+          orderGoodsId: this.rebuildItem.orderGoodsId,
         })
         .then((res) => {
           this.showRebuildDetailModal = false;

+ 4 - 1
src/components/takePicture/index.vue

@@ -70,7 +70,8 @@ export default {
       takePhotoModal: false,
       isTaking: true,
       loading: false,
-      faceUrl: ""
+      faceUrl: "",
+      photoBadStatus:false,//摄像头无法使用触发true
     };
   },
   methods: {
@@ -136,6 +137,7 @@ export default {
         return stream.getTracks()[0].label.indexOf(e) != -1;
       });
       if (isT) {
+        this.photoBadStatus = true; //摄像头无法使用触发true
         this.$confirm("检测到你使用虚拟摄像头,无法继续学习。", "提示", {
           confirmButtonText: "返回",
           showConfirmButton: true,
@@ -152,6 +154,7 @@ export default {
     },
     //未读取到摄像头
     photographError(err) {
+      this.photoBadStatus = true; //摄像头无法使用触发true
       this.$confirm(
         "课程学习需要开启摄像头进行拍照,经检测您的设备无摄像头可使用,请检测环境是否支持。",
         "提示",

+ 22 - 8
src/components/videoCy/index.vue

@@ -37,6 +37,7 @@ export default {
       showRecordSetTimeOut: null, //从头播放提示计时器函数
       openPhotoStatus: 0, //暂存学习状态
       commitTime: null, //暂存时间-节流
+      commitTimePhoto: null, //判断拍照时刻-节流
       videoPauseSetTimeout: null, //定时器停留太久触发
       failToRegister: false //报名推送不通过
     };
@@ -75,7 +76,6 @@ export default {
       await this.getRecordHistoryPhoto(); //获取拍照历史记录
       await this.loadPlayer(); //加载播放内容
       this.player.on("s2j_onPlayerInitOver", () => {
-        this.player.HTML5.video.addEventListener("timeupdate", this.timeEvent); //监听器
         this.player.on("s2j_onPlayStart", this.onPlayStatus); //视频初次播放时触发
         this.player.on("s2j_onVideoPause", this.onVideoPause); //视频暂停时触发
         this.player.on("s2j_onVideoPlay", this.onVideoPlay); //视频初次播放或由暂停恢复播放时触发
@@ -91,7 +91,7 @@ export default {
     //初始化参数
     initData() {
       this.commitTime = null;
-      this.openPhotoStatus = 0;
+      (this.commitTimePhoto = null), (this.openPhotoStatus = 0);
       clearTimeout(this.videoPauseSetTimeout); //删除暂停计算拍照定时器
     },
     //获取播放记录
@@ -157,7 +157,7 @@ export default {
       let duration = polyvPlayerContext.j2s_getCurrentTime();
       if (this.goodsData.erJianErZao) {
         this.photoList = this.randomConfig(totalVideoTime, duration);
-      } else if (this.goodsData.jjShiGongYuan) {
+      } else if (this.goodsData.jjShiGongYuan && this.goodsData.orderYears) {
         this.photoList = this.ShiPhotoList(totalVideoTime, duration);
       } else if (this.goodsData.goodsPhotographConfig.photoNum > 0) {
         this.photoList = this.getPhotoList(
@@ -330,16 +330,25 @@ export default {
       // 定时提交学习记录
       this.submitStudyRecords();
       //拍照监听执行
-      this.watchPhoto();
+      let time = new Date().getTime();
+      if (time >= this.commitTimePhoto) {
+        this.watchPhoto();
+        this.commitTimePhoto = time + 1000;
+      }
     },
     //拍照监听执行
     watchPhoto() {
-      if (this.photoList.length == 0 || this.activeSection.learning == 1)
+      if (
+        this.photoList.length == 0 ||
+        this.activeSection.learning == 1 ||
+        this.$refs.takePicture.takePhotoModal
+      )
         return;
       let videoTime = this.player.j2s_getCurrentTime();
       let photoTime = 0; //获取拍照秒数
       for (let i = 0; i < this.photoList.length; i++) {
         photoTime = Number(this.photoList[i]); //获取拍照秒数
+        console.log(this.photoList, photoTime, videoTime);
         if (photoTime < videoTime && photoTime > videoTime - 8) {
           //3秒区间内才触发拍照,避免拉动滚动条
           if (
@@ -373,6 +382,7 @@ export default {
           this.showRecordStatus = false;
         }, 5000);
       }
+      this.player.HTML5.video.addEventListener("timeupdate", this.timeEvent); //监听器
       console.log("视频初次播放时触发", this.player.j2s_getCurrentTime());
     },
     //视频暂停时触发
@@ -622,7 +632,11 @@ export default {
     },
     //页面显示隐藏逻辑
     pauseVideo() {
-      if (this.$refs.takePicture.takePhotoModal || this.failToRegister) {
+      if (
+        this.$refs.takePicture.takePhotoModal ||
+        this.$refs.takePicture.photoBadStatus ||
+        this.failToRegister
+      ) {
         return;
       }
       let _p = this.player;
@@ -637,11 +651,11 @@ export default {
     }
   },
   beforeDestroy() {
-    this.player.HTML5.video.removeEventListener("timeupdate", this.timeEvent); //监听器
     this.$bus.$off("toPlay");
     clearTimeout(this.videoPauseSetTimeout); //删除暂停计算拍照定时器
-
+    this.player.HTML5.video.removeEventListener("timeupdate", this.timeEvent); //监听器
     document.removeEventListener("visibilitychange", this.pauseVideo);
+    this.$msgbox.close();
   }
 };
 </script>

+ 1 - 0
src/pages/bank-exam/index.vue

@@ -1199,6 +1199,7 @@ export default {
         //交卷
         next();
       } else {
+        next(false)
         //离开
         if (this.bankType == 1) {
           console.log(1);

+ 12 - 3
src/pages/cart/index.vue

@@ -94,7 +94,10 @@
                       v-if="scope.row.sevenYear && scope.row.goodsType == 1"
                     >
                       <span>七大员继教可选年份:</span>
-                      <el-checkbox-group v-model="scope.row.checkList">
+                      <el-checkbox-group
+                        v-model="scope.row.checkList"
+                        @change="checkFunc"
+                      >
                         <el-checkbox
                           v-for="(item, index) in computedSevenYear(
                             scope.row.sevenYear
@@ -246,6 +249,9 @@ export default {
   },
   methods: {
     ...mapMutations(["getCartCount"]),
+    checkFunc() {
+      this.caculate();
+    },
     areaChange(row, index) {
       console.log(row);
       let node = this.$refs["cascader" + index].getCheckedNodes()[0]; //选中的根节点
@@ -385,9 +391,12 @@ export default {
 
     caculate() {
       this.total = 0;
-
       this.multipleSelection.forEach(item => {
-        this.total += item.standPrice;
+        if (item.sevenYear) {
+          this.total += item.standPrice * item.checkList.length;
+        } else {
+          this.total += item.standPrice;
+        }
       });
     },
     pay() {

+ 31 - 17
src/pages/course-detail/components/CourseTree.vue

@@ -720,7 +720,7 @@ export default {
         await this.openChapter(item); //展开章
       } else {
         try {
-          // await this.waitCheckStatus(item); //检查是否可以继续执行
+          await this.waitCheckStatus(item); //检查是否可以继续执行
           if (item.type == 3) {
             if (item.sectionType == 1) {
               this.watchSection(item);
@@ -807,22 +807,36 @@ export default {
           return;
         }
       }
-      var query = {
-        goodsName: this.goodsData.name,
-        goodsId: this.goodsData.goodsId,
-        gradeId: this.goodsData.gradeId,
-        orderGoodsId: this.goodsData.orderGoodsId,
-        courseId: this.courseId,
-        sectionId: item.sectionId,
-        chapterId: item.chapterId,
-        moduleId: item.moduleId,
-        sectionType: item.sectionType,
-        vid: item.recordingUrl // 回放vid
-      };
-      this.$router.push({
-        path: "/living-room/" + item.liveUrl,
-        query
-      });
+      this.$confirm(
+        `确定前往观看${item.sectionType == 2 ? " [直播] " : " [回放] "}${
+          item.name
+        }?`,
+        "提示",
+        {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }
+      )
+        .then(() => {
+          var query = {
+            goodsName: this.goodsData.name,
+            goodsId: this.goodsData.goodsId,
+            gradeId: this.goodsData.gradeId,
+            orderGoodsId: this.goodsData.orderGoodsId,
+            courseId: this.courseId,
+            sectionId: item.sectionId,
+            chapterId: item.chapterId,
+            moduleId: item.moduleId,
+            sectionType: item.sectionType,
+            vid: item.recordingUrl // 回放vid
+          };
+          this.$router.push({
+            path: "/living-room/" + item.liveUrl,
+            query
+          });
+        })
+        .catch(() => {});
     },
     //跳转试卷
     async doExam(section, type) {

+ 10 - 5
src/pages/course-detail/components/coreContent.vue

@@ -79,7 +79,7 @@
 </template>
 
 <script>
-import videoCy from "@/components/videoCy";
+// import videoCy from "@/components/videoCy";
 import dataReview from "@/components/dataReview";
 import CourseTree from "./CourseTree.vue";
 import AnswerQuestions from "./AnswerQuestions.vue";
@@ -87,7 +87,7 @@ import HandOut from "./HandOut.vue";
 import Notes from "./Notes.vue";
 export default {
   components: {
-    videoCy,
+    videoCy: () => import("@/components/videoCy/index.vue"),
     Notes,
     HandOut,
     AnswerQuestions,
@@ -163,11 +163,16 @@ export default {
     async callbackDataReview() {
       if (this.goodsData.gradeId > 0) {
         await this.getGradeInfo(); //提交完资料返回判断是否已开班
-        if (this.gradeDetail.sevenYear) {
-          await this.sevenCommonCourse(); //继教七大员公共课程同步
+        //继教七大员公共课程同步
+        const res = await this.$request.ordersevenyear(
+          this.goodsData.orderGoodsId
+        );
+        if (res.data) {
+          this.goodsData.orderYears = res.data;
+          await this.sevenCommonCourse();
         }
       }
-      // await this.confirmInfoDetail(); //判断开通信息推送是否成功
+      await this.confirmInfoDetail(); //判断开通信息推送是否成功
       await this.getRebuildCourse(); //获取重修列表
       this.courseTabIndex = "1";
     },

+ 6 - 0
src/pages/course-detail/index.vue

@@ -8,6 +8,9 @@
           <el-breadcrumb-item :to="{ path: '/index' }">首页</el-breadcrumb-item>
           <el-breadcrumb-item>课程详情</el-breadcrumb-item>
         </el-breadcrumb>
+        <el-button type="primary" round size="small" @click="$router.go(-1)"
+          >返回上一页</el-button
+        >
       </div>
       <!-- 标题START -->
       <h2 class="title">{{ goodsData.goodsName }}</h2>
@@ -114,6 +117,9 @@ export default {
   width: 1200px;
   margin: 0 auto;
   & > .breadcrumb {
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
     padding: 14px 0px 0px;
     /deep/ .el-breadcrumb__inner {
       font-size: 14px;

+ 16 - 1
src/pages/course-exam/index.vue

@@ -1143,6 +1143,7 @@ export default {
   mixins: [myMixins],
   data() {
     return {
+      openPhotoStatus: 0,
       hasTake: false,
       recordId: 0,
       tabIndex: "1",
@@ -1526,6 +1527,11 @@ export default {
           this.hasTake = true;
           // console.log(res, "拍照提交结果");
           self.ossAvatarUrl = "";
+          if (this.openPhotoStatus == 1) {
+            this.openPhotoStatus = 0;
+            this.examSubmit();
+            return;
+          }
           //拍照
           if (this.lastTime) {
             this.timer = setInterval(() => {
@@ -1780,6 +1786,7 @@ export default {
           })
           .then(res => {
             this.recordId = res.data;
+            console.error(self.needPhoto , this.type , this.learning)
             //  节不需要拍照
             if (self.needPhoto && this.type != 2 && !this.learning) {
               this.openPhoto();
@@ -2561,6 +2568,12 @@ export default {
           }, 1000);
         })
         .catch(err => {
+          if (err.code === 559) {
+            this.$message.error(err.msg);
+            console.log("拍照不够触发");
+            this.openPhotoStatus = 1;
+            this.openPhoto();
+          }
           console.log(err, "err");
         });
 
@@ -2593,7 +2606,8 @@ export default {
           courseId: this.courseId,
           moduleId: this.moduleId,
           type: this.type,
-          examId: this.examId
+          examId: this.examId,
+          orderGoodsId: this.orderGoodsId,
         })
         .then(res => {
           this.learning = res.data;
@@ -2745,6 +2759,7 @@ export default {
         //交卷
         next();
       } else {
+        next(false)
         //离开
         let ansCount = this.questionOverNum(true); //已答题数
         this.lastCount = this.questionList.length - ansCount; //统计未答完的题数

+ 63 - 62
src/pages/course-report/index.vue

@@ -156,9 +156,7 @@
       <span slot="footer" class="dialog-footer">
         <el-button type="primary" @click="nextDialogStatus = false"
           >取消</el-button
-        ><el-button type="primary" @click="nextJump"
-          >确定</el-button
-        >
+        ><el-button type="primary" @click="nextJump">确定</el-button>
       </span>
     </el-dialog>
     <ToolBar></ToolBar>
@@ -182,7 +180,7 @@ export default {
   },
   data() {
     return {
-      nextDialogStatus:false,
+      nextDialogStatus: false,
       examId: "",
       courseList: [],
       pageNum: 1,
@@ -191,7 +189,7 @@ export default {
       recordId: "",
       type: 0, //type:1章卷,2节卷,3模考卷
       reportdata: {},
-      studyItem:{}
+      studyItem: {}
     };
   },
   computed: {
@@ -225,7 +223,8 @@ export default {
           .studyRecordMenuAllListWithExam({
             courseId: item.courseId,
             gradeId: item.gradeId,
-            goodsId: item.goodsId
+            goodsId: item.goodsId,
+            orderGoodsId: item.orderGoodsId
           })
           .then(res => {
             res.data = res.data.filter(
@@ -285,64 +284,63 @@ export default {
           });
       });
     },
-    async nextJump(){
+    async nextJump() {
       var item = this.reportdata;
-      var studyItem = this.studyItem
+      var studyItem = this.studyItem;
       if (studyItem.sectionId) {
-            //返回节
-            this.$router.replace({
-              path: `/my-course-detail/${item.goodsId}`,
-              query: {
-                gradeId: item.gradeId,
-                orderGoodsId: item.orderGoodsId,
-                courseId: studyItem.courseId,
-                chapterId: studyItem.chapterId,
-                moduleId: studyItem.moduleId,
-                sectionId: studyItem.sectionId,
-                recordingUrl: studyItem.recordingUrl,
-                liveUrl: studyItem.liveUrl,
-                sectionType: studyItem.sectionType,
-                liveStartTime: studyItem.liveStartTime,
-                liveEndTime: studyItem.liveEndTime
-              }
-            });
-            this.studyLog(item, studyItem);
+        //返回节
+        this.$router.replace({
+          path: `/my-course-detail/${item.goodsId}`,
+          query: {
+            gradeId: item.gradeId,
+            orderGoodsId: item.orderGoodsId,
+            courseId: studyItem.courseId,
+            chapterId: studyItem.chapterId,
+            moduleId: studyItem.moduleId,
+            sectionId: studyItem.sectionId,
+            recordingUrl: studyItem.recordingUrl,
+            liveUrl: studyItem.liveUrl,
+            sectionType: studyItem.sectionType,
+            liveStartTime: studyItem.liveStartTime,
+            liveEndTime: studyItem.liveEndTime
           }
-          if (studyItem.examId) {
-            //有次数限制
-            let num = await this.bankRecordDoNum(item, studyItem);
-            let examItem = await this.$request.getExamDetail(studyItem.examId);
-            // section.doNum
-            // record.status == 0 && record.historyExamJson 继续做题
-            if (
-              (examItem.data.answerNum - num > 0 &&
-                examItem.data.answerNum > 0) ||
-              examItem.data.answerNum == 0
-            ) {
-              this.$router.replace({
-                path: "/course-exam/" + item.goodsId,
-                query: {
-                  courseId: studyItem.courseId,
-                  gradeId: item.gradeId,
-                  moduleId: studyItem.moduleId || 0,
-                  sectionId: studyItem.sectionId || 0,
-                  examId: studyItem.examId,
-                  learning: studyItem.studyStatus,
-                  type: studyItem.examType, //题卷类型 1章卷 2节卷 3模块卷,
-                  chapterId: studyItem.chapterId || 0,
-                  orderGoodsId: item.orderGoodsId,
-                  nextStatus: "next" //是否继续播放课程
-                }
-              });
-            } else {
-              this.$message({
-                type: "warning",
-                message: "该试卷只能答题" + examItem.data.answerNum + "次"
-              });
-              return;
+        });
+        this.studyLog(item, studyItem);
+      }
+      if (studyItem.examId) {
+        //有次数限制
+        let num = await this.bankRecordDoNum(item, studyItem);
+        let examItem = await this.$request.getExamDetail(studyItem.examId);
+        // section.doNum
+        // record.status == 0 && record.historyExamJson 继续做题
+        if (
+          (examItem.data.answerNum - num > 0 && examItem.data.answerNum > 0) ||
+          examItem.data.answerNum == 0
+        ) {
+          this.$router.replace({
+            path: "/course-exam/" + item.goodsId,
+            query: {
+              courseId: studyItem.courseId,
+              gradeId: item.gradeId,
+              moduleId: studyItem.moduleId || 0,
+              sectionId: studyItem.sectionId || 0,
+              examId: studyItem.examId,
+              learning: studyItem.studyStatus,
+              type: studyItem.examType, //题卷类型 1章卷 2节卷 3模块卷,
+              chapterId: studyItem.chapterId || 0,
+              orderGoodsId: item.orderGoodsId,
+              nextStatus: "next" //是否继续播放课程
             }
-          }
-      this.nextDialogStatus = false
+          });
+        } else {
+          this.$message({
+            type: "warning",
+            message: "该试卷只能答题" + examItem.data.answerNum + "次"
+          });
+          return;
+        }
+      }
+      this.nextDialogStatus = false;
     },
     async GetNext() {
       var item = this.reportdata;
@@ -352,7 +350,7 @@ export default {
       let list = await this.studyRecordMenuAllList(item);
       //返回第一个没学习的节或试卷
       this.studyItem = this.checkListDontStudy(list);
-      this.nextDialogStatus = true
+      this.nextDialogStatus = true;
     },
     getcourList() {
       this.$axios({
@@ -374,7 +372,10 @@ export default {
     bankReport() {
       this.$request.bankReportData(this.recordId).then(res => {
         this.reportdata = res.data;
-        if (this.$route.query.nextStatus == "next" && this.reportdata.reportStatus) {
+        if (
+          this.$route.query.nextStatus == "next" &&
+          this.reportdata.reportStatus
+        ) {
           this.GetNext();
         }
         console.log("reportdata:", this.reportdata);

File diff suppressed because it is too large
+ 164 - 175
src/pages/live-detail/index.vue


+ 17 - 6
src/pages/person-center/my-course/index.vue

@@ -54,6 +54,9 @@
                     {{ item.secAllNum + item.examNum }}节
                     {{ item.classHours }}学时
                   </div>
+                  <div class="note" v-if="item.orderYear">
+                    {{ item.orderYear }}年
+                  </div>
                 </div>
 
                 <div class="state" style="margin-bottom:14px;">
@@ -770,11 +773,11 @@ export default {
     jumpLink(item) {
       if (item.externalLink == "/outsideChain") {
         this.$router.push({
-          path:"/outsideChain",
-          query:{
-            goodsId:item.goodsId
-          } 
-        })
+          path: "/outsideChain",
+          query: {
+            goodsId: item.goodsId
+          }
+        });
         // window.open(item.externalLink + "?goodsId=" + item.goodsId, "_self");
       } else {
         window.open(item.externalLink, "_blank");
@@ -973,7 +976,8 @@ export default {
           .studyRecordMenuAllListWithExam({
             courseId: courseItem.courseId,
             gradeId: item.gradeId,
-            goodsId: item.goodsId
+            goodsId: item.goodsId,
+            orderGoodsId: item.orderGoodsId
           })
           .then(res => {
             // res.data = res.data.filter(
@@ -1147,6 +1151,13 @@ export default {
       });
     },
     async goCourseDetail(item) {
+      //-----------------七大员是否允许学习
+      try {
+        await this.$request.orderstudycheck(item.orderGoodsId);
+      } catch (error) {
+        this.$message.error(error.msg);
+        return;
+      }
       //-----------------学习开通状态
       this.checkFuncA(item);
       //-----------------检测服务期

+ 26 - 19
src/pages/person-center/my-live/index.vue

@@ -76,15 +76,15 @@ export default {
     return {
       param: {
         pageNum: 1,
-        pageSize: 10,
+        pageSize: 10
       },
       livingSectionList: [],
       total: 0,
-      courseList: [],
+      courseList: []
     };
   },
   computed: {
-    ...mapGetters(["userInfo"]),
+    ...mapGetters(["userInfo"])
   },
   async mounted() {
     this.goodsListGoodsUserLive();
@@ -103,12 +103,12 @@ export default {
           chapterId: this.livingSectionList[0].chapterId || 0,
           moduleId: this.livingSectionList[0].moduleId || 0,
           goodsName: this.livingSectionList[0].name,
-          sectionType: this.livingSectionList[0].sectionType,
-        },
+          sectionType: this.livingSectionList[0].sectionType
+        }
       });
     },
     goodsLivingSectionList() {
-      this.$request.goodsLivingSectionList().then((res) => {
+      this.$request.goodsLivingSectionList().then(res => {
         this.livingSectionList = res.data;
       });
     },
@@ -117,9 +117,9 @@ export default {
       this.goodsListGoodsUserLive();
     },
     async goCourseDetail(item) {
-      if(item.externalLinkStatus){
+      if (item.externalLinkStatus) {
         window.open(item.externalLink, "_blank");
-        return
+        return;
       }
       this.$request
         .courseCourseList({
@@ -127,23 +127,30 @@ export default {
           pageSize: 1,
           goodsId: item.goodsId,
           gradeId: 0,
-          orderGoodsId: item.orderGoodsId,
+          orderGoodsId: item.orderGoodsId
         })
-        .then((res) => {
+        .then(res => {
           if (res.code == 200) {
             if (res.rows.length) {
               this.$router.push({
-                path: `/my-live-detail/${item.goodsId}`,
+                path: `/my-course-detail/${item.goodsId}`,
                 query: {
-                  gradeId: 0,
-                  orderGoodsId: item.orderGoodsId,
-                  courseId: res.rows[0].courseId || "",
-                },
+                  gradeId: item.gradeId || 0,
+                  orderGoodsId: item.orderGoodsId
+                }
               });
+              // this.$router.push({
+              //   path: `/my-live-detail/${item.goodsId}`,
+              //   query: {
+              //     gradeId: 0,
+              //     orderGoodsId: item.orderGoodsId,
+              //     courseId: res.rows[0].courseId || ""
+              //   }
+              // });
             } else {
               this.$message({
                 type: "warning",
-                message: "暂无可观看的直播课程",
+                message: "暂无可观看的直播课程"
               });
             }
           }
@@ -151,12 +158,12 @@ export default {
     },
 
     goodsListGoodsUserLive() {
-      this.$request.goodsListGoodsUserLive(this.param).then((res) => {
+      this.$request.goodsListGoodsUserLive(this.param).then(res => {
         this.courseList = res.rows;
         this.total = res.total;
       });
-    },
-  },
+    }
+  }
 };
 </script>
 

Some files were not shown because too many files changed in this diff