Bladeren bron

Merge branch 'master' into dev

谢杰标 2 jaren geleden
bovenliggende
commit
eb5e2e1d39

+ 1 - 1
common/compressPhoto.js

@@ -30,7 +30,7 @@ function imageSizeIsLessLimitSize(imagePath, limitSize) {
 function getLessLimitSizeImage(imagePath, quality) {
   uni.compressImage({
     src: imagePath,
-    quality,
+    quality: quality * 100,
     success: (res) => {
       console.log(res.tempFilePath, res, "压缩后");
       _resolve(res.tempFilePath);

+ 241 - 248
common/httpList/course.js

@@ -1,257 +1,250 @@
-import {
-	myRequest
-} from '../request.js'
+import { myRequest } from "../request.js";
 export default {
-	polyvSign(data) {
-		return myRequest({
-			url: '/polyv/video/sign/auth',
-			method: 'get',
-			data: data
-		})
-	},
-	recordLast(data) {
-		return myRequest({
-			url: '/study/record/last',
-			method: 'get',
-			data: data
-		})
-	},
-	menuExamList(data) {
-		return myRequest({
-			url: '/course/menu/exam/list',
-			method: 'get',
-			data: data
-		})
-	},
-	reSectionList(data) {
-		return myRequest({
-			url: '/course/sectionList',
-			method: 'get',
-			data: data
-		})
-	},
-	reChapterList(data) {
+  polyvSign(data) {
+    return myRequest({
+      url: "/polyv/video/sign/auth",
+      method: "get",
+      data: data,
+    });
+  },
+  recordLast(data) {
+    return myRequest({
+      url: "/study/record/last",
+      method: "get",
+      data: data,
+    });
+  },
+  menuExamList(data) {
+    return myRequest({
+      url: "/course/menu/exam/list",
+      method: "get",
+      data: data,
+    });
+  },
+  reSectionList(data) {
+    return myRequest({
+      url: "/course/sectionList",
+      method: "get",
+      data: data,
+    });
+  },
+  reChapterList(data) {
+    return myRequest({
+      url: "/course/chapterList",
+      method: "get",
+      data: data,
+    });
+  },
+  appBeforeAddress(data) {
+    return myRequest({
+      url: "/app/before/address",
+      method: "get",
+      data: data,
+    });
+  },
 
-		return myRequest({
-			url: '/course/chapterList',
-			method: 'get',
-			data: data
-		})
-	},
-	appBeforeAddress(data) {
-		return myRequest({
-			url: '/app/before/address',
-			method: 'get',
-			data: data
-		})
-	},
+  reMenuList(data) {
+    return myRequest({
+      url: "/course/menuList",
+      method: "get",
+      data: data,
+    });
+  },
+  menuList(data) {
+    return myRequest({
+      url: "/app/common/course/menuList",
+      method: "get",
+      data: data,
+      noToken: true,
+    });
+  },
+  chapterList(data) {
+    return myRequest({
+      url: "/app/common/course/chapterList/" + data,
+      method: "get",
+      noToken: true,
+    });
+  },
+  sectionList(data) {
+    return myRequest({
+      url: "/app/common/course/sectionList/" + data,
+      method: "get",
+      noToken: true,
+    });
+  },
+  courseGoodsList(data) {
+    return myRequest({
+      url: "/course/goodsList",
+      method: "get",
+      data: data,
+    });
+  },
+  // 购买讲义列表
+  goodsHandoutsList(data) {
+    return myRequest({
+      url: "/course/goodsHandoutsList",
+      method: "get",
+      data: data,
+    });
+  },
+  courseCourseList(data) {
+    return myRequest({
+      url: "/course/courseList",
+      method: "get",
+      data: data,
+    });
+  },
+  //商品双师资模板
+  courseTeacherList(data) {
+    return myRequest({
+      url: "/goods/course/teacher/list",
+      method: "get",
+      data: data,
+    });
+  },
+  courseDetail(data) {
+    return myRequest({
+      url: "/course/" + data,
+      method: "get",
+    });
+  },
+  courseBusiness(data) {
+    return myRequest({
+      url: "/app/common/course/business/" + data,
+      method: "get",
+      noToken: true,
+    });
+  },
 
+  courseHandouts(data) {
+    return myRequest({
+      url: "/course/handouts/file/detail",
+      method: "get",
+      data,
+    });
+  },
+  getHandoutList(data) {
+    return myRequest({
+      url: "/course/handouts/listByGoods",
+      method: "get",
+      data: data,
+    });
+  },
+  courseGoodsRebuildStatus(data) {
+    return myRequest({
+      url: "/course/goodsRebuildStatus",
+      method: "get",
+      data: data,
+    });
+  },
+  faceCertificationIDCardOCR(data) {
+    return myRequest({
+      url: "/face/certification/IDCardOCR",
+      method: "post",
+      data: data,
+    });
+  },
 
+  facCertificationImageRecognition(data) {
+    return myRequest({
+      url: "/face/certification/ImageRecognition",
+      method: "post",
+      data: data,
+    });
+  },
 
-	reMenuList(data) {
-		return myRequest({
-			url: '/course/menuList',
-			method: 'get',
-			data: data
-		})
-	},
-	menuList(data) {
-		return myRequest({
-			url: '/app/common/course/menuList',
-			method: 'get',
-			data: data,
-			noToken: true
-		})
-	},
-	chapterList(data) {
+  faceCertificationIdCardCompareFace(data) {
+    return myRequest({
+      url: "/face/certification/idCardCompareFace",
+      method: "post",
+      data: data,
+    });
+  },
 
-		return myRequest({
-			url: '/app/common/course/chapterList/' + data,
-			method: 'get',
-			noToken: true
-		})
-	},
-	sectionList(data) {
-		return myRequest({
-			url: '/app/common/course/sectionList/' + data,
-			method: 'get',
-			noToken: true
-		})
-	},
-	courseGoodsList(data) {
-		return myRequest({
-			url: '/course/goodsList',
-			method: 'get',
-			data: data
-		})
-	},
-	// 购买讲义列表
-	goodsHandoutsList(data) {
-		return myRequest({
-			url: '/course/goodsHandoutsList',
-			method: 'get',
-			data: data
-		})
-	},
-	courseCourseList(data) {
-		return myRequest({
-			url: '/course/courseList',
-			method: 'get',
-			data: data
-		})
-	},
-	//商品双师资模板
-	courseTeacherList(data) {
-		return myRequest({
-			url: '/goods/course/teacher/list',
-			method: 'get',
-			data: data
-		})
-	},
-	courseDetail(data) {
-		return myRequest({
-			url: '/course/' + data,
-			method: 'get'
-		})
-	},
-	courseBusiness(data) {
-		return myRequest({
-			url: '/app/common/course/business/' + data,
-			method: 'get',
-			noToken: true
-		})
-	},
+  faceCertificationCompareFace(data) {
+    return myRequest({
+      url: "/face/certification/CompareFace",
+      method: "post",
+      data: data,
+    });
+  },
 
-	courseHandouts(data) {
-		return myRequest({
-			url: '/course/handouts/file/detail' ,
-			method: 'get',
-			data
-		})
-	},
-	getHandoutList(data) {
-		return myRequest({
-			url: '/course/handouts/listByGoods',
-			method: 'get',
-			data: data
-		})
-	},
-	courseGoodsRebuildStatus(data) {
-		return myRequest({
-			url: '/course/goodsRebuildStatus',
-			method: 'get',
-			data: data
-		})
-	},
-	faceCertificationIDCardOCR(data) {
-		return myRequest({
-			url: '/face/certification/IDCardOCR',
-			method: 'post',
-			data: data
-		})
-	},
-    updateCommitment(data) {
-		return myRequest({
-			url: '/base/profile/tp/commitment/upload',
-			method: 'post',
-			data: data
-		})
-	},
-	facCertificationImageRecognition(data) {
-		return myRequest({
-			url: '/face/certification/ImageRecognition',
-			method: 'post',
-			data: data
-		})
-	},
+  gradeCheckGoodsStudy(data) {
+    return myRequest({
+      url: "/grade/grade/checkGoodsStudy",
+      method: "get",
+      data: data,
+    });
+  },
 
-	faceCertificationIdCardCompareFace(data) {
-		return myRequest({
-			url: '/face/certification/idCardCompareFace',
-			method: 'post',
-			data: data
-		})
-	},
+  polyvLiveHistoryChatMsgList(data) {
+    return myRequest({
+      url: "/polyv/live/historyChatMsgList",
+      method: "get",
+      data: data,
+    });
+  },
+  studyRecordQueryLiveLast(data) {
+    return myRequest({
+      url: "/study/record/queryLiveLast",
+      method: "get",
+      data: data,
+    });
+  },
 
-	faceCertificationCompareFace(data) {
-		return myRequest({
-			url: '/face/certification/CompareFace',
-			method: 'post',
-			data: data
-		})
-	},
-
-	gradeCheckGoodsStudy(data) {
-		return myRequest({
-			url: '/grade/grade/checkGoodsStudy',
-			method: 'get',
-			data: data
-		})
-	},
-
-
-
-	polyvLiveHistoryChatMsgList(data) {
-		return myRequest({
-			url: '/polyv/live/historyChatMsgList',
-			method: 'get',
-			data: data
-		})
-	},
-	studyRecordQueryLiveLast(data) {
-		return myRequest({
-			url: '/study/record/queryLiveLast',
-			method: 'get',
-			data: data
-		})
-	},
-
-	courseMajorList(data) {
-		return myRequest({
-			url: '/course/major/list',
-			method: 'get',
-			data: data
-		})
-	},
-	// 学习中心的直播课列表
-	getgoodsLiveList(data) {
-		return myRequest({
-			url: '/goods/getLiveList',
-			method: 'get',
-			data: data,
-			compleLoading: true
-		})
-	},
-	// 查询用户拥有视频+直播商品
-	listUserVideoLive(data) {
-		return myRequest({
-			url: '/goods/listUserVideoLive',
-			method: 'get',
-			data: data,
-			compleLoading: true
-		})
-	},
-	// 查询考前须知
-	getExamTip(data) {
-		return myRequest({
-			url: '/apply/before/know',
-			method: 'get',
-			data: data
-		})
-	},
-	reSectionExamList(data) {
-		return myRequest({
-			url: '/course/sectionExamList',
-			method: 'get',
-			data: data
-		})
-	},
-	// 二建二造检测必修是否学完
-	checkFinishRequiredCourse(data) {
-		return myRequest({
-			url: '/grade/grade/checkFinishRequiredCourse',
-			method: 'get',
-			data: data
-		})
-	},
-}
+  courseMajorList(data) {
+    return myRequest({
+      url: "/course/major/list",
+      method: "get",
+      data: data,
+    });
+  },
+  // 学习中心的直播课列表
+  getgoodsLiveList(data) {
+    return myRequest({
+      url: "/goods/getLiveList",
+      method: "get",
+      data: data,
+      compleLoading: true,
+    });
+  },
+  // 查询用户拥有视频+直播商品
+  listUserVideoLive(data) {
+    return myRequest({
+      url: "/goods/listUserVideoLive",
+      method: "get",
+      data: data,
+      compleLoading: true,
+    });
+  },
+  reSectionExamList(data) {
+    return myRequest({
+      url: "/course/sectionExamList",
+      method: "get",
+      data: data,
+    });
+  },
+  // 二建二造检测必修是否学完
+  checkFinishRequiredCourse(data) {
+    return myRequest({
+      url: "/grade/grade/checkFinishRequiredCourse",
+      method: "get",
+      data: data,
+    });
+  },
+  // 继教七大员公共课程同步
+  syncSevenPublicClass(data) {
+    return myRequest({
+      url: "/study/record/syncSevenPublicClass",
+      method: "get",
+      data: data,
+    });
+  },
+  // 七大员课程学习校验
+  qCheckIsCanLearn(id) {
+    return myRequest({
+      url: "/order/study/check/" + id,
+      method: "get",
+    });
+  },
+};

+ 21 - 13
components/common/ClassTimeTip.vue

@@ -1,15 +1,23 @@
 <template>
-  <text style="display: inline-block; color: #ff2d55; font-size: 24rpx;line-height: 30rpx;" v-if="classInfo.gradeId">
-      <text>{{
-        classInfo.classStatus == 0
-          ? "暂未开班"
-          : classInfo.classEndTime
-          ? `有效期至:${$method.timestampToTime(
-              classInfo.classEndTime
-            )},本班还剩${$method.GetRTime(classInfo.classEndTime)}天将结束学习,`
-          : ""
-      }}</text>
-      已报名人数{{ classInfo.studentNumAll }}/{{ classInfo.studentUpper }}人
+  <text
+    style="
+      display: inline-block;
+      color: #ff2d55;
+      font-size: 24rpx;
+      line-height: 30rpx;
+    "
+    v-if="classInfo.gradeId"
+  >
+    <text>{{
+      classInfo.classStatus == 0
+        ? "暂未开班"
+        : classInfo.classEndTime
+        ? `有效期至:${$method.timestampToTime(
+            classInfo.classEndTime
+          )},本班还剩${$method.GetRTime(classInfo.classEndTime)}天将结束学习,`
+        : ""
+    }}</text>
+    已报名人数{{ classInfo.studentNumAll || 0 }}/{{ classInfo.studentUpper }}人
   </text>
 </template>
 
@@ -21,7 +29,7 @@ export default {
       default: () => {
         return {};
       },
-    }
+    },
   },
 };
 </script>
@@ -33,4 +41,4 @@ export default {
   color: #ff2d55;
   line-height: 30rpx;
 }
-</style>
+</style>

+ 41 - 11
components/course/courseChapter.vue

@@ -7,11 +7,16 @@
         <text class="menu_name">{{ menuItem.name }}</text>
       </view>
 
-      <view
-        class="title_status"
-        :class="['grey', 'blue', 'gre'][learnStatus + 1]"
-      >
-        {{ ["待学习", "学习中", "已学完"][learnStatus + 1] }}
+      <view class="fl">
+        <view class="title_status gre" v-if="menuItem.commonSign == 1"
+          >公共章</view
+        >
+        <view
+          class="title_status"
+          :class="['grey', 'blue', 'gre'][learnStatus + 1]"
+        >
+          {{ ["待学习", "学习中", "已学完"][learnStatus + 1] }}
+        </view>
       </view>
     </view>
     <view v-show="!down">
@@ -192,6 +197,7 @@ export default {
           .goodsTodayStudySectionNum({
             goodsId: this.goodsId,
             gradeId: this.gradeId,
+            orderGoodsId: this.orderGoodsId,
           })
           .then((res) => {
             if (res.data.code == 200) {
@@ -237,6 +243,7 @@ export default {
             courseId: this.courseId,
             gradeId: this.gradeId,
             goodsId: this.goodsId,
+            orderGoodsId: this.orderGoodsId,
           })
           .then((res) => {
             if (res.data.code == 200) {
@@ -257,6 +264,7 @@ export default {
             moduleId: this.menuItem.moduleId || 0,
             chapterId: this.menuItem.chapterId || 0,
             examId: id,
+            orderGoodsId: this.orderGoodsId,
           })
           .then((res) => {
             resolve(res.data.data);
@@ -556,6 +564,7 @@ export default {
             courseId: this.courseId,
             moduleId: 0,
             examId: examId,
+            orderGoodsId: this.orderGoodsId,
           })
           .then((res) => {
             resolve(res.data.data);
@@ -563,6 +572,10 @@ export default {
       });
     },
     async openChapter(item) {
+      console.log(
+        "🚀 ~ file: courseChapter.vue:571 ~ openChapter ~ item:",
+        item
+      );
       // console.log('---zhang',this.menuItem, this.down, item.courseId, item.moduleId);
       this.down = !this.down;
       if (!this.down && this.list.length == 0) {
@@ -575,6 +588,7 @@ export default {
               chapterId: item.chapterId || item.menuId,
               courseId: item.courseId,
               gradeId: item.gradeId,
+              orderGoodsId: this.orderGoodsId,
             })
             .then((res) => {
               if (res.data.code == 200) {
@@ -592,7 +606,7 @@ export default {
             //				this.getMenuExamList(item.id,item.courseId,moduleId)
           }
         } else {
-          this.getSectionList(item.chapterId);
+          this.getSectionList(item.chapterId || item.menuId);
         }
       }
     },
@@ -650,6 +664,7 @@ export default {
           courseId: courseId,
           rebuild: 1,
           moduleId: moduleId,
+          orderGoodsId: this.orderGoodsId,
         })
         .then((res) => {
           if (res.data.code == 200) {
@@ -687,6 +702,7 @@ export default {
           gradeId: this.gradeId,
           courseId: courseId,
           moduleId: moduleId,
+          orderGoodsId: this.orderGoodsId,
         })
         .then((res) => {
           if (res.data.code == 200) {
@@ -720,10 +736,13 @@ export default {
   computed: {
     ...mapGetters(["goodsAuditionConfigIdList", "chapterOpen"]),
     learnStatus() {
-      // console.log(this.menuItem, "this.menuItem");
+      if (!this.isBuy) {
+        return;
+      }
+      if (!this.sectionItem) {
+        return;
+      }
       let { id, courseId, moduleId } = this.menuItem;
-      // console.log(this.menuItem, id, courseId, moduleId, "this.menuItem");
-      // console.log(this.sectionItem,)
       if (
         this.sectionItem.courseId == courseId &&
         this.sectionItem.moduleId == (moduleId || 0) &&
@@ -758,6 +777,7 @@ export default {
   color: #ffffff;
   text-align: center;
 }
+
 .tagGreen {
   width: 80rpx;
   height: 28rpx;
@@ -767,6 +787,7 @@ export default {
   color: #ffffff;
   text-align: center;
 }
+
 .eTag {
   width: 64rpx;
   height: 36rpx;
@@ -777,21 +798,25 @@ export default {
   border-radius: 8rpx;
   color: #ffffff;
 }
+
 .examBox {
   display: flex;
   align-items: center;
   justify-content: space-between;
 }
+
 .exam {
   font-size: 30rpx;
   display: flex;
   align-items: center;
   margin: 20rpx 0;
 }
+
 .icon_up {
   width: 24rpx;
   height: 24rpx;
 }
+
 .title {
   // margin-bottom: 30rpx;
   height: 78rpx;
@@ -799,6 +824,7 @@ export default {
   justify-content: space-between;
   align-items: center;
   border-bottom: 1rpx solid #eeeeee;
+
   .menu_name {
     font-size: 24rpx;
     font-family: PingFang SC;
@@ -809,20 +835,24 @@ export default {
     text-overflow: ellipsis;
     margin-left: 8rpx;
   }
+
   .title_status {
-    width: 80rpx;
-    height: 28rpx;
+    padding: 2rpx 8rpx;
     border-radius: 8rpx;
     font-size: 20rpx;
     color: #ffffff;
     text-align: center;
+    margin-left: 4rpx;
   }
+
   .gre {
     background: #34c759;
   }
+
   .blue {
     background: #409eff;
   }
+
   .grey {
     background: #909399;
   }

+ 2 - 0
components/course/courseModule.vue

@@ -215,6 +215,7 @@ export default {
           gradeId: this.gradeId,
           courseId: courseId,
           rebuild: 1,
+          orderGoodsId: this.orderGoodsId
         })
         .then((res) => {
           if (res.data.code == 200) {
@@ -233,6 +234,7 @@ export default {
           moduleId: moduleId,
           gradeId: this.gradeId,
           courseId: courseId,
+          orderGoodsId: this.orderGoodsId
         })
         .then((res) => {
           if (res.data.code == 200) {

+ 103 - 125
components/course/courseSection.vue

@@ -1,52 +1,28 @@
 <template>
-  <view
-    style="display: flex; justify-content: space-between; align-items: center"
-    @click="getVideo"
-  >
-    <view
-      style="
+  <view style="display: flex; justify-content: space-between; align-items: center" @click="getVideo">
+    <view style="
         display: flex;
         justify-content: space-between;
         align-items: center;
         margin: 20rpx 0;
         width: 100%;
-      "
-    >
+      ">
       <view style="display: flex; align-items: center; flex: 1">
         <view class="tag tagColor1" v-if="menuItem.sectionType == 1">视频</view>
         <view class="tag tagColor2" v-if="menuItem.sectionType == 2">直播</view>
         <view class="tag tagColor3" v-if="menuItem.sectionType == 3">回放</view>
         <view class="t_content">
-          <view
-            v-if="menuItem.sectionType == 1"
-            :class="
-              playSectionId == newId && playNextId == playId ? 'color1' : ''
-            "
-            >{{ menuItem.name || "" }}</view
-          >
-          <view
-            v-if="menuItem.sectionType == 2"
-            :class="
-              playSectionId == newId && playNextId == playId ? 'color2' : ''
-            "
-            >{{ menuItem.name || "" }}</view
-          >
-          <view
-            v-if="menuItem.sectionType == 3"
-            :class="
-              playSectionId == newId && playNextId == playId ? 'color3' : ''
-            "
-            >{{ menuItem.name || "" }}</view
-          >
-          <view
-            style="font-size: 20rpx; color: #ff3b30"
-            v-if="menuItem.sectionType == 2 && menuItem.liveStartTime"
-          >
+          <view v-if="menuItem.sectionType == 1" :class="playSectionId == newId && playNextId == playId ? 'color1' : ''
+            ">{{ menuItem.name || "" }}</view>
+          <view v-if="menuItem.sectionType == 2" :class="playSectionId == newId && playNextId == playId ? 'color2' : ''
+            ">{{ menuItem.name || "" }}</view>
+          <view v-if="menuItem.sectionType == 3" :class="playSectionId == newId && playNextId == playId ? 'color3' : ''
+            ">{{ menuItem.name || "" }}</view>
+          <view style="font-size: 20rpx; color: #ff3b30" v-if="menuItem.sectionType == 2 && menuItem.liveStartTime">
             <view v-if="menuItem.liveStartTime > nowTime || !isBuy">
               <text>{{
                 $method.timestampToTime(menuItem.liveStartTime, (isDay = false))
-              }}</text
-              >-
+              }}</text>-
               <text>{{
                 $method.timestampToTime(menuItem.liveEndTime, (isDay = false))
               }}</text>
@@ -66,10 +42,7 @@
 							<text>回放</text>
 						</view> -->
           </view>
-          <view
-            style="font-size: 20rpx; color: #ff3b30"
-            v-if="menuItem.sectionType == 3"
-          >
+          <view style="font-size: 20rpx; color: #ff3b30" v-if="menuItem.sectionType == 3">
             <view v-if="!menuItem.recordingUrl">
               <text>当前直播回放视频请稍后再查看</text>
             </view>
@@ -80,31 +53,18 @@
           menuItem.name || ""
         }}</view>
         <!-- 学习中 -->
-        <view
-          v-if="playSectionId == newId && playNextId == playId"
-          class="learnings"
-        >
-          <image
-            src="/pages3/static/imgs/learning_icon.gif"
-            class="learning_icon"
-          ></image>
+        <view v-if="playSectionId == newId && playNextId == playId" class="learnings">
+          <image src="/pages3/static/imgs/learning_icon.gif" class="learning_icon"></image>
         </view>
       </view>
-      <view
-        style="font-size: 20rpx; color: #ff3b30"
-        v-if="menuItem.liveStartTime && menuItem.sectionType != 3 && isBuy"
-      >
+      <view style="font-size: 20rpx; color: #ff3b30" v-if="menuItem.liveStartTime && menuItem.sectionType != 3 && isBuy">
         <template v-if="!isLast() && !isLive">
           <view class="tagWillPlay" v-if="menuItem.liveStartTime > nowTime">
             <text>待开播</text>
           </view>
-          <view
-            class="tagPlaying"
-            v-if="
-              menuItem.liveStartTime <= nowTime &&
-              menuItem.liveEndTime > nowTime
-            "
-          >
+          <view class="tagPlaying" v-if="menuItem.liveStartTime <= nowTime &&
+            menuItem.liveEndTime > nowTime
+            ">
             <text>直播中</text>
           </view>
           <view class="tagPlayed" v-if="menuItem.liveEndTime < nowTime">
@@ -114,19 +74,13 @@
       </view>
       <!-- 直播课程没有学习状态 -->
       <template v-if="!isLive">
-        <view v-if="isRebuild || menuItem.rebuild > 0" class="tagRe"
-          >待重修</view
-        >
+        <view v-if="isRebuild || menuItem.rebuild > 0" class="tagRe">待重修</view>
         <view v-else>
           <view v-if="menuItem.learning == 1" class="tagGreen">已学完</view>
         </view>
       </template>
 
-      <view
-        v-if="checkTest()"
-        class="exercises"
-        @click.stop="toDoSectionExam()"
-      >
+      <view v-if="checkTest()" class="exercises" @click.stop="toDoSectionExam()">
         <text class="exe_w">习题</text>
         <u-icon name="arrow-right" color="#498AFE" size="28"></u-icon>
       </view>
@@ -222,7 +176,7 @@ export default {
       // newMenuAllList: [],
     };
   },
-  onLoad() {},
+  onLoad() { },
   created() {
     if (this.testType == 3) {
       // 模块下的所有节试卷列表
@@ -231,6 +185,7 @@ export default {
           chapterId: 0,
           courseId: this.courseId,
           gradeId: this.gradeId,
+          orderGoodsId: this.orderGoodsId
         })
         .then((res) => {
           if (res.data.code == 200) {
@@ -249,11 +204,10 @@ export default {
     let moduleId = this.menuItem.moduleId || 0;
     let chapterId = this.menuItem.chapterId || 0;
     let sectionId = this.menuItem.sectionId || this.menuItem.menuId;
-    let playNextId = `moduleId${moduleId}chapterId${chapterId}sectionId${sectionId}${
-      this.isRebuild ? "isRebuild" : ""
-    }`;
+    let playNextId = `moduleId${moduleId}chapterId${chapterId}sectionId${sectionId}${this.isRebuild ? "isRebuild" : ""
+      }`;
     this.playId = playNextId;
-    if(this.playSectionId == this.newId){
+    if (this.playSectionId == this.newId) {
       this.$store.commit("updatePlayNextId", playNextId);
     }
     uni.$off("playNext" + playNextId); //绑定前先移除之前的事件
@@ -404,6 +358,7 @@ export default {
             courseId: this.courseId,
             gradeId: this.gradeId,
             goodsId: this.goodsId,
+            orderGoodsId: this.orderGoodsId
           })
           .then((res) => {
             if (res.data.code == 200) {
@@ -421,6 +376,7 @@ export default {
             moduleId: this.menuItem.moduleId || 0,
             chapterId: this.menuItem.chapterId || 0,
             sectionId: this.menuItem.sectionId || this.menuItem.menuId,
+            orderGoodsId: this.orderGoodsId
           })
           .then((res) => {
             resolve(res.data.data);
@@ -433,6 +389,7 @@ export default {
           .goodsTodayStudySectionNum({
             goodsId: this.goodsId,
             gradeId: this.gradeId,
+            orderGoodsId: this.orderGoodsId
           })
           .then((res) => {
             if (res.data.code == 200) {
@@ -554,9 +511,9 @@ export default {
           return;
         }
         /* if(this.playSectionId==this.newId){
-					//切换为同一节
-					return
-				} */
+          //切换为同一节
+          return
+        } */
         // 回放
         if (this.menuItem.sectionType == 3) {
           let moduleId = this.menuItem.moduleId || 0;
@@ -566,32 +523,32 @@ export default {
           // buyCourse 是否购买课程:1是 0否,type=vod是回放
           let encode = encodeURIComponent(
             this.config.hostLive +
-              "/pages/live/index?token=" +
-              uni.getStorageSync("token") +
-              "&userInfo=" +
-              JSON.stringify(this.userInfo) +
-              "&channelId=" +
-              this.menuItem.liveUrl +
-              "&gradeId=" +
-              this.gradeId +
-              "&courseId=" +
-              this.courseId +
-              "&goodsId=" +
-              this.goodsId +
-              "&orderGoodsId=" +
-              this.orderGoodsId +
-              "&sectionId=" +
-              sectionId +
-              "&chapterId=" +
-              chapterId +
-              "&moduleId=" +
-              moduleId +
-              "&buyCourse=1" +
-              "&ident=" +
-              uuid +
-              "&sectionType=3" +
-              "&vid=" +
-              this.menuItem.recordingUrl
+            "/pages/live/index?token=" +
+            uni.getStorageSync("token") +
+            "&userInfo=" +
+            JSON.stringify(this.userInfo) +
+            "&channelId=" +
+            this.menuItem.liveUrl +
+            "&gradeId=" +
+            this.gradeId +
+            "&courseId=" +
+            this.courseId +
+            "&goodsId=" +
+            this.goodsId +
+            "&orderGoodsId=" +
+            this.orderGoodsId +
+            "&sectionId=" +
+            sectionId +
+            "&chapterId=" +
+            chapterId +
+            "&moduleId=" +
+            moduleId +
+            "&buyCourse=1" +
+            "&ident=" +
+            uuid +
+            "&sectionType=3" +
+            "&vid=" +
+            this.menuItem.recordingUrl
           );
           uni.navigateTo({
             url: `../../pages/webview/index?url=` + encode,
@@ -693,30 +650,30 @@ export default {
         // buyCourse 是否购买课程:1是 0否
         let encode = encodeURIComponent(
           this.config.hostLive +
-            "/pages/live/index?token=" +
-            uni.getStorageSync("token") +
-            "&userInfo=" +
-            JSON.stringify(this.userInfo) +
-            "&channelId=" +
-            this.menuItem.liveUrl +
-            "&gradeId=" +
-            this.gradeId +
-            "&courseId=" +
-            this.courseId +
-            "&goodsId=" +
-            this.goodsId +
-            "&orderGoodsId=" +
-            this.orderGoodsId +
-            "&sectionId=" +
-            sectionId +
-            "&chapterId=" +
-            chapterId +
-            "&moduleId=" +
-            moduleId +
-            "&buyCourse=1" +
-            "&ident=" +
-            uuid +
-            "&sectionType=2"
+          "/pages/live/index?token=" +
+          uni.getStorageSync("token") +
+          "&userInfo=" +
+          JSON.stringify(this.userInfo) +
+          "&channelId=" +
+          this.menuItem.liveUrl +
+          "&gradeId=" +
+          this.gradeId +
+          "&courseId=" +
+          this.courseId +
+          "&goodsId=" +
+          this.goodsId +
+          "&orderGoodsId=" +
+          this.orderGoodsId +
+          "&sectionId=" +
+          sectionId +
+          "&chapterId=" +
+          chapterId +
+          "&moduleId=" +
+          moduleId +
+          "&buyCourse=1" +
+          "&ident=" +
+          uuid +
+          "&sectionType=2"
         );
         uni.navigateTo({
           url: `../../pages/webview/index?url=` + encode,
@@ -750,6 +707,7 @@ export default {
   color: #ffffff;
   text-align: center;
 }
+
 .tagWillPlay {
   width: 80rpx;
   height: 28rpx;
@@ -759,6 +717,7 @@ export default {
   color: #007aff;
   text-align: center;
 }
+
 .tagPlaying {
   width: 80rpx;
   height: 28rpx;
@@ -768,6 +727,7 @@ export default {
   color: #ff9500;
   text-align: center;
 }
+
 .tagPlayed {
   width: 80rpx;
   height: 28rpx;
@@ -777,6 +737,7 @@ export default {
   color: #666666;
   text-align: center;
 }
+
 .tagRe {
   width: 80rpx;
   height: 28rpx;
@@ -786,6 +747,7 @@ export default {
   color: #ffffff;
   text-align: center;
 }
+
 .tryBox {
   width: 103rpx;
   height: 48rpx;
@@ -797,61 +759,77 @@ export default {
   text-align: center;
   border: 1rpx solid #3577e8;
 }
+
 .icon_up {
   width: 24rpx;
   height: 24rpx;
 }
+
 .t_content3 {
   color: #007aff;
 }
+
 .t_content2 {
   color: #007aff;
 }
+
 .t_content1 {
   color: #007aff;
 }
+
 .t_content {
   font-size: 30rpx;
   margin-left: 10rpx;
   color: #666666;
   flex: 1;
 }
+
 .tagColor3 {
   border: 2rpx solid #ff9500;
   color: #ff9500;
 }
+
 .tagColor2 {
   border: 2rpx solid #ff3b30;
   color: #ff3b30;
 }
+
 .tagColor1 {
   border: 2rpx solid #007aff;
   color: #007aff;
 }
+
 .color3 {
   color: #ff9500;
 }
+
 .color2 {
   color: #ff3b30;
 }
+
 .color1 {
   color: #007aff;
 }
+
 .tag {
   border-radius: 8rpx;
   font-size: 20rpx;
   padding: 4rpx 10rpx;
 }
+
 .exercises {
   margin-left: 10rpx;
   font-size: 26rpx;
   color: #498afe;
-  > text {
+
+  >text {
     margin-right: 6rpx;
   }
 }
+
 .learnings {
   margin-right: 8rpx;
+
   .learning_icon {
     width: 40rpx;
     height: 40rpx;

+ 7 - 2
pages/learn/index.vue

@@ -181,6 +181,9 @@
               </view>
             </view>
             <view class="course_item_info" v-if="item.goodsType !== 6">
+              <view v-if="item.orderYear"
+                ><text>课程年份:</text><text>{{ item.orderYear }}</text></view
+              >
               <view>
                 <text>学习状态:</text>
                 <view
@@ -1082,7 +1085,9 @@ export default {
                   item.goodsId
                 }&orderGoodsId=${item.orderGoodsId}&gradeId=${
                   item.gradeId
-                }&periodWaitTime=${item.periodWaitTime ? 1 : ""}`,
+                }&periodWaitTime=${item.periodWaitTime ? 1 : ""}&isQ=${
+                  item.orderYear ? 1 : ""
+                }`,
               });
             } else if (res.data.total == 1) {
               uni.navigateTo({
@@ -1092,7 +1097,7 @@ export default {
                   item.orderGoodsId
                 }&gradeId=${item.gradeId}&periodWaitTime=${
                   item.periodWaitTime ? "" : 1
-                }`,
+                }&isQ=${item.orderYear ? 1 : ""}`,
               });
             } else {
               uni.showToast({

+ 14 - 0
pages2/class/questionBank.vue

@@ -953,6 +953,7 @@ export default {
       faceUrl: "",
       simulateExamId: undefined,
       isBackVideo: "",
+      isReach: false, //599重拍
     };
   },
   watch: {
@@ -1148,8 +1149,12 @@ export default {
           });
           return;
         }
+        
         self.ossAvatarUrl = "";
         self.isTakePhoto = true;
+        if(this.isReach){
+          return this.submit();
+        }
         //拍照
         if (this.lastTime) {
           this.timer = setInterval(() => {
@@ -1518,6 +1523,9 @@ export default {
     bankExam() {
       return this.$api.bankExam(this.id).then((res) => {
         const { examLimitClient, doType } = res.data.data;
+        if (!this.$method.examClientCanLearn(examLimitClient)) {
+          return;
+        }
         this.bankType = doType;
         this.examData = res.data.data;
         this.allTimes = this.examData.answerTime * 60;
@@ -2262,6 +2270,7 @@ export default {
         })
         .then((res) => {
           this.isSubmit = true;
+          this.isReach = false
           if (res.data.code == 200) {
             uni.showToast({
               title: "交卷成功",
@@ -2287,6 +2296,10 @@ export default {
                 });
               }, 1000);
             }
+          } else if (res.data.code == 559) {
+            this.isReach = true;
+            this.uploadLock = false;
+            this.openPhoto();
           }
         });
 
@@ -2720,6 +2733,7 @@ export default {
         content:
           "课程学习需要开启摄像头进行拍照,经检测您的设备无摄像头可使用,请检测环境是否支持。",
         cancelText: "取消",
+        showCancel: false,
         confirmText: "确定",
         success: (res) => {
           if (res.confirm) {

+ 1 - 1
pages2/class/question_report.vue

@@ -95,7 +95,7 @@
         </navigator>
         <view
           class="btnACs"
-          v-if="score < totalScore * 0.6 || bankType == 1"
+          v-if="reportStatus == 1 || bankType == 1"
           @click="
             doRepeat(
               reportdata.examId,

+ 103 - 5
pages2/order/confirm_list.vue

@@ -34,7 +34,7 @@
                   gradeIndex < 0 ? "选择班级" : gradeList[gradeIndex].className
                 }}</view>
                 <view
-                  ><u-icon name="arrow-down" color="#999999" size="28"></u-icon
+                  ><u-icon name="arrow-right" color="#999999" size="28"></u-icon
                 ></view>
               </view>
               <view
@@ -59,10 +59,37 @@
                       applyAreas.cityName
                 }}</view>
                 <view
-                  ><u-icon name="arrow-down" color="#999999" size="28"></u-icon
+                  ><u-icon name="arrow-right" color="#999999" size="28"></u-icon
                 ></view>
               </view>
             </view>
+            <view class="input_c" v-if="detail.sevenYear">
+              <view
+                style="
+                  display: flex;
+                  justify-content: space-between;
+                  align-items: center;
+                  height: 56rpx;
+                  padding: 8rpx;
+                  border-radius: 8rpx;
+                "
+                @click="openPopup(2)"
+              >
+                <view
+                  style="color: #666666; font-size: 24rpx"
+                  v-if="detail.selectYearList && detail.selectYearList.length"
+                >
+                  {{ detail.selectYearList.toString() }}
+                </view>
+                <view v-else style="color: #666666; font-size: 24rpx">
+                  选择年份
+                </view>
+                <view>
+                  <u-icon name="arrow-right" color="#999999" size="28">
+                  </u-icon>
+                </view>
+              </view>
+            </view>
           </view>
         </view>
       </view>
@@ -71,7 +98,12 @@
     <view class="bottomBox safeArea">
       <view class="sums">
         <text class="all_sum">订单金额:</text>
-        <text class="priceTag">¥ {{ detail.standPrice }}</text>
+        <text class="priceTag"
+          >¥{{
+            detail.standPrice *
+            (detail.selectYearList ? detail.selectYearList.length || 1 : 1)
+          }}</text
+        >
       </view>
 
       <view style="display: flex; color: #ffffff; align-items: center">
@@ -206,6 +238,39 @@
         </view>
       </view>
     </u-popup>
+    <u-popup v-model="show2" mode="bottom" border-radius="40">
+      <view class="popup_box" style="height: 500rpx">
+        <view class="check_head">
+          <view class="grade">选择年份</view>
+          <u-icon
+            name="close"
+            color="#CFCFCF"
+            size="30"
+            @click="closePop(2)"
+          ></u-icon>
+        </view>
+        <view>
+          <scroll-view scroll-y="true" style="height: 236rpx">
+            <view style="padding: 16rpx 30rpx">
+              <u-checkbox-group :wrap="true">
+                <u-checkbox
+                  shape="circle"
+                  v-for="(item, index) in yearList"
+                  :key="index"
+                  v-model="item.checked"
+                  :name="item.name"
+                >
+                  {{ item.name }}
+                </u-checkbox>
+              </u-checkbox-group>
+            </view>
+          </scroll-view>
+        </view>
+        <view class="confrim-btn"
+          ><view class="okBtn" @click="okPopup(2)">确定</view></view
+        >
+      </view>
+    </u-popup>
   </view>
 </template>
 
@@ -222,10 +287,12 @@ export default {
       indicatorStyle: `height: 50px;`,
       showArea: true,
       show1: false,
+      show2: false,
       value1: "",
       show: false,
       detail: {},
       gradeList: [],
+      yearList: [],
       provinceList: [],
       cityList: [],
       pAreaIndex: 0,
@@ -297,6 +364,13 @@ export default {
         this.gradeIndex = this.gradeValue;
         this.detail.gradObj = this.gradeList[this.gradeIndex];
         this.show = false;
+      } else if (index == 2) {
+        this.$set(
+          this.detail,
+          "selectYearList",
+          this.yearList.filter((e) => e.checked).map((e) => e.name)
+        );
+        this.show2 = false;
       } else {
         if (!this.checkAreaData()) {
           return;
@@ -317,7 +391,7 @@ export default {
         this.show1 = false;
       }
     },
-    
+
     checkAreaData() {
       if (this.examine.length == 0) {
         uni.showModal({
@@ -417,6 +491,14 @@ export default {
       if (!this.checkData()) {
         return;
       }
+      if (this.detail.sevenYear && !this.detail.selectYearList) {
+        uni.showModal({
+          title: "提示",
+          content: "请选择年份",
+          showCancel: false,
+        });
+        return false;
+      }
       let checkGoodsList = [];
       checkGoodsList.push(this.detail);
       this.$store.commit("setShoppingCartList", {
@@ -486,14 +568,25 @@ export default {
     openPopup(index) {
       if (index == 0) {
         this.show = true;
+      } else if (index == 2) {
+        this.show2 = true;
+        let selectYearList = this.detail.selectYearList || "";
+        this.yearList = this.detail.sevenYear.split(",").map((e) => {
+          return {
+            name: e,
+            checked: selectYearList.includes(e),
+          };
+        });
       } else {
-        this.getProvinceList()
+        this.getProvinceList();
         this.show1 = true;
       }
     },
     closePop(index) {
       if (index == 0) {
         this.show = false;
+      } else if (index == 2) {
+        this.show2 = false;
       } else {
         this.show1 = false;
       }
@@ -594,6 +687,11 @@ page {
   margin: 0 auto;
   margin-top: 15rpx;
 }
+.popup_box1 {
+  height: 400rpx;
+  box-shadow: 0rpx 0rpx 16rpx 4rpx rgba(145, 156, 178, 0.1);
+  border-radius: 32rpx 32rpx 0rpx 0rpx;
+}
 .popup_box {
   height: 824rpx;
   box-shadow: 0rpx 0rpx 16rpx 4rpx rgba(145, 156, 178, 0.1);

+ 25 - 14
pages2/order/confirm_pay.vue

@@ -5,16 +5,6 @@
       <view>
         <view class="box2">
           <view class="title2">支付信息</view>
-          <!-- <view style="padding:10rpx 30rpx;" v-for="(item,index) in shoppingCartList" :key="index">
-						<view class="list_title">
-							<view class="txt_left">商品名称</view>
-							<view class="txt_right">{{item.goodsName}}</view>
-						</view>
-						<view class="list_item">
-							<view class="txt_left">应付金额</view>
-							<view class="txt_right_price">¥ {{item.standPrice}}</view>
-						</view>
-					</view> -->
           <view
             v-for="(item, index) in shoppingCartList"
             :key="index"
@@ -33,6 +23,9 @@
                 {{ item.goodsName }}
               </view>
               <view class="priceTag"> ¥ {{ item.standPrice }} </view>
+              <view class="priceTag" v-if="item.sevenYear">{{
+                item.selectYearList.toString()
+              }}</view>
               <Class-time-tip
                 v-if="item.gradObj && item.gradObj.gradeId"
                 :classInfo="item.gradObj"
@@ -110,6 +103,7 @@
 import { mapGetters } from "vuex";
 import { getQueryString } from "../../common/navTo";
 import ClassTimeTip from "../../components/common/ClassTimeTip.vue";
+import { forEach } from "../../pages3/static/polyv-sdk/common/chat/emotionList";
 export default {
   data() {
     return {
@@ -153,6 +147,7 @@ export default {
     // #ifdef H5
     this.authorize();
     // #endif
+    console.log(this.shoppingCartList, 798);
   },
   methods: {
     authorize() {
@@ -227,6 +222,20 @@ export default {
           item.distributionCode = this.options.distributionCode;
         }
       }
+      // 处理七大员多年份==>多商品
+      list
+        .filter((item) => item.sevenYear)
+        .forEach((item) => {
+          let yearList = item.selectYearList;
+          if (item.sevenYear && yearList) {
+            item.sevenYear = yearList[0];
+            for (let j = 1; j < yearList.length; j++) {
+              let cItem = JSON.parse(JSON.stringify(item));
+              cItem.sevenYear = yearList[j];
+              list.push(cItem);
+            }
+          }
+        });
       let data = { goodsList: list };
       // 邀请码
       if (this.sac) {
@@ -456,10 +465,12 @@ export default {
   computed: {
     ...mapGetters(["userInfo", "shoppingCartList", "sac", "config"]),
     totalPrice() {
-      return this.shoppingCartList.reduce(
-        (a, b) => a + Number(b.standPrice),
-        0
-      );
+      let price = 0;
+      this.shoppingCartList.forEach((e) => {
+        let multiple = e.selectYearList?.length || 1;
+        price += e.standPrice * multiple;
+      });
+      return price;
     },
   },
   components: { ClassTimeTip },

+ 3 - 0
pages2/order/index.vue

@@ -57,6 +57,9 @@
                   ></image>
                   <view class="goods-text">
                     <view class="goods-name">{{ items.goodsName }}</view>
+                    <view class="goods-name" v-if="items.sevenYear">{{
+                      items.sevenYear
+                    }}</view>
                     <view v-if="item.orderFrom !== 6" class="goods-price"
                       >¥ {{ items.goodsRealPrice }}</view
                     >

+ 1 - 2
pages3/course/detail.vue

@@ -818,7 +818,6 @@ export default {
           goodsId: this.id,
         })
         .then((res1) => {
-          //   console.log(res1,'res1');
           if (res1.data.data && res1.data.data.length > 0) {
             //课程老师模板
             let teacherTel = res1.data.data;
@@ -878,9 +877,9 @@ export default {
               data.courseList.push(item);
               this.goodsTeacher.push(data);
             });
+            console.log(this.goodsTeacher, "this.goodsTeacher");
           }
         });
-      console.log(this.goodsTeacher, "this.goodsTeacher");
     },
     //切换老师
     switchTeacher(data, tindex, gTindex) {

+ 100 - 52
pages3/polyv/detail.vue

@@ -928,6 +928,7 @@ export default {
       // stream: null,
       faceUrl: "",
       erJianErZao: false,
+      jjShiGongYuan: false,
       pauseTime: 0,
       pauseTimer: null,
       barTimer: null,
@@ -981,7 +982,7 @@ export default {
     this.courseId = Number(option.id) || "";
     this.goodsId = Number(option.goodsId);
     this.orderGoodsId = Number(option.orderGoodsId) || "";
-    this.gradeId = option.gradeId;
+    this.gradeId = Number(option.gradeId);
     this.option = option;
     // 公众号模板消息的数据埋点
     option.informId && this.clickOfficial(option.informId);
@@ -997,6 +998,7 @@ export default {
     if (this.$method.isGoLogin()) {
       return;
     }
+    this.option.isQ !== "" && (await this.qCheckIsCanLearn());
     !this.userInfo && this.$api.refreshUserInfo();
     this.closePhoto();
     this.courseCourseList();
@@ -1013,6 +1015,35 @@ export default {
   mounted() {},
   methods: {
     ...mapMutations(["updateChapterOpen", "updateLiveLast"]),
+    // 七大员是否能进入学习
+    async qCheckIsCanLearn() {
+      let res = await this.$api.qCheckIsCanLearn(this.orderGoodsId);
+      if (res.data.code !== 200) {
+        uni.showModal({
+          showCancel: false,
+          title: "提示",
+          content: res.data.msg,
+          success: (resultst) => {
+            uni.navigateBack();
+          },
+        });
+        return Promise.reject();
+      }
+      let res1 = await this.$api.syncSevenPublicClass({
+        orderGoodsId: this.orderGoodsId,
+      });
+      if (res1.data.code !== 200) {
+        uni.showModal({
+          showCancel: false,
+          title: "提示",
+          content: "无法进入学习!",
+          success: (resultst) => {
+            uni.navigateBack();
+          },
+        });
+        return Promise.reject();
+      }
+    },
     // 新增微信公众号模板消息点击数据
     clickOfficial(informId) {
       this.$http({
@@ -1666,11 +1697,10 @@ export default {
           let { data } = res.data;
           if (!data.sectionId) {
             data = this.menuAllList[0];
-          } else {
-            if (data.learning == 1 && this.orderNum == 2) {
-              let next = this.menuAllList.find((e) => e.studyStatus != 1);
-              next && (data = next);
-            }
+          }
+          if (data.learning == 1 && this.orderNum == 2) {
+            let next = this.menuAllList.find((e) => e.studyStatus != 1);
+            next && (data = next);
           }
           this.initPlayVideo(data);
         });
@@ -1909,6 +1939,7 @@ export default {
           courseId: this.courseId,
           gradeId: this.gradeId,
           goodsId: this.goodsId,
+          orderGoodsId: this.orderGoodsId,
         })
         .then((res) => {
           let nowTime = Number(new Date().getTime() / 1000).toFixed(0);
@@ -2251,7 +2282,6 @@ export default {
               self.photoHistoryList.push(res.data.data[i].photoIndex);
             }
           }
-          // console.log('7777', this.photoHistoryList, this.photoList);
         }
       });
     },
@@ -2325,7 +2355,6 @@ export default {
       totalVideoTime = polyvPlayerContext.j2s_getDuration();
       duration = polyvPlayerContext.j2s_getCurrentTime();
       // #endif
-      let photoNum = this.photoNum;
       if (!this.photoConfig) {
         this.photoConfig = true;
         if (this.erJianErZao) {
@@ -2333,44 +2362,11 @@ export default {
           return;
         }
         //没有历史拍照间隔数据
-        if (this.photoList.length == 0) {
-          if (totalVideoTime >= 900) {
-            //大于15分钟
-            if (photoNum == 1) {
-              //开头拍1张
-              this.photoList.push(0);
-            } else if (photoNum == 3) {
-              //拍3张
-              this.photoList.push(0); //开头拍一张
-              let centerTime = Math.floor(totalVideoTime / 2); //获取中间时间
-              let centerMinTime = centerTime - 300; //前后5分钟
-              let centerMaxTime = centerTime + 300;
-              let centerTakeTime = this.randomNum(centerMinTime, centerMaxTime);
-              this.photoList.push(centerTakeTime); //中间拍一张
-              let endMaxTime = totalVideoTime - 60;
-              let endMinTime = totalVideoTime - 300;
-              let endTakeTime = this.randomNum(endMinTime, endMaxTime);
-              this.photoList.push(endTakeTime); //最后拍一张
-            }
-          } else {
-            //小于15分钟,只拍前后各一张
-            if (photoNum == 1) {
-              //开头拍1张
-              this.photoList.push(0);
-            } else if (photoNum == 3) {
-              this.photoList.push(1);
-              let centerTime = this.randomNum(
-                (1 / 3) * totalVideoTime,
-                (2 / 3) * totalVideoTime
-              );
-              this.photoList.push(centerTime);
-              let endTakeTime = this.randomNum(
-                (2 / 3) * totalVideoTime,
-                totalVideoTime
-              );
-              this.photoList.push(endTakeTime);
-            }
-          }
+        if (!this.photoList || this.photoList.length == 0) {
+          this.photoList = this.commonConfig(
+            totalVideoTime,
+            this.jjShiGongYuan ? 46 * 60 : undefined
+          );
           this.postCoursePhotoRecord(true); //提交随机拍照时间数组
         }
         //兼容已有观看历史
@@ -2389,7 +2385,7 @@ export default {
         }
       }
     },
-    // 随机拍摄时间
+    // 二建随机拍摄时间
     randomConfig(totalVideoTime, duration) {
       this.photoHistoryList = [];
       let photoList = [duration];
@@ -2405,6 +2401,46 @@ export default {
       }
       return photoList;
     },
+    // 随机前后五分钟
+    commonConfig(totalVideoTime, fixS) {
+      console.log("🚀 ~ file: detail.vue:2407 ~ commonConfig ~ fixS:", fixS);
+      let photoList = [0];
+      // 固定间隔时间取
+      if (fixS) {
+        let num = Math.ceil(totalVideoTime / fixS);
+        for (let i = 1; i < num; i++) {
+          photoList.push(i * fixS);
+        }
+      } else {
+        if (this.photoNum == 3) {
+          if (totalVideoTime >= 900) {
+            //大于15分钟
+            let centerTime = Math.floor(totalVideoTime / 2); //获取中间时间
+            let centerMinTime = centerTime - 300; //前后5分钟
+            let centerMaxTime = centerTime + 300;
+            let centerTakeTime = this.randomNum(centerMinTime, centerMaxTime);
+            photoList.push(centerTakeTime); //中间拍一张
+            let endMaxTime = totalVideoTime - 60;
+            let endMinTime = totalVideoTime - 300;
+            let endTakeTime = this.randomNum(endMinTime, endMaxTime);
+            photoList.push(endTakeTime); //最后拍一张
+          } else {
+            //小于15分钟
+            let centerTime = this.randomNum(
+              (1 / 3) * totalVideoTime,
+              (2 / 3) * totalVideoTime
+            );
+            photoList.push(centerTime);
+            let endTakeTime = this.randomNum(
+              (2 / 3) * totalVideoTime,
+              totalVideoTime
+            );
+            photoList.push(endTakeTime);
+          }
+        }
+      }
+      return photoList;
+    },
     getLiveUid(channelId) {
       let self = this;
       return new Promise((resolve) => {
@@ -2609,6 +2645,9 @@ export default {
           orderGoodsId: this.orderGoodsId,
         };
         this.$api.recordLast(data).then((res) => {
+          if (res.data.data.videoCurrentTime > 3) {
+            res.data.data.videoCurrentTime -= 3;
+          }
           resolve(res.data.data);
         });
       });
@@ -3129,6 +3168,7 @@ export default {
         }
         if (this.needSeek) {
           // var polyvPlayerContext = this.selectComponent("#playerVideo");
+
           if (this.recordObj.videoCurrentTime) {
             polyvPlayerContext.seek(this.recordObj.videoCurrentTime);
             this.seekTime = this.$method.secondToDate(
@@ -3150,7 +3190,10 @@ export default {
         }
         //开始播放
         this.timer && clearInterval(this.timer);
-        if (this.playSecIsLearn && (this.erJianErZao || this.photoNum > 0)) {
+        if (
+          this.playSecIsLearn &&
+          (this.erJianErZao || this.jjShiGongYuan || this.photoNum > 0)
+        ) {
           this.clearPauseTimer();
           this.isReach = false;
           this.timer = setInterval(this.timeEvent, 1000); //定时器
@@ -3314,7 +3357,7 @@ export default {
             video: {
               width: 400,
               height: 300,
-			  facingMode:'user',
+              facingMode: "user",
             },
           },
           this.photographSuccess,
@@ -3472,7 +3515,7 @@ export default {
           video: {
             width: 400,
             height: 300,
-			facingMode:'user',
+            facingMode: "user",
           },
         },
         this.photographSuccess,
@@ -3567,8 +3610,9 @@ export default {
         if (self.goodsData.buyNote) {
           this.baseHandoutTipList();
         }
-        self.gradeId = self.goodsData.gradeId;
+        !self.gradeId && (self.gradeId = self.goodsData.gradeId);
         self.erJianErZao = self.goodsData.erJianErZao;
+        self.jjShiGongYuan = self.goodsData.jjShiGongYuan;
         this.courseBusiness(this.goodsData.businessId);
         self.getMenuList();
         self.getReMenuList(); //获取重修目录
@@ -3900,7 +3944,10 @@ export default {
           }
           //开始播放
           this.timer && clearInterval(this.timer);
-          if (this.playSecIsLearn && (this.erJianErZao || this.photoNum > 0)) {
+          if (
+            this.playSecIsLearn &&
+            (this.erJianErZao || this.jjShiGongYuan || this.photoNum > 0)
+          ) {
             this.clearPauseTimer();
             this.isReach = false;
             this.timer = setInterval(this.timeEvent, 1000); //定时器
@@ -4004,6 +4051,7 @@ export default {
         content:
           "课程学习需要开启摄像头进行拍照,经检测您的设备无摄像头可使用,请检测环境是否支持。",
         cancelText: "取消",
+        showCancel: false,
         confirmText: "确定",
         success: (res) => {
           if (res.confirm) {

+ 94 - 10
pages4/shopping/shoppingCart.vue

@@ -65,17 +65,43 @@
                           @click="openPopup(0, item, index)"
                         >
                           <view style="color: #666666; font-size: 24rpx">{{
-                            !item.gradObj.className
+                            !item.gradObj && !item.gradObj.className
                               ? "选择班级"
                               : item.gradObj.className
                           }}</view>
+                          <view>
+                            <u-icon
+                              name="arrow-right"
+                              color="#999999"
+                              size="28"
+                            >
+                            </u-icon>
+                          </view>
+                        </view>
+                        <view
+                          class="goods-select__type"
+                          v-if="item.sevenYear"
+                          @click="openPopup(2, item, index)"
+                        >
                           <view
-                            ><u-icon
+                            style="color: #666666; font-size: 24rpx"
+                            v-if="
+                              item.selectYearList && item.selectYearList.length
+                            "
+                          >
+                            {{ item.selectYearList.toString() }}
+                          </view>
+                          <view v-else style="color: #666666; font-size: 24rpx">
+                            选择年份
+                          </view>
+                          <view>
+                            <u-icon
                               name="arrow-right"
                               color="#999999"
                               size="28"
-                            ></u-icon
-                          ></view>
+                            >
+                            </u-icon>
+                          </view>
                         </view>
                         <view
                           v-if="item.gradObj.gradeId"
@@ -229,6 +255,35 @@
           >
         </view>
       </u-popup>
+      <u-popup v-model="show2" mode="bottom" border-radius="40">
+        <view class="popup_box" style="height: 400rpx">
+          <view style="margin-bottom: 20rpx">
+            <view class="line1"></view>
+            <view class="grade">选择年份</view>
+          </view>
+          <u-line color="#D6D6DB" />
+          <view>
+            <scroll-view scroll-y="true" style="height: 236rpx">
+              <view style="padding: 16rpx 30rpx">
+                <u-checkbox-group :wrap="true">
+                  <u-checkbox
+                    shape="circle"
+                    v-for="(item, index) in yearList"
+                    :key="index"
+                    v-model="item.checked"
+                    :name="item.name"
+                  >
+                    {{ item.name }}
+                  </u-checkbox>
+                </u-checkbox-group>
+              </view>
+            </scroll-view>
+          </view>
+          <view class="confrim-btn"
+            ><view class="okBtn" @click="okPopup(2)">确定</view></view
+          >
+        </view>
+      </u-popup>
     </view>
     <view v-show="!isLogin">
       <view
@@ -291,6 +346,7 @@ export default {
       value: "",
       show: false,
       show1: false,
+      show2: false,
       allChecked: false,
       isOld: false,
       gradeList: [],
@@ -299,6 +355,7 @@ export default {
       cityList: [],
       detail: {},
       detailIndex: -1,
+      yearList: [],
       applyObj: {
         applyAreasJson: null,
         examDateJson: null,
@@ -314,7 +371,10 @@ export default {
     ...mapGetters(["userInfo", "hideBuyState", "config"]),
     totalPrice() {
       let price = 0;
-      this.checkList.forEach((e) => (price += e.standPrice));
+      this.checkList.forEach((e) => {
+        let multiple = e.selectYearList?.length || 1;
+        price += e.standPrice * multiple;
+      });
       return price;
     },
     canCheckList() {
@@ -407,6 +467,13 @@ export default {
         //   this.gradeList[this.gradeIndex]
         // );
         this.show = false;
+      } else if (index == 2) {
+        this.$set(
+          this.detail,
+          "selectYearList",
+          this.yearList.filter((e) => e.checked).map((e) => e.name)
+        );
+        this.show2 = false;
       } else {
         if (!this.checkAreaData()) {
           return;
@@ -477,11 +544,19 @@ export default {
     },
     openPopup(index, item, itemIndex) {
       this.detail = item;
-      console.log(this.detail, 798);
       this.detailIndex = itemIndex;
       if (index == 0) {
         this.show = true;
         this.goodsGradeList(item.goodsId);
+      } else if (index == 2) {
+        this.show2 = true;
+        let selectYearList = item.selectYearList || "";
+        this.yearList = item.sevenYear.split(",").map((e) => {
+          return {
+            name: e,
+            checked: selectYearList.includes(e),
+          };
+        });
       } else {
         this.applyObj = {
           applyAreasJson: null,
@@ -529,15 +604,16 @@ export default {
               item.checked = choiceStatus == 1;
               if (templateType === "class" && goodsType == 1) {
                 // 无返回就默认系统分班
-                if (gradeList || gradeList.length === 0) {
+                if (!gradeList || gradeList.length === 0) {
                   gradeList = [
                     {
                       className: "系统分班",
                       gradeId: 0,
                     },
                   ];
+                  item.gradeList = gradeList;
                 }
-                item.gradObj = item.gradeList[0];
+                item.gradObj = gradeList[0];
               }
             }
           }
@@ -573,7 +649,7 @@ export default {
         });
         return;
       }
-      this.checkList.forEach((item) => {
+      for (const item of this.checkList) {
         if (item.templateType == "class" && item.goodsType == 1) {
           if (!item.gradObj.className) {
             uni.showModal({
@@ -583,6 +659,14 @@ export default {
             });
             return false;
           }
+          if (!item.selectYearList) {
+            uni.showModal({
+              title: "提示",
+              content: "请选择年份",
+              showCancel: false,
+            });
+            return false;
+          }
         }
         if (item.templateType == "apply" && item.goodsType == 1) {
           // if (!item.applyAreas.areaName) {
@@ -594,7 +678,7 @@ export default {
           // 	return false;
           // }
         }
-      });
+      }
       this.$store.commit("setShoppingCartList", {
         shoppingCartList: this.checkList,
       });