瀏覽代碼

Merge branch 'x_bf_1' into dev

谢杰标 3 年之前
父節點
當前提交
a9cb65418a
共有 34 個文件被更改,包括 3107 次插入3241 次删除
  1. 16 2
      src/apis/common.js
  2. 87 71
      src/apis/course.js
  3. 5 13
      src/components/buyCourseModal/index.vue
  4. 1394 0
      src/components/courseTree/CourseTree.vue
  5. 1 0
      src/components/exam/HeaderTabBox.vue
  6. 334 251
      src/components/goodsItem/IndexSkuDialog.vue
  7. 93 51
      src/components/goodsItem/index.vue
  8. 68 103
      src/components/header/index.vue
  9. 6 6
      src/pages/bank-exam-all-explain/index.vue
  10. 6 6
      src/pages/bank-exam-continue/index.vue
  11. 6 6
      src/pages/bank-exam-explain/index.vue
  12. 6 6
      src/pages/bank-exam-wrong-explain/index.vue
  13. 7 10
      src/pages/bank-exam/index.vue
  14. 24 52
      src/pages/bank-list/index.vue
  15. 30 1309
      src/pages/course-detail/index.vue
  16. 286 568
      src/pages/course-exam/index.vue
  17. 1 0
      src/pages/course-list/index.vue
  18. 48 20
      src/pages/goods-detail/bank-detail.vue
  19. 64 177
      src/pages/goods-detail/course-detail.vue
  20. 41 16
      src/pages/goods-detail/live-detail.vue
  21. 202 356
      src/pages/home/index.vue
  22. 0 6
      src/pages/live-detail/index.vue
  23. 1 0
      src/pages/live-list/index.vue
  24. 6 6
      src/pages/mock-exam-all-explain/index.vue
  25. 6 6
      src/pages/mock-exam-wrong-explain/index.vue
  26. 25 22
      src/pages/mock-exam/index.vue
  27. 6 6
      src/pages/person-center/free-bank/bank-explain-detail/index.vue
  28. 291 128
      src/pages/person-center/my-bank/bank-detailCopy/index.vue
  29. 6 6
      src/pages/person-center/my-bank/bank-explain-detail/index.vue
  30. 17 14
      src/pages/person-center/my-course/index.vue
  31. 6 6
      src/pages/subject/collect-bank.vue
  32. 6 6
      src/pages/subject/collect-type-bank.vue
  33. 6 6
      src/pages/subject/wrong-bank.vue
  34. 6 6
      src/pages/subject/wrong-type-bank.vue

+ 16 - 2
src/apis/common.js

@@ -145,7 +145,14 @@ export default {
       noToken: true
     })
   },
-
+  // 校验商品状态 
+  checkGoodsStatus(data) {
+    return request({
+      url: '/goods/check/goods/status',
+      method: 'post',
+      data
+    })
+  },
   /**
    * 
    * @param {*} data 
@@ -234,7 +241,14 @@ export default {
       noToken: true
     })
   },
-  
+  // 随机组题题目列表
+  goodsRandomQuestionList(data) {
+    return request({
+      url: '/bank/exam/simulate',
+      method: 'post',
+      data
+    })
+  },
   /**
    * 
    * @param {*} data 

+ 87 - 71
src/apis/course.js

@@ -1,13 +1,13 @@
 import request from '@/axios'
 export default {
-  
-  /**
-   * 
-   * @param {*} data 
-   * @returns 
-   * 我的网课列表
-   */
-  courseGoodsList(data) {
+
+	/**
+	 * 
+	 * @param {*} data 
+	 * @returns 
+	 * 我的网课列表
+	 */
+	courseGoodsList(data) {
 		return request({
 			url: '/course/goodsList',
 			method: 'get',
@@ -15,13 +15,13 @@ export default {
 		})
 	},
 
-  /**
-   * 
-   * @param {*} data 
-   * @returns 
-   * 课程可选班级列表
-   */
-  goodsGradeList(data) {
+	/**
+	 * 
+	 * @param {*} data 
+	 * @returns 
+	 * 课程可选班级列表
+	 */
+	goodsGradeList(data) {
 		return request({
 			url: '/grade/grade/list',
 			method: 'get',
@@ -29,28 +29,28 @@ export default {
 		})
 	},
 
-  /**
-   * 
-   * @param {*} data 
-   * @returns 
-   * 选定班级
-   */
-  changeGrade(data) {
+	/**
+	 * 
+	 * @param {*} data 
+	 * @returns 
+	 * 选定班级
+	 */
+	changeGrade(data) {
 		return request({
 			url: '/grade/grade/changeGrade',
 			method: 'post',
-			data:data
+			data: data
 		})
 	},
 
-  courseGoodsRebuildStatus(data) {
+	courseGoodsRebuildStatus(data) {
 		return request({
 			url: '/course/goodsRebuildStatus',
 			method: 'get',
-			params:data
+			params: data
 		})
 	},
-  
+
 	//查看班级作弊重学详细情况
 	getcourseperiodcheat(data) {
 		return request({
@@ -60,7 +60,7 @@ export default {
 		})
 	},
 
-  
+
 	courseCourseList(data) {
 		return request({
 			url: '/course/courseList',
@@ -78,29 +78,29 @@ export default {
 		})
 	},
 
-  courseDetail(data) {
+	courseDetail(data) {
 		return request({
-			url: '/course/'+data,
+			url: '/course/' + data,
 			method: 'get'
 		})
 	},
 
-  goodsDetail(data) {
+	goodsDetail(data) {
 		return request({
-			url: '/goods/'+ data,
+			url: '/goods/' + data,
 			method: 'get'
 		})
 	},
 
-  
+
 	courseHandouts(data) {
 		return request({
-			url: '/course/handouts/'+data,
+			url: '/course/handouts/' + data,
 			method: 'get'
 		})
 	},
-  
-  reMenuList(data) {
+
+	reMenuList(data) {
 		return request({
 			url: '/course/menuList',
 			method: 'get',
@@ -108,7 +108,7 @@ export default {
 		})
 	},
 
-  noteList(data) {
+	noteList(data) {
 		return request({
 			url: '/user/note/listDate',
 			method: 'get',
@@ -116,7 +116,7 @@ export default {
 		})
 	},
 
-  
+
 	reChapterList(data) {
 		return request({
 			url: '/course/chapterList',
@@ -125,7 +125,7 @@ export default {
 		})
 	},
 
-  
+
 	reSectionList(data) {
 		return request({
 			url: '/course/sectionList',
@@ -140,7 +140,23 @@ export default {
 			params: data
 		})
 	},
-  reChapterList(data) {
+	// 获取商品所有节列表
+	getAllSectionList(data) {
+		return request({
+			url: '/goods/section/list',
+			method: 'get',
+			params: data
+		})
+	},
+	// 重修课程目录
+	getRebuildCourse(data) {
+		return request({
+			url: '/course/goods/rebuild/menu',
+			method: 'get',
+			params: data
+		})
+	},
+	reChapterList(data) {
 		return request({
 			url: '/course/chapterList',
 			method: 'get',
@@ -148,7 +164,7 @@ export default {
 		})
 	},
 
-  reSectionList(data) {
+	reSectionList(data) {
 		return request({
 			url: '/course/sectionList',
 			method: 'get',
@@ -156,31 +172,31 @@ export default {
 		})
 	},
 
-  studyRecordMenuAllList(data) {
+	studyRecordMenuAllList(data) {
 		return request({
 			url: '/study/record/menuAllList',
 			method: 'get',
-			params:data
+			params: data
 		})
 	},
 
-  gradeCheckGoodsStudy(data) {
+	gradeCheckGoodsStudy(data) {
 		return request({
 			url: '/grade/grade/checkGoodsStudy',
 			method: 'get',
-			params:data
+			params: data
 		})
 	},
 
-  goodsTodayStudySectionNum(data) {
+	goodsTodayStudySectionNum(data) {
 		return request({
 			url: '/goods/todayStudySectionNum',
 			method: 'get',
-			params:data
+			params: data
 		})
 	},
 
-  coursePhotoRecord(data) {
+	coursePhotoRecord(data) {
 		return request({
 			url: '/course/photo/log',
 			method: 'post',
@@ -188,15 +204,15 @@ export default {
 		})
 	},
 
-  faceCertificationCompareFace(data) {
+	faceCertificationCompareFace(data) {
 		return request({
 			url: '/face/certification/CompareFace',
 			method: 'post',
-			data:data
+			data: data
 		})
 	},
 
-  studyRecord(data) {
+	studyRecord(data) {
 		return request({
 			url: '/study/record',
 			method: 'post',
@@ -204,7 +220,7 @@ export default {
 		})
 	},
 
-  getPhotoLastRecord(data) {
+	getPhotoLastRecord(data) {
 		return request({
 			url: '/course/photo/log/getLastInfo',
 			method: 'get',
@@ -212,7 +228,7 @@ export default {
 		})
 	},
 
-  
+
 	recordLast(data) {
 		return request({
 			url: '/study/record/last',
@@ -220,7 +236,7 @@ export default {
 			params: data
 		})
 	},
-  studRrecordListUserRecord(data) {
+	studRrecordListUserRecord(data) {
 		return request({
 			url: '/study/record/listUserRecord',
 			method: 'get',
@@ -228,33 +244,33 @@ export default {
 		})
 	},
 
-  
+
 	faceCertificationIDCardOCR(data) {
 		return request({
 			url: '/face/certification/IDCardOCR',
 			method: 'post',
-			data:data
+			data: data
 		})
 	},
 
-  facCertificationImageRecognition(data) {
+	facCertificationImageRecognition(data) {
 		return request({
 			url: '/face/certification/ImageRecognition',
 			method: 'post',
-			data:data
+			data: data
 		})
 	},
 
-  faceCertificationIdCardCompareFace(data) {
+	faceCertificationIdCardCompareFace(data) {
 		return request({
 			url: '/face/certification/idCardCompareFace',
 			method: 'post',
-			data:data
+			data: data
 		})
 	},
 
 
-  appBeforeAddress(data) {
+	appBeforeAddress(data) {
 		return request({
 			url: '/app/before/address',
 			method: 'get',
@@ -262,27 +278,27 @@ export default {
 		})
 	},
 
-  goodsListGoodsUserLive(data) {
+	goodsListGoodsUserLive(data) {
 		return request({
-			url:`/goods/listGoodsUserLive`,
+			url: `/goods/listGoodsUserLive`,
 			method: 'get',
-			params:data
+			params: data
 		})
 	},
 
-  polyvLiveHistoryChatMsgList(data) {
+	polyvLiveHistoryChatMsgList(data) {
 		return request({
 			url: '/polyv/live/historyChatMsgList',
 			method: 'get',
-			params:data
+			params: data
 		})
 	},
 
-  studyRecordQueryLiveLast(data) {
+	studyRecordQueryLiveLast(data) {
 		return request({
 			url: '/study/record/queryLiveLast',
 			method: 'get',
-			params:data
+			params: data
 		})
 	},
 
@@ -294,19 +310,19 @@ export default {
 		})
 	},
 
-  goodsLivingSectionList(data) {
+	goodsLivingSectionList(data) {
 		return request({
 			url: '/goods/livingSectionList',
 			method: 'get',
-			params:data
+			params: data
 		})
 	},
 
-  courseMajorList(data) {
+	courseMajorList(data) {
 		return request({
 			url: '/course/major/list',
 			method: 'get',
-			params:data
+			params: data
 		})
 	},
 }

+ 5 - 13
src/components/buyCourseModal/index.vue

@@ -6,12 +6,7 @@
       :visible.sync="selectClassModal"
     >
       <div class="select-class__content">
-        <div
-          class="selection"
-          v-if="
-            goodsDetail.templateType == 'class' && goodsDetail.goodsType == 1
-          "
-        >
+        <div class="selection" v-if="goodsDetail.specialGoods">
           <el-select
             class="select"
             v-model="gradeId"
@@ -106,8 +101,8 @@ export default {
   mounted() {},
   methods: {
     showModal(item) {
-      this.gradeId = ''
-      this.gradeList = []
+      this.gradeId = "";
+      this.gradeList = [];
       this.selectClassModal = true;
       this.goodsDetail = item;
     },
@@ -153,10 +148,7 @@ export default {
       }
     },
     pay() {
-      if (
-        this.goodsDetail.templateType == "class" &&
-        this.goodsDetail.goodsType == 1
-      ) {
+      if (this.goodsDetail.specialGoods == 1) {
         if (!this.gradeId && this.gradeId !== 0) {
           this.$message({
             message: "请选择班级",
@@ -190,7 +182,7 @@ export default {
       let selectGoodsList = JSON.parse(JSON.stringify([this.goodsDetail]));
       selectGoodsList.forEach((item) => {
         if (item.goodsType == 1) {
-          if (item.templateType == "class") {
+          if (item.specialGoods == 1) {
             let goodsInputData = {
               type: "class",
               gradeId: this.gradeId,

+ 1394 - 0
src/components/courseTree/CourseTree.vue

@@ -0,0 +1,1394 @@
+<template>
+  <div class="course_tree">
+    <div v-for="(courseItem, courseIndex) in treeList" :key="courseIndex">
+      <div v-if="courseItem.courseList" class="teacherList_name">
+        <div
+          v-for="tea in courseItem.courseList"
+          :key="tea.courseId"
+          class="names"
+          :class="{ nactive: tea.courseId == courseItem.courseId }"
+          @click="activeFunc(tea.courseId, courseIndex)"
+        >
+          {{ tea.aliasName }}
+        </div>
+      </div>
+      <div
+        class="item__title"
+        @click="getMenuList(courseItem)"
+        v-if="treeList.length != 1"
+      >
+        <i
+          :class="{
+            'el-icon-caret-right': !courseItem.showList,
+            'el-icon-caret-bottom': courseItem.showList,
+          }"
+        ></i>
+        {{ courseItem.courseName }}
+      </div>
+      <div
+        v-if="courseItem.showList"
+        :style="{ paddingLeft: treeList.length != 1 ? '12px' : '0' }"
+      >
+        <div class="item" v-for="(menu, index) in courseItem.list" :key="index">
+          <template v-if="menu.type == 1">
+            <div class="item__title" @click="openModule(menu)">
+              <i
+                :class="{
+                  'el-icon-caret-right': !menu.showList,
+                  'el-icon-caret-bottom': menu.showList,
+                }"
+              ></i>
+              {{ menu.menuName }}
+            </div>
+            <div class="item__content">
+              <div class="bank-chapter" v-if="menu.showList">
+                <div
+                  class="bank-chapter__item"
+                  v-for="chapter in menu.list"
+                  :key="chapter.id"
+                >
+                  <div
+                    v-if="chapter.type == 1"
+                    class="bank-chapter__item__text"
+                    @click="openChapter(chapter)"
+                  >
+                    <i
+                      :class="{
+                        'el-icon-caret-right': !chapter.showList,
+                        'el-icon-caret-bottom': chapter.showList,
+                      }"
+                    ></i
+                    >{{ chapter.name }}
+                  </div>
+
+                  <div
+                    class="bank-section"
+                    v-if="chapter.showList && chapter.type == 1"
+                  >
+                    <div
+                      class="bank-section__item"
+                      :class="{
+                        active: isActive(section),
+                      }"
+                      v-for="(section, sectionIndex) in chapter.list"
+                      :key="sectionIndex"
+                      @click="getResource(section, 1, courseIndex)"
+                    >
+                      <template v-if="section.type != 2">
+                        <template>
+                          <div
+                            class="note note--blue"
+                            v-if="section.sectionType == 1"
+                          >
+                            视频
+                          </div>
+                          <div class="note" v-if="section.sectionType == 2">
+                            直播
+                          </div>
+                          <div
+                            class="note note--yellow"
+                            v-if="section.sectionType == 3"
+                          >
+                            回放
+                          </div>
+                          <div class="bank-section__item__text">
+                            {{ section.name }}
+                            <div
+                              style="font-size: 12px"
+                              v-if="section.liveStartTime > nowTime"
+                            >
+                              <span>{{
+                                $tools.timestampToTime(
+                                  section.liveStartTime,
+                                  (isDay = false)
+                                )
+                              }}</span
+                              >-
+                              <span>{{
+                                $tools.timestampToTime(
+                                  section.liveEndTime,
+                                  (isDay = false)
+                                )
+                              }}</span>
+                            </div>
+                          </div>
+                        </template>
+
+                        <div class="lear-state" v-if="isActive(section)">
+                          <img src="../../assets/learing.gif" alt="" />
+                        </div>
+                        <template v-if="section.durationTime > 0">
+                          <div class="during">
+                            {{ $tools.secondToDate(section.durationTime) }}
+                          </div>
+                        </template>
+                        <template>
+                          <div class="btn" v-if="section.rebuild > 0">
+                            待重修
+                          </div>
+                          <template v-else>
+                            <div
+                              class="btn btn--green"
+                              v-if="section.learning == 1"
+                            >
+                              已学完
+                            </div>
+                          </template>
+                        </template>
+                        <template
+                          v-if="
+                            section.liveStartTime && section.sectionType == 2
+                          "
+                        >
+                          <div
+                            class="live-btn live-btn--blue"
+                            v-if="section.liveStartTime > nowTime"
+                          >
+                            待开播
+                          </div>
+                          <div
+                            class="live-btn live-btn--yellow"
+                            v-if="
+                              section.liveStartTime <= nowTime &&
+                              section.liveEndTime > nowTime
+                            "
+                          >
+                            直播中
+                          </div>
+                          <div
+                            class="live-btn"
+                            v-if="section.liveEndTime < nowTime"
+                          >
+                            已结束
+                          </div>
+                        </template>
+
+                        <template
+                          v-if="checkSection(section.sectionId, 'sectionExam')"
+                        >
+                          <div
+                            class="exercises"
+                            @click.stop="
+                              handelPracticeOrRxam(
+                                section,
+                                2,
+                                courseItem.courseId
+                              )
+                            "
+                          >
+                            习题
+                            <i class="el-icon-arrow-right icons"></i>
+                          </div>
+                        </template>
+                      </template>
+
+                      <template v-if="section.type == 2">
+                        <template>
+                          <div class="test-btn" v-if="section.doType == 1">
+                            练习
+                          </div>
+                          <div class="test-btn" v-if="section.doType != 1">
+                            考试
+                          </div>
+                        </template>
+                        <div class="bank-section__item__text">
+                          {{ section.name }}
+                        </div>
+                        <template>
+                          <div class="btn" v-if="section.rebuild > 0">
+                            待重修
+                          </div>
+                          <template v-else>
+                            <div
+                              class="btn btn--green"
+                              v-if="section.learning == 1"
+                            >
+                              合格
+                            </div>
+                            <div
+                              class="btn btn--red"
+                              v-if="section.learning == 0"
+                            >
+                              不及格(需重考)
+                            </div>
+                            <div
+                              class="btn btn--green"
+                              v-if="section.rebuild > 0"
+                            >
+                              待重测
+                            </div>
+                          </template>
+                        </template>
+                      </template>
+                    </div>
+                  </div>
+                  <div
+                    v-if="chapter.type == 2"
+                    class="bank-section__item"
+                    @click="getResource(chapter, 3, courseIndex)"
+                  >
+                    <template>
+                      <template>
+                        <div class="test-btn" v-if="chapter.doType == 1">
+                          练习
+                        </div>
+                        <div class="test-btn" v-if="chapter.doType != 1">
+                          考试
+                        </div>
+                      </template>
+                      <div class="bank-section__item__text">
+                        {{ chapter.name }}
+                      </div>
+                      <template>
+                        <div
+                          class="btn btn--green"
+                          v-if="chapter.learning == 1"
+                        >
+                          合格
+                        </div>
+                        <div class="btn btn--red" v-if="chapter.learning == 0">
+                          不及格(需重考)
+                        </div>
+                      </template>
+                    </template>
+                  </div>
+                </div>
+              </div>
+            </div>
+          </template>
+
+          <template v-if="menu.type == 2">
+            <div class="item__content">
+              <div class="bank-chapter">
+                <div class="bank-chapter__item">
+                  <div
+                    class="bank-chapter__item__text"
+                    @click="openChapter(menu)"
+                  >
+                    <i
+                      :class="{
+                        'el-icon-caret-right': !menu.showList,
+                        'el-icon-caret-bottom': menu.showList,
+                      }"
+                    ></i
+                    >{{ menu.menuName }}
+                  </div>
+
+                  <div class="bank-section" v-if="menu.showList">
+                    <div
+                      class="bank-section__item"
+                      :class="{
+                        active: isActive(section),
+                      }"
+                      v-for="(section, sectionIndex) in menu.list"
+                      :key="sectionIndex"
+                      @click="getResource(section, 1, courseIndex)"
+                    >
+                      <template v-if="section.type != 2">
+                        <template>
+                          <div
+                            class="note note--blue"
+                            v-if="section.sectionType == 1"
+                          >
+                            视频
+                          </div>
+                          <div class="note" v-if="section.sectionType == 2">
+                            直播
+                          </div>
+                          <div
+                            class="note note--yellow"
+                            v-if="section.sectionType == 3"
+                          >
+                            回放
+                          </div>
+                        </template>
+                        <div class="bank-section__item__text">
+                          {{ section.name }}
+                          <div
+                            style="font-size: 12px"
+                            v-if="section.liveStartTime > nowTime"
+                          >
+                            <span>{{
+                              $tools.timestampToTime(
+                                section.liveStartTime,
+                                (isDay = false)
+                              )
+                            }}</span
+                            >-
+                            <span>{{
+                              $tools.timestampToTime(
+                                section.liveEndTime,
+                                (isDay = false)
+                              )
+                            }}</span>
+                          </div>
+                        </div>
+                        <div class="lear-state" v-if="isActive(section)">
+                          <img src="../../assets/learing.gif" alt="" />
+                        </div>
+                        <template v-if="section.durationTime > 0">
+                          <div class="during">
+                            {{ $tools.secondToDate(section.durationTime) }}
+                          </div>
+                        </template>
+                        <template>
+                          <div class="btn" v-if="section.rebuild > 0">
+                            待重修
+                          </div>
+                          <template v-else>
+                            <div
+                              class="btn btn--green"
+                              v-if="section.learning == 1"
+                            >
+                              已学完
+                            </div>
+                          </template>
+                        </template>
+                        <template
+                          v-if="
+                            section.liveStartTime && section.sectionType == 2
+                          "
+                        >
+                          <div
+                            class="live-btn live-btn--blue"
+                            v-if="section.liveStartTime > nowTime"
+                          >
+                            待开播
+                          </div>
+                          <div
+                            class="live-btn live-btn--yellow"
+                            v-if="
+                              section.liveStartTime <= nowTime &&
+                              section.liveEndTime > nowTime
+                            "
+                          >
+                            直播中
+                          </div>
+                          <div
+                            class="live-btn"
+                            v-if="section.liveEndTime < nowTime"
+                          >
+                            已结束
+                          </div>
+                        </template>
+
+                        <template
+                          v-if="checkSection(section.sectionId, 'sectionExam')"
+                        >
+                          <div
+                            class="exercises"
+                            @click.stop="
+                              handelPracticeOrRxam(
+                                section,
+                                2,
+                                courseItem.courseId
+                              )
+                            "
+                          >
+                            习题
+                            <i class="el-icon-arrow-right icons"></i>
+                          </div>
+                        </template>
+                      </template>
+
+                      <template v-if="section.type == 2">
+                        <template>
+                          <div class="test-btn" v-if="section.doType == 1">
+                            练习
+                          </div>
+                          <div class="test-btn" v-if="section.doType != 1">
+                            考试
+                          </div>
+                        </template>
+                        <div class="bank-section__item__text">
+                          {{ section.name }}
+                        </div>
+                        <template>
+                          <div class="btn" v-if="section.rebuild > 0">
+                            待重修
+                          </div>
+                          <template v-else>
+                            <div
+                              class="btn btn--green"
+                              v-if="section.learning == 1"
+                            >
+                              合格
+                            </div>
+                            <div
+                              class="btn btn--red"
+                              v-if="section.learning == 0"
+                            >
+                              不及格(需重考)
+                            </div>
+                            <div
+                              class="btn btn--green"
+                              v-if="section.rebuild > 0"
+                            >
+                              待重测
+                            </div>
+                          </template>
+                        </template>
+                      </template>
+                    </div>
+                  </div>
+                </div>
+              </div>
+            </div>
+          </template>
+
+          <template v-if="menu.type == 3">
+            <div class="item__content">
+              <div class="bank-section">
+                <div
+                  class="bank-section__item"
+                  :class="{
+                    active: isActive(menu),
+                  }"
+                  @click="getResource(menu, 1, courseIndex)"
+                >
+                  <template>
+                    <div class="note note--blue" v-if="menu.sectionType == 1">
+                      视频
+                    </div>
+                    <div class="note" v-if="menu.sectionType == 2">直播</div>
+                    <div class="note note--yellow" v-if="menu.sectionType == 3">
+                      回放
+                    </div>
+                    <div class="bank-section__item__text">
+                      {{ menu.name }}
+                      <div
+                        style="font-size: 12px"
+                        v-if="menu.liveStartTime > nowTime"
+                      >
+                        <span>{{
+                          $tools.timestampToTime(
+                            menu.liveStartTime,
+                            (isDay = false)
+                          )
+                        }}</span
+                        >-
+                        <span>{{
+                          $tools.timestampToTime(
+                            menu.liveEndTime,
+                            (isDay = false)
+                          )
+                        }}</span>
+                      </div>
+                    </div>
+                  </template>
+                  <div class="lear-state" v-if="isActive(menu)">
+                    <img src="../../assets/learing.gif" alt="" />
+                  </div>
+                  <template v-if="menu.durationTime > 0">
+                    <div class="during">
+                      {{ $tools.secondToDate(menu.durationTime) }}
+                    </div>
+                  </template>
+                  <template>
+                    <div class="btn" v-if="menu.rebuild > 0">待重修</div>
+                    <template v-else>
+                      <div class="btn btn--green" v-if="menu.learning == 1">
+                        已学完
+                      </div>
+                    </template>
+                  </template>
+                  <template v-if="menu.liveStartTime && menu.sectionType == 2">
+                    <div
+                      class="live-btn live-btn--blue"
+                      v-if="menu.liveStartTime > nowTime"
+                    >
+                      待开播
+                    </div>
+                    <div
+                      class="live-btn live-btn--yellow"
+                      v-if="
+                        menu.liveStartTime <= nowTime &&
+                        menu.liveEndTime > nowTime
+                      "
+                    >
+                      直播中
+                    </div>
+                    <div class="live-btn" v-if="menu.liveEndTime < nowTime">
+                      已结束
+                    </div>
+                  </template>
+
+                  <template v-if="checkSection(menu.menuId, 'sectionExamList')">
+                    <div
+                      class="exercises"
+                      @click.stop="
+                        handelPracticeOrRxam(menu, 3, courseItem.courseId)
+                      "
+                    >
+                      习题
+                      <i class="el-icon-arrow-right icons"></i>
+                    </div>
+                  </template>
+                </div>
+              </div>
+            </div>
+          </template>
+        </div>
+      </div>
+    </div>
+    <el-dialog
+      title="温馨提示"
+      width="380px"
+      center
+      class="tip-dialog"
+      :visible.sync="dialogPalyVisible"
+      :close-on-click-modal="false"
+      :close-on-press-escape="false"
+      :show-close="false"
+    >
+      <template v-if="!isLastVideo">
+        <p>当前视频已学完,继续学习下一个视频?</p>
+        <div class="btn1">
+          <el-button type="info" plain round @click="dialogPalyVisible = false"
+            >取 消</el-button
+          >
+          <el-button type="primary" @click="comfirm" round>确定</el-button>
+        </div>
+      </template>
+      <template v-else>
+        <p>
+          当前是最后一个视频并已学习完,请检查所有章节的视频是否已学习完成。
+        </p>
+        <div class="btn2">
+          <el-button type="primary" round @click="dialogPalyVisible = false"
+            >确定</el-button
+          >
+        </div>
+      </template>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+export default {
+  props: {
+    courseList: {
+      type: Array,
+      default: () => {
+        return [];
+      },
+    },
+    goodsLearningOrder: {
+      type: Number,
+    },
+    sectionMaxNum: {
+      type: Number,
+    },
+    sectionItem: {
+      type: Object,
+      default: () => {
+        return {};
+      },
+    },
+    rebuild: {
+      type: Number,
+      default: 0,
+    },
+  },
+  data() {
+    return {
+      teaIndex: 0,
+      nowTime: 0,
+      treeList: [],
+      query: this.$route.query,
+      sectionExam: [],
+      sectionExamList: [],
+      dialogPalyVisible: false,
+      allSectionList: [],
+    };
+  },
+  created() {
+    this.init();
+  },
+  methods: {
+    async init() {
+      this.nowTime = Number(new Date().getTime() / 1000).toFixed(0);
+      this.treeList = await this.getDoubleTeacherList();
+      let sectionItem = await this.backNextItem(
+        this.treeList.find((e) => e.courseId == this.activeCourseId),
+        0,
+        false
+      );
+      console.log(sectionItem, "sectionItem");
+      if (this.query.sectionType == 1 && !!this.query.rebuild == this.rebuild) {
+        this.toPlay(sectionItem);
+      }
+      this.getAllSectionList();
+    },
+    activeFunc(courseId, index) {
+      let { courseId: nowCourseId, courseList } = this.treeList[index];
+      if (courseId == nowCourseId) {
+        return;
+      }
+      // if (index) {
+      //   let { stuAllNum, secAllNum } = this.treeList[index - 1];
+      //   if (stuAllNum != secAllNum) {
+      //     return this.$message({
+      //       type: "warning",
+      //       message: "需按课程顺序学习",
+      //     });
+      //   }
+      // }
+      let course = this.courseList.find((e) => e.courseId == courseId);
+      if (course) {
+        course.courseList = courseList;
+        course.list = [];
+        course.showList = false;
+      }
+      this.treeList.splice(index, 1, JSON.parse(JSON.stringify(course)));
+      this.getMenuList(this.treeList[index]);
+    },
+    getMenuList(course, isFresh = false) {
+      let { showList, courseId, list } = course;
+      if (!isFresh) {
+        course.showList = !showList;
+        if (list.length) return;
+      }
+      this.$request
+        .reSectionExamList({
+          chapterId: 0,
+          courseId,
+          gradeId: this.gradeId,
+        })
+        .then((res) => {
+          this.sectionExamList = res.data;
+        });
+      return this.$request
+        .reMenuList({ courseId, gradeId: this.gradeId })
+        .then((res) => {
+          for (let i = 0; i < res.rows.length; i++) {
+            let item = res.rows[i];
+            item.id = item.menuId;
+            item.name = item.menuName;
+            item.menuType = item.type;
+            item.showList = false;
+            item.list = [];
+            item.parent = course;
+          }
+          course.list = res.rows;
+          return Promise.resolve(res.rows);
+        });
+    },
+    openModule(module, isFresh = false) {
+      let { list, isRebuild, id, courseId, showList } = module;
+      if (!isFresh) {
+        module.showList = !showList;
+        if (list.length) return;
+      }
+      return this.$request
+        .reChapterList({
+          moduleId: id,
+          gradeId: this.gradeId,
+          courseId: courseId,
+          rebuild: isRebuild ? 1 : undefined,
+        })
+        .then((res) => {
+          for (let i = 0; i < res.data.length; i++) {
+            let item = res.data[i];
+            item.id = item.chapterId;
+            item.showList = false;
+            item.list = [];
+            item.parent = module;
+            isRebuild ? (item.isRebuild = 1) : (item.menuType = 2);
+          }
+          module.list = res.data;
+          return Promise.resolve(res.data);
+        });
+    },
+    openChapter(chapter, isFresh = false) {
+      let {
+        chapterId,
+        menuId,
+        list,
+        moduleId,
+        id,
+        isRebuild,
+        courseId,
+        showList,
+      } = chapter;
+      if (!isFresh) {
+        chapter.showList = !showList;
+        if (list.length) return;
+      }
+
+      this.$request
+        .reSectionExamList({
+          chapterId: chapterId || menuId,
+          courseId,
+          gradeId: this.gradeId,
+        })
+        .then((res) => {
+          this.sectionExam = [...this.sectionExam, ...res.data];
+        });
+      return this.$request
+        .reSectionList({
+          chapterId: id,
+          gradeId: this.gradeId,
+          courseId,
+          rebuild: isRebuild ? 1 : undefined,
+          moduleId: moduleId || 0,
+        })
+        .then((res) => {
+          chapter.canLearn = res.data
+            .filter((item) => item.type != 2)
+            .every((item) => item.learning == 1);
+          res.data.forEach((section) => {
+            section.parent = chapter;
+            section.courseId = courseId;
+          });
+          chapter.list = res.data;
+          return Promise.resolve(chapter.list);
+        });
+    },
+    getAllSectionList() {
+      this.$request
+        .getAllSectionList({
+          gradeId: this.gradeId,
+          goodsId: this.goodsId,
+          rebuild: this.rebuild,
+        })
+        .then((res) => {
+          this.allSectionList = res.data;
+        });
+    },
+    /**
+     * 判断是否是当前播放的节
+     */
+    isActive(section) {
+      let moduleId = section.moduleId || 0;
+      let chapterId = section.chapterId || 0;
+      let sectionId = section.sectionId || section.menuId;
+      let moduleId1 = this.sectionItem.moduleId || 0;
+      let chapterId1 = this.sectionItem.chapterId || 0;
+      let sectionId1 = this.sectionItem.sectionId || this.sectionItem.menuId;
+      return (
+        moduleId == moduleId1 &&
+        chapterId == chapterId1 &&
+        sectionId == sectionId1
+      );
+    },
+    comfirm() {
+      this.dialogPalyVisible = false;
+      this.playNextVideo();
+    },
+    // 自动播放下一个视频
+    async playNextVideo(sectionItem = this.sectionItem) {
+      let { menuId, parent, courseId, projectId } = sectionItem;
+      let list = (
+        menuId
+          ? this.treeList.find((e) => e.courseId == courseId).list
+          : projectId
+          ? this.treeList
+          : parent.list
+      ).filter((e) => !e.doType);
+      let index = list.findIndex((e) => e.id == sectionItem.id);
+      let nextItem = {};
+      if (list.length - 1 > index) {
+        nextItem = list[index + 1];
+        this.toPlay(
+          await this.backNextItem(nextItem, projectId ? 0 : nextItem.menuType)
+        );
+      } else {
+        this.playNextVideo(parent);
+      }
+    },
+    // 获取模块/章/节
+    async backNextItem(nextItem, type, isNext = true) {
+      if (type == undefined || type == 3) return nextItem;
+      let key = ["getMenuList", "openModule", "openChapter"][type];
+      let list = nextItem.list.length
+        ? nextItem.list
+        : await this[key](nextItem);
+      if (isNext) {
+        nextItem = type == 2 ? list.find((e) => e.type == 1) : list[0];
+      } else {
+        // 初始化 获取播放位置
+        let { moduleId, chapterId, sectionId } = this.query;
+        nextItem = list.find((e) => {
+          if (moduleId * 1 && type == 0) {
+            return e.menuId == moduleId;
+          }
+          if (chapterId * 1 && type < 2) {
+            return e[moduleId * 1 ? "chapterId" : "menuId"] == chapterId;
+          }
+          return (
+            e[moduleId * 1 || chapterId * 1 ? "sectionId" : "id"] == sectionId
+          );
+        });
+      }
+      return this.backNextItem(nextItem, nextItem.menuType, isNext);
+    },
+    async getResource(section, type, courseIndex) {
+      if (
+        section.type != 2 &&
+        this.isActive(section) &&
+        section.sectionType != 3
+      ) {
+        return;
+      }
+      if (!(await this.orderTopTobottom(section, type, courseIndex))) {
+        this.clickLock = false;
+        this.$message({
+          type: "warning",
+          message:
+            section.type == 2
+              ? "请学完视频课程再进行练习和测试"
+              : "请按顺序学习视频课程",
+        });
+        return false;
+      }
+      //视频 回放
+      if (section.sectionType == 1 || section.sectionType == 3) {
+        if (!section.recordingUrl) {
+          this.$message({
+            type: "warning",
+            message: `暂无播放地址数据`,
+          });
+          return false;
+        }
+      }
+      // 直播
+      if (section.sectionType == 2) {
+        if (!section.liveUrl) {
+          this.$message({
+            type: "warning",
+            message: `暂无直播地址数据`,
+          });
+          return false;
+        }
+        let data = await this.studyRecordGetChannelBasicInfo(section.liveUrl);
+        if (data.watchStatus == "end" || data.watchStatus == "playback") {
+          this.$message({
+            type: "warning",
+            message: `直播已结束`,
+          });
+          return false;
+        }
+
+        if (data.watchStatus == "waiting") {
+          this.$message({
+            type: "warning",
+            message: `直播未开始`,
+          });
+          return false;
+        }
+      }
+      // 学习次数
+      if (!(await this.exceedLearnNum(section))) {
+        return false;
+      }
+
+      section.type == 2
+        ? this.toCourseExam(section, type, courseIndex)
+        : this.toPlay(section);
+    },
+    async toCourseExam(section, type, courseIndex) {
+      //试卷
+      // 学习次数
+      let num =
+        this.goodsLearningOrder != 2 || section.rebuild
+          ? await this.bankRecordDoNum(section.typeId)
+          : section.doNum;
+      if (
+        (section.answerNum - num > 0 && section.answerNum > 0) ||
+        section.answerNum == 0
+      ) {
+        this.$router.push({
+          path: "/course-exam/" + this.goodsId,
+          query: {
+            courseId: this.treeList[courseIndex].courseId,
+            gradeId: this.gradeId,
+            moduleId: section.moduleId || 0,
+            sectionId: section.sectionId || 0,
+            examId: section.typeId,
+            learning: section.learning,
+            type: type,
+            chapterId: section.chapterId || 0,
+            orderGoodsId: this.orderGoodsId,
+          },
+        });
+      } else {
+        this.$message({
+          type: "warning",
+          message: "该试卷只能答题" + section.answerNum + "次",
+        });
+        return;
+      }
+    },
+    // 节卷不需要控制
+    handelPracticeOrRxam(section, type, courseId) {
+      if (type == 3) {
+        //节卷
+        let data = this.sectionExamList.filter(
+          (x) => x.sectionId == section.menuId
+        );
+        if (data && data.length > 0) {
+          section = data[0];
+        }
+      } else if (type == 2) {
+        //节卷
+        let data = this.sectionExam.filter(
+          (x) => x.sectionId == section.sectionId
+        );
+
+        if (data && data.length > 0) {
+          section = data[0];
+        }
+      }
+      this.$router.push({
+        path: "/course-exam/" + this.goodsId,
+        query: {
+          courseId,
+          gradeId: this.gradeId,
+          moduleId: section.moduleId || 0,
+          sectionId: section.sectionId || 0,
+          examId: section.typeId,
+          learning: section.learning,
+          type: type,
+          chapterId: section.chapterId || 0,
+          orderGoodsId: this.orderGoodsId,
+        },
+      });
+    },
+    async exceedLearnNum(section) {
+      let learnNum = await this.goodsTodayStudySectionNum();
+      let hasLearn = await this.gradeCheckGoodsStudy(
+        section.type == 2 ? section.typeId : section
+      );
+      if (this.sectionMaxNum > 0) {
+        if (learnNum >= this.sectionMaxNum && !hasLearn) {
+          this.$message({
+            type: "warning",
+            message: `每天最多学习${this.sectionMaxNum}节`,
+          });
+          return false;
+        }
+      }
+      return true;
+    },
+    goodsTodayStudySectionNum() {
+      return new Promise((resolve) => {
+        this.$request
+          .goodsTodayStudySectionNum({
+            goodsId: this.goodsId,
+            gradeId: this.gradeId,
+          })
+          .then((res) => {
+            resolve(res.data);
+          });
+      });
+    },
+    gradeCheckGoodsStudy(option) {
+      return new Promise((resolve) => {
+        this.$request
+          .gradeCheckGoodsStudy({
+            goodsId: this.goodsId,
+            gradeId: this.gradeId,
+            moduleId: option.moduleId || 0,
+            chapterId: option.chapterId || 0,
+            sectionId: option.sectionId || option.menuId,
+          })
+          .then((res) => {
+            resolve(res.data);
+          });
+      });
+    },
+    bankRecordDoNum(section) {
+      return new Promise((resolve) => {
+        this.$request
+          .bankRecordDoNum({
+            goodsId: this.goodsId,
+            gradeId: this.gradeId,
+            chapterId: section.chapterId,
+            courseId: this.courseId,
+            moduleId: 0,
+            examId: section.typeId,
+          })
+          .then((res) => {
+            resolve(res.data);
+          });
+      });
+    },
+    toPlay(section) {
+      console.log(section, 777);
+      this.$emit("getResource", section, this.rebuild);
+    },
+    //获取商品双师资模板
+    getDoubleTeacherList() {
+      let rows = JSON.parse(JSON.stringify(this.courseList));
+      rows.forEach((e) => {
+        e.list = [];
+        e.showList = false;
+        e.id = e.courseId;
+      });
+      return this.$request
+        .courseTeacherList({
+          goodsId: this.$route.params.goodsId,
+        })
+        .then(({ data }) => {
+          data.forEach((ele) => {
+            rows.forEach((e, i) => {
+              let actvieIndex = ele.courseIds.indexOf(this.activeCourseId);
+              let index = ele.courseIds.indexOf(e.courseId);
+              if (actvieIndex != -1 && index != -1) {
+                if (e.courseId == this.activeCourseId) {
+                  e.courseList = ele.courseList;
+                } else {
+                  delete rows[i];
+                }
+              } else {
+                if (index == 0) {
+                  e.courseList = ele.courseList;
+                }
+                if (index > 0) {
+                  delete rows[i];
+                }
+              }
+            });
+          });
+          return Promise.resolve(rows.filter((e) => e));
+        });
+    },
+    async orderTopTobottom(section, type, courseIndex) {
+      let { rebuild, moduleId, chapterId } = section;
+      if (this.goodsLearningOrder != 2 || rebuild) {
+        return true;
+      }
+      if (this.treeList.length > 1 && courseIndex > 0) {
+        let isAllLear = this.treeList
+          .filter((e, i) => i < courseIndex)
+          .every((ele) => ele.stuAllNum == ele.secAllNum);
+        if (!isAllLear) return false;
+      }
+      let list = await this.studyRecordMenuAllList(
+        this.treeList[courseIndex].courseId
+      );
+      type = type == 1 && section.type == 2 ? 2 : type;
+      if (type == 1) {
+        let index = list.findIndex(
+          (e) =>
+            e.moduleId == moduleId &&
+            e.chapterId == chapterId &&
+            e.id == section.sectionId
+        );
+        list = list.slice(0, index);
+      } else if (type != 3) {
+        list = list.filter(
+          (e) => e.moduleId == moduleId && e.chapterId == chapterId
+        );
+      }
+      return list.every((item) => item.studyStatus == 1);
+    },
+    studyRecordMenuAllList(courseId) {
+      return new Promise((resolve) => {
+        this.$request
+          .studyRecordMenuAllList({
+            courseId,
+            gradeId: this.gradeId,
+            goodsId: this.goodsId,
+          })
+          .then((res) => {
+            resolve(res.data);
+          });
+      });
+    },
+    //校验节是否有试卷
+    checkSection(sectionId, key) {
+      let _data = this[key];
+      if (_data.length == 0) {
+        return false;
+      }
+      return _data.some((section) => section.sectionId == sectionId);
+    },
+    // 刷新数据
+    refreshList() {
+      let { parent, menuId } = this.sectionItem;
+      if (menuId) {
+        this.getMenuList(playCourse, true);
+      } else {
+        this.openChapter(parent, true);
+      }
+    },
+    studyRecordGetChannelBasicInfo(channelId) {
+      return new Promise((resolve) => {
+        this.$request
+          .studyRecordGetChannelBasicInfo({
+            channelId,
+          })
+          .then((res) => {
+            resolve(res.data);
+          })
+          .catch((err) => {});
+      });
+    },
+  },
+  computed: {
+    gradeId() {
+      return this.query.gradeId;
+    },
+    activeCourseId() {
+      return this.query.courseId;
+    },
+    goodsId() {
+      return this.$route.params.goodsId;
+    },
+    playCourseId() {
+      return this.sectionItem.courseId;
+    },
+    playCourse() {
+      return this.treeList.find((e) => e.courseId == this.playCourseId);
+    },
+    isLastVideo() {
+      try {
+        let { sectionId, chapterId } = this.sectionItem;
+        let lastVideo = this.allSectionList.slice(-1)[0];
+        return (
+          sectionId == lastVideo.sectionId && chapterId == lastVideo.chapterId
+        );
+      } catch (error) {
+        return false;
+      }
+    },
+  },
+};
+</script>
+
+<style scoped lang="scss">
+.course_tree {
+  height: 380px;
+  overflow-y: scroll;
+
+  &::-webkit-scrollbar {
+    display: none;
+  }
+
+  .item {
+    &__title {
+      padding-left: 12px;
+      height: 40px;
+      line-height: 40px;
+      cursor: pointer;
+      font-size: 14px;
+      font-family: Microsoft YaHei;
+      font-weight: bold;
+      color: #fff;
+
+      .el-icon-caret-right,
+      .el-icon-caret-bottom {
+        color: #999;
+      }
+    }
+
+    &__content {
+      .bank-chapter {
+        &__item {
+          color: #fff;
+          font-size: 14px;
+
+          &__text {
+            padding: 8px 8px 8px 24px;
+            cursor: pointer;
+            flex: 1;
+
+            .el-icon-caret-right,
+            .el-icon-caret-bottom {
+              color: #999;
+            }
+          }
+        }
+      }
+
+      .bank-section {
+        &__item {
+          user-select: none;
+          color: #fff;
+          font-size: 14px;
+          display: flex;
+          align-items: center;
+
+          .lear-state {
+            height: 20px;
+            padding-right: 8px;
+
+            img {
+              width: 20px;
+              height: 20px;
+              // margin-right: 4px;
+            }
+          }
+
+          &.active {
+            background: #132b4d;
+            font-size: 14px;
+            font-family: Microsoft YaHei;
+            font-weight: bold;
+            color: #3f8dfd;
+          }
+
+          &__text {
+            flex: 1;
+            padding: 8px 8px 8px 12px;
+            height: 40px;
+            display: flex;
+            flex-direction: column;
+            justify-content: center;
+            cursor: pointer;
+
+            .el-icon-caret-right,
+            .el-icon-caret-bottom {
+              color: #999;
+            }
+          }
+
+          .test-btn {
+            margin-left: 10px;
+            width: 32px;
+            height: 20px;
+            background: #007aff;
+            border-radius: 4px;
+            line-height: 18px;
+            color: #fff;
+            text-align: center;
+          }
+
+          .note {
+            margin-left: 10px;
+            width: 32px;
+            height: 20px;
+            border: 1px solid #ff3b30;
+            border-radius: 4px;
+            line-height: 18px;
+            color: #ff3b30;
+            text-align: center;
+
+            &--yellow {
+              border-color: #ff9500;
+              color: #ff9500;
+            }
+
+            &--blue {
+              border-color: #3f8dfd;
+              color: #3f8dfd;
+            }
+          }
+
+          .during {
+            color: #999;
+            margin-right: 10px;
+          }
+
+          .btn {
+            margin-right: 12px;
+            padding: 0 2px;
+            height: 20px;
+            border: 1px solid #ff3b30;
+            background: #ff3b30;
+            border-radius: 4px;
+            line-height: 18px;
+            color: #fff;
+            text-align: center;
+
+            &--green {
+              border: 1px solid #34c759;
+              background: #34c759;
+            }
+          }
+
+          .live-btn {
+            margin-left: 20px;
+            width: 60px;
+            height: 20px;
+            border-radius: 4px;
+            background: #eeeeee;
+            line-height: 18px;
+            color: #666666;
+            text-align: center;
+
+            &--yellow {
+              background: #fff7eb;
+              color: #ff9500;
+            }
+
+            &--blue {
+              border-color: #ebf4ff;
+              color: #007aff;
+            }
+          }
+
+          .exercises {
+            cursor: pointer;
+            font-size: 14px;
+            color: #498afe;
+          }
+        }
+      }
+    }
+  }
+
+  .teacherList_name {
+    display: flex;
+    margin-left: 20px;
+    margin-top: 10px;
+
+    .names {
+      font-size: 13px;
+      color: #383838;
+      margin-right: 8px;
+      cursor: pointer;
+      background: #818181;
+      border-radius: 4px;
+      padding: 3px 6px;
+
+      &.nactive {
+        background: #cccccc;
+      }
+    }
+  }
+  .tip-dialog {
+    /deep/ {
+      .el-dialog__body {
+        padding: 6px 40px 44px;
+      }
+
+      .el-dialog__header {
+        padding-top: 36px;
+      }
+
+      .el-dialog__title {
+        font-weight: bold;
+        color: #222222;
+      }
+    }
+
+    p {
+      color: #666666;
+      font-size: 16px;
+      text-align: center;
+    }
+
+    .btn1 {
+      display: flex;
+      justify-content: space-between;
+      margin-top: 50px;
+
+      .el-button {
+        width: 140px;
+      }
+    }
+
+    .btn2 {
+      width: 200px;
+      margin: 32px auto 0;
+
+      .el-button {
+        width: 200px;
+      }
+    }
+  }
+}
+</style>

+ 1 - 0
src/components/exam/HeaderTabBox.vue

@@ -35,6 +35,7 @@ export default {
       this.$request
         .bankExam(this.examId || this.$route.query.examId)
         .then((res) => {
+          console.log(res,666)
           this.examInfo = res.data;
         });
     }

+ 334 - 251
src/components/goodsItem/IndexSkuDialog.vue

@@ -1,274 +1,357 @@
 <template>
-    <div class="check_sku">
-        <el-dialog
-            title="选择规格"
-            :visible.sync="skuModal"
-            width="680px"
-            class="appoint-modal"
-            :close-on-click-modal="false"
-            :close-on-press-escape="false"
-            :before-close="cancel"
-        >
-            <div v-loading="loading" class="contents">
-                <div class="lines"></div>
-                <div v-if="Object.keys(skuItem).length" class="pop_prices">
-                    <div class="lefts">
-						<img :src="$tools.splitImgHost(skuItem.coverUrl)" class="imgs" />
-					</div>
-					<div class="rights">
-						<div class="goods_titles">{{ skuItem.goodsName }}</div>
-						<div class="goods_price">¥{{ skuItem.standPrice }}</div>
-					</div>
-                </div>
-				
-                <div class="check_con">
-					<div v-for="(item, index) in specList" :key="index" class="check_items">
-						<div class="grades">{{ item.name }}</div>
-						<div class="mains">
-							<div class="grade_names">
-								<div class="course_items" v-for="(child, c_index) in item.specAttrList" :key="c_index" :class="{'nactive': child.check }"
-									@click="selectSku(child, index)">
-									{{ child.name }}
-								</div>
-							</div>
-						</div>
-					</div>
+  <div class="check_sku">
+    <el-dialog title="选择需要购买的课程" :visible.sync="skuModal" width="680px" class="appoint-modal"
+      :close-on-click-modal="false" :close-on-press-escape="false" :before-close="cancel">
+      <div v-loading="loading" class="contents">
+        <div class="check_con">
+          <div v-for="(item, index) in specList" :key="index" class="check_items">
+            <div class="grades" v-if="specList.length > 1">{{ item.name }}</div>
+            <div class="mains" v-if="index == 0 && specList.length > 1">
+              <div class="grade_names">
+                <div class="course_items" v-for="(child, c_index) in item.specAttrList" :key="c_index"
+                  :class="{ nactive: selectGoodIndex == c_index }" @click="selectGoodType(c_index)">
+                  {{ child.name }}
                 </div>
+              </div>
+            </div>
+            <div v-if="index == 1 || specList.length == 1" class="check_box">
+              <el-checkbox-group v-model="checkedAttrs" @change="changeCheck">
+                <el-checkbox v-for="spec in specAttrList" :label="spec.specAttributeId" :key="spec.specAttributeId">
+                  <div class="box_centen">{{ spec.name }}<span>{{ spec.standPrice
+                      === 0 ?
+                      '免费' : `¥${spec.standPrice}`
+                  }}</span></div>
+                </el-checkbox>
+              </el-checkbox-group>
             </div>
-            <span slot="footer" class="dialog-footer">
-                <el-button type="primary" size="small" :disabled="Object.keys(skuItem).length == 0 || specList.length != isCheckSku" @click="confirms()">确 定</el-button>
-            </span>
-        </el-dialog>
-    </div>
+          </div>
+        </div>
+      </div>
+      <div slot="footer" class="dialog-footer f_c_b">
+        <div class="price">
+          <div>
+            <span>总价:</span><span><i>¥</i>{{ allPrice | toFixed }}</span>
+          </div>
+          <p>已选择{{ checkedAttrs.length }}个商品</p>
+        </div>
+        <el-button :disabled="
+        checkedAttrs.length == 0" @click="confirms()" style="width: 136px" type="primary">{{ isCarOrBuy == 1 ?
+      "加入购物车" : "立即购买"
+  }}</el-button>
+      </div>
+    </el-dialog>
+    <BuyCourseModal ref="selectClassModal"></BuyCourseModal>
+  </div>
 </template>
 
 <script>
+import BuyCourseModal from "@/components/buyCourseModal/index";
 export default {
-    name: 'checkSku',
-    props: {
-        skuModal: {
-            type: Boolean,
-            default: false,
-        },
-        specTemplateId: {
-            type: [String, Number],
-            default: ''
-        },
-        isCarOrBuy: {
-            type: Number,
-            default: 1
+  name: "checkSku",
+  props: {
+    skuModal: {
+      type: Boolean,
+      default: false,
+    },
+    specTemplateId: {
+      type: [String, Number],
+      default: "",
+    },
+    isCarOrBuy: {
+      type: Number,
+      default: 1,
+    },
+  },
+  data() {
+    return {
+      loading: false,
+      specList: [], // 规格列表
+      checkedAttrs: [],
+      selectGoodIndex: 0,
+      specAttrPriceList: []
+    };
+  },
+  watch: {
+    skuModal(newV, oldV) {
+      if (newV) {
+        this.selectGoodIndex = 0
+        this.checkedAttrs = []
+        this.getSpecDetail();
+      }
+    },
+  },
+  computed: {
+    selectId() {
+      if (this.specList.length < 2) {
+        return
+      }
+      return this.specList[0].specAttrList[this.selectGoodIndex].specAttributeId
+    },
+    specAttrList() {
+      let arr = []
+      let data = this.specList.slice(-1)
+      data[0].specAttrList.forEach(ele => {
+        let id = ele.specAttributeId
+        if (this.specList.length > 1) {
+          id = this.selectId + ',' + id
+        }
+        let item = this.specAttrPriceList.find(e => e.specAttrIds == id)
+        if (item) {
+          ele.goodsId = item.goodsId
+          ele.standPrice = item.standPrice
+          arr.push(ele)
         }
+      });
+      return arr
     },
-    data() {
-        return {
-            loading: false,
-            skuItem: {},
-			specList: [], // 规格列表
+    allPrice() {
+      if (!this.checkedAttrs.length) {
+        return 0
+      }
+      return this.specAttrList.reduce((a, b) => {
+        if (this.checkedAttrs.includes(b.specAttributeId)) {
+          return a + b.standPrice
         }
+        return a
+      }, 0)
+    },
+    isSingleChoice() {
+      if (!this.specAttrPriceList.length) {
+        return false
+      }
+      return this.specAttrPriceList[0].specialGoods
+    }
+  },
+  methods: {
+    changeCheck(val) {
+      // 二建变单选
+      if (this.isSingleChoice) {
+        this.checkedAttrs = val.slice(-1)
+      }
     },
-    watch: {
-        skuModal(newV, oldV) {
-            if (newV) {
-                this.getSpecDetail()
+    selectGoodType(index) {
+      if (index == this.selectGoodIndex) {
+        return
+      }
+      this.selectGoodIndex = index
+    },
+    cancel() {
+      this.$emit("update:skuModal", false);
+    },
+    getSpecDetail() {
+      this.loading = true;
+      this.$axios({
+        url: `/app/common/spec/${this.specTemplateId}`,
+        method: "get",
+        noToken: true,
+      })
+        .then((res) => {
+          this.loading = false;
+          if (res.code == 200) {
+            let data = res.data;
+            if (data) {
+              this.specAttrPriceList = data.specAttrPriceList
+              this.specList = data && (data.specList || []);
             }
+          }
+        })
+        .catch(() => {
+          this.loading = false;
+        });
+    },
+    confirms() {
+      let goodsIds = []
+      let goodList = []
+      this.specAttrList.forEach(e => {
+        if (this.checkedAttrs.includes(e.specAttributeId) && !goodsIds.includes(e.goodsId)) {
+          goodsIds.push(e.goodsId)
+          goodList.push(this.specAttrPriceList.find(ele => ele.goodsId == e.goodsId))
         }
+      })
+      this.$request.checkGoodsStatus({ goodsIds }).then((res) => {
+        if (this.isCarOrBuy == 1) {
+          // 加入购物车
+          this.$emit("toShopCart", goodsIds);
+        } else {
+          if(this.isSingleChoice){
+            this.$refs.selectClassModal.showModal(goodList[0]);
+          }else{
+            this.goPayment(goodList)
+          }
+        }
+        this.cancel();
+      }).catch((e) => {
+        this.$message.warning(e.msg);
+      })
+
     },
-    computed: {
-        isCheckSku() {
-			let checkCout = 0
-			this.specList.forEach((item, index) => {
-				if (item.specAttrList && item.specAttrList.length) {
-					item.specAttrList.forEach((child, c_index) => {
-						if (child.check) {
-							checkCout++
-						}
-					})
-				}
-				
-			})
-			return checkCout
-		},
+    goPayment(data) {
+      let selectGoodsList = JSON.parse(JSON.stringify(data));
+      localStorage.setItem(
+        "checkGoodsList",
+        JSON.stringify(selectGoodsList)
+      );
+      this.$router.push({
+        path: "/payment",
+      });
     },
-    methods: {
-        cancel() {
-            this.skuItem = {}
-            this.$emit('update:skuModal', false)
-        },
-        getSpecDetail() {
-			// || 35
-            this.loading = true
-			this.$axios({
-				url: `/app/common/spec/${this.specTemplateId}`,
-				method: 'get',
-				noToken: true
-			}).then((res) => {
-                this.loading = false
-				if (res.code == 200) {
-					let data = res.data
-					if (data) {
-						this.specList = data && (data.specList || [])
-						this.specList.forEach((item, index) => {
-							item.specAttrList.forEach((child, i_index) => {
-								this.$set(this.specList[index].specAttrList[i_index], 'check', false)
-							})
-						})
-					}
-				}
-			}).catch(() => {
-                this.loading = false
-            })
-		},
-        selectSku(item, index) {
-			this.specList[index].specAttrList.forEach((i_item, i_index) => {
-				if (item.specAttributeId == i_item.specAttributeId) {
-					this.$set(this.specList[index].specAttrList[i_index], 'check', true)
-				} else {
-					this.$set(this.specList[index].specAttrList[i_index], 'check', false)
-				}
-			})
-			// console.log('this.specList', this.specList, this.isCheckSku)
-			if (this.specList.length == this.isCheckSku) {
-				let specAttrIds = []
-				this.specList.forEach((item) => {
-					let result = item.specAttrList.find(e => e.check)
-					if (result) {
-						specAttrIds.push(result.specAttributeId)
-					}
-				})
-				this.getGoodsInfos(specAttrIds)
-			}
-        },
-        // 获取规格属性值对应的商品信息
-		getGoodsInfos(specAttrIds) {
-            this.loading = true
-			this.$axios({
-				url: '/app/common/attr/goods',
-				method: 'get',
-				params: {
-					specTemplateId: this.specTemplateId,
-					specAttrIds: specAttrIds.join(',')
-				},
-				noToken: true
-			}).then((res) => {
-                this.loading = false
-				if (res.code == 200) {
-					this.skuItem = res.data || {}
-				} else {
-					this.skuItem = {}
-					this.$message.warning('商品已下架, 请重新选择')
-				}
-			}).catch((err) => {
-                this.loading = false
-				this.skuItem = {}
-				this.$message.warning('商品已下架, 请重新选择')
-            })
-		},
-        confirms() {
-            if (this.specList.length != this.isCheckSku) {
-				this.$message.warning('请先选择所有的规格')
-				return
-			}
-			if (this.skuItem.goodsStatus == 0) {
-				this.$message.warning('商品已下架, 请重新选择')
-				return
-			}
+  },
+  components: {
+    BuyCourseModal
+  },
+};
+</script>
 
-			let sysTime = this.$tools.timest()
-			if (sysTime <= this.skuItem.validityStartTime || sysTime >= this.skuItem.validityEndTime) {
-				this.$message.warning('商品不在有效期, 请重新选择')
-				return
-			}
+<style lang="scss" scoped>
+.appoint-modal {
+  /deep/ {
+    .el-dialog__header {
+      padding: 20px 28px;
+      border-bottom: 1px solid #d9d9d9;
 
-            if (this.isCarOrBuy == 1) { // 加入购物车
-			// console.log('this.skuItem.goodsId', this.skuItem.goodsId)
-                this.$emit('toShopCart', this.skuItem.goodsId)
-			} else {
-				this.$emit('togoBuy', this.skuItem)
-			}
-            this.cancel()
-        },
-    },
+      .el-dialog__title {
+        color: #222222;
+        font-size: 20px;
+      }
+    }
+
+    .el-checkbox {
+      width: 100%;
+      background: #f8f8f8;
+      margin-bottom: 16px;
+      padding: 0 28px 0 16px;
+      box-sizing: border-box;
+      color: #222222;
+      border-radius: 8px;
+      display: flex;
+      align-items: center;
+
+      .el-checkbox__label {
+        flex: 1;
+      }
+
+      &:nth-last-of-type(1) {
+        margin-bottom: 0;
+      }
+    }
+
+    .is-checked {
+      background: #ebf2ff;
+    }
+  }
+
+  .dialog-footer {
+    padding: 0 8px;
+
+    .price {
+      p {
+        font-size: 16px;
+        color: #666666;
+        text-align: left;
+      }
+
+      div {
+        span {
+          &:nth-of-type(1) {
+            color: #222222;
+            font-size: 16px;
+          }
+
+          &:nth-of-type(2) {
+            i {
+              font-size: 17px;
+              font-style: normal;
+            }
+
+            font-weight: bold;
+            color: #eb445a;
+            font-size: 28px;
+          }
+        }
+      }
+    }
+  }
+
+  .f_c_b {
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+  }
 }
-</script>
 
-<style lang="scss" scoped>
 .contents {
+  width: 100%;
+  padding: 0 8px;
+
+  .check_con {
     width: 100%;
-	.pop_prices {
-		width: 100%;
-		min-height: 80px;
-		display: flex;
-		align-items: center;
-		justify-content: space-between;
-		margin: 0px 0px 8px 0px;
-		.imgs {
-			width: 136px;
-			height: 80px;
-			border-radius: 8px;
-			margin-right: 16px;
-		}
-		.rights {
-			width: 100%;
-			min-height: 80px;
-		}
-		.goods_titles {
-			font-size: 16px;
-			font-weight: 500;
-			color: #222222;
-		}
-		.goods_price {
-			font-size: 16px;
-			font-weight: 500;
-			color: #FC3F3F;
-			margin-top: 14px;	
-		}
-	}
-	.lines {
-		width: 100%;
-		height: 1px;
-		background: #F0F0F0;
-        margin-bottom: 20px;
-	}
-	.check_con {
-		width: 100%;
-		// height: 500px;
-		// overflow-y: auto;
-		.check_items {
-			width: 100%;
-		}
-		.grades {
-			font-size: 14px;
-			color: #606266;
-			margin-bottom: 16px;
-            margin-top: 32px;
-		}
-		.mains {
-			width: 100%;
-			max-height: 200px;
-			overflow-y: auto;
-		}
-		.grade_names {
-			width: 100%;
-			display: flex;
-			flex-wrap: wrap;
-		}
-		.course_items {
-			// min-width: 190px;
-            padding: 13px 16px;
-            border-radius: 8px;
-            margin-right: 16px;
-            margin-bottom: 16px;
-            background: #F8F8F8;
-            font-size: 14px;
-            font-weight: 500;
-            color: #222222;
-            text-align: center;
-            cursor: pointer;
-            &.nactive {
-                background: #D5E4FF;
-                color: #3F8DFD;
-            }
-		}
-	}
+
+    .check_items {
+      margin-bottom: 32px;
+
+      &:nth-last-of-type(1) {
+        margin-bottom: 10px;
+      }
+    }
+
+    .grades {
+      font-size: 16px;
+      color: #606266;
+      margin-bottom: 16px;
+      //   margin-top: 32px;
+    }
+
+    .mains {
+      width: 100%;
+      max-height: 200px;
+      overflow-y: auto;
+    }
+
+    .check_box {
+      max-height: 400px;
+      overflow-y: auto;
+
+      &::-webkit-scrollbar {
+        display: none;
+      }
+
+      .box_centen {
+        height: 44px;
+        line-height: 42px;
+        display: flex;
+        justify-content: space-between;
+
+        span {
+          font-weight: bold;
+          color: #eb445a;
+          font-size: 16px;
+          font-family: DIN Alternate-Bold, DIN Alternate;
+        }
+      }
+    }
+
+    .grade_names {
+      width: 100%;
+      display: flex;
+      flex-wrap: wrap;
+    }
+
+    .course_items {
+      padding: 10px 16px;
+      border-radius: 8px;
+      margin-right: 16px;
+      background: #f8f8f8;
+      font-size: 14px;
+      font-weight: 500;
+      color: #222222;
+      text-align: center;
+      cursor: pointer;
+
+      &.nactive {
+        background: #ebf2ff;
+        color: #3f8dfd;
+      }
+    }
+  }
 }
 </style>

+ 93 - 51
src/components/goodsItem/index.vue

@@ -20,8 +20,22 @@
         {{ item.goodsName }}
       </div>
       <div class="course-item__desc">
-        <div class="price">{{item.standPrice === 0 ? '免费' : `¥${item.standPrice}`}}</div>
-        <div v-if="item.linePrice" class="linePrice">¥{{item.linePrice}}</div>
+        <div
+          class="price"
+          v-if="!item.specTemplateId || (!item.maxPrice && !item.minPrice)"
+        >
+          {{ item.standPrice === 0 ? "免费" : `¥${item.standPrice}` }}
+        </div>
+        <div v-else class="price">
+          <span>{{ item.minPrice }}</span>
+          <template v-if="item.minPrice != item.maxPrice">
+            <i>-</i>
+            <span>{{ item.maxPrice }}</span>
+          </template>
+        </div>
+        <div v-if="item.linePrice" class="linePrice">
+          ¥{{ item.linePrice }}
+        </div>
       </div>
       <div class="course-item__btns">
         <a class="add" @click.stop="addCart(item)">加购物车</a>
@@ -30,19 +44,25 @@
     </div>
 
     <BuyCourseModal ref="selectClassModal"></BuyCourseModal>
-    <index-sku-dialog :skuModal.sync="skuModal" :specTemplateId="item.specTemplateId" :isCarOrBuy="isCarOrBuy"
-      @toShopCart='getAddCar($event)' @togoBuy="togoBuy($event)"></index-sku-dialog>
+    <index-sku-dialog
+      :skuModal.sync="skuModal"
+      :specTemplateId="item.specTemplateId"
+      :isCarOrBuy="isCarOrBuy"
+      @toShopCart="getAddCar($event)"
+      @togoBuy="togoBuy($event)"
+    ></index-sku-dialog>
   </div>
 </template>
 
 <script>
 import { mapGetters, mapMutations } from "vuex";
 import BuyCourseModal from "@/components/buyCourseModal/index";
-import IndexSkuDialog from './IndexSkuDialog.vue'
+import IndexSkuDialog from "./IndexSkuDialog.vue";
 export default {
   name: "courseItem",
   components: {
-    BuyCourseModal, IndexSkuDialog
+    BuyCourseModal,
+    IndexSkuDialog,
   },
   computed: {
     ...mapGetters(["userInfo"]),
@@ -92,16 +112,20 @@ export default {
         return;
       }
       // 判断有没有规格选择
-			if (this.item.specTemplateId) {
-				this.isCarOrBuy = 2
-        this.getSpecDetail()
-				// this.skuModal = true
-				return
-			}
-      this.toPayment(this.item.goodsId)
+      if (this.item.specTemplateId) {
+        this.isCarOrBuy = 2;
+        this.getSpecDetail();
+        // this.skuModal = true
+        return;
+      }
+      this.toPayment(this.item.goodsId);
     },
-    togoBuy(skuItem) {
-      this.toPayment(skuItem.goodsId)
+    togoBuy(goodList) {
+      console.log();
+      if (goodList.length == 1) {
+        return this.toPayment(goodList[0].goodsId);
+      }
+      this.goPayment(goodList);
     },
     toPayment(goodsId) {
       this.getGoodsDetail(goodsId).then((res) => {
@@ -110,42 +134,41 @@ export default {
             this.$refs.selectClassModal.showModal(res);
           }
           if (res.goodsType === 2 || res.goodsType === 6) {
-            let selectGoodsList = JSON.parse(JSON.stringify([res]));
-            localStorage.setItem(
-              "checkGoodsList",
-              JSON.stringify(selectGoodsList)
-            );
-            this.$router.push({
-              path: "/payment",
-            });
+            this.goPayment(res);
           }
         } else {
-          let selectGoodsList = JSON.parse(JSON.stringify([res]));
-          localStorage.setItem(
-            "checkGoodsList",
-            JSON.stringify(selectGoodsList)
-          );
-          this.$router.push({
-            path: "/payment",
-          });
+          this.goPayment(res);
         }
       });
     },
+    goPayment(data) {
+      if (!Array.isArray(data)) {
+        data = [data];
+      }
+      let selectGoodsList = JSON.parse(JSON.stringify(data));
+      localStorage.setItem("checkGoodsList", JSON.stringify(selectGoodsList));
+      this.$router.push({
+        path: "/payment",
+      });
+    },
     /**
      * 加入购物车
      */
     addCart(item) {
       // 判断有没有规格选择
-			if (this.item.specTemplateId) {
-				this.isCarOrBuy = 1
-        this.getSpecDetail()
-				return
-			}
-      this.getAddCar(this.item.goodsId) 
+      if (this.item.specTemplateId) {
+        this.isCarOrBuy = 1;
+        this.getSpecDetail();
+        return;
+      }
+      this.getAddCar(this.item.goodsId);
     },
-    getAddCar(goodsId) {
+    getAddCar(goodsIds) {
+      if (!Array.isArray(goodsIds)) {
+        goodsIds = [goodsIds];
+      }
       this.$request
-        .addCart({ goodsId: goodsId })
+        .addCart({ goodsIds })
         .then((res) => {
           if (res) {
             this.getCartCount();
@@ -173,23 +196,24 @@ export default {
       });
     },
     getSpecDetail() {
-			this.$axios({
-				url: `/app/common/spec/${this.item.specTemplateId}`,
-				method: 'get',
-				noToken: true
-			}).then((res) => {
+      this.$axios({
+        url: `/app/common/spec/${this.item.specTemplateId}`,
+        method: "get",
+        noToken: true,
+      })
+        .then((res) => {
           if (res.data) {
-            this.skuModal = true
+            this.skuModal = true;
           } else {
             if (this.isCarOrBuy == 1) {
-              this.getAddCar(this.item.goodsId)
+              this.getAddCar(this.item.goodsId);
             } else {
-              this.toPayment(this.item.goodsId)
+              this.toPayment(this.item.goodsId);
             }
-
           }
-			}).catch(() => {})
-		},
+        })
+        .catch(() => {});
+    },
   },
 };
 </script>
@@ -217,6 +241,7 @@ export default {
     left: 8px;
     top: -62px;
     overflow: hidden;
+
     .note {
       position: absolute;
       top: 0px;
@@ -235,6 +260,7 @@ export default {
         background: #ffb001;
       }
     }
+
     img {
       width: 100%;
       height: 100%;
@@ -270,17 +296,32 @@ export default {
     margin-left: 8px;
     display: flex;
     align-items: center;
+
     .price {
       font-size: 18px;
       font-family: Microsoft YaHei;
       font-weight: bold;
       color: #ff2d55;
       line-height: 32px;
+
+      span {
+        font-size: 18px;
+        &::before {
+          content: "¥";
+          font-size: 14px;
+          font-weight: bold;
+        }
+      }
+      i {
+        // font-size: 18px;
+        font-style: normal;
+      }
     }
+
     .linePrice {
       color: #999999;
       font-size: 16px;
-      text-decoration:line-through;
+      text-decoration: line-through;
       margin-left: 10px;
     }
   }
@@ -289,6 +330,7 @@ export default {
     margin: 0 8px;
     display: flex;
     justify-content: space-between;
+
     .add {
       display: block;
       width: 108px;

+ 68 - 103
src/components/header/index.vue

@@ -2,42 +2,22 @@
   <header class="header">
     <div class="container clearfix">
       <div class="logo logo--no" v-if="header.companyLogo">
-        <img
-          style="cursor: pointer; width: 162px; height: 33px"
-          :src="$tools.splitImgHost(header.companyLogo)"
-          alt=""
-          @click="go('/')"
-        />
+        <img style="cursor: pointer; width: 162px; height: 33px" :src="$tools.splitImgHost(header.companyLogo)" alt=""
+          @click="go('/')" />
       </div>
       <h1 class="logo" v-else @click="go('/')"></h1>
       <nav class="nav">
         <ul class="list">
           <li v-for="(item, index) in showNav(header.Nav)" :key="index">
             <a v-if="item.name == '首页'" @click="go('/index')">首页</a>
-            <a
-              v-if="item.name == '走进祥粤'"
-              @click="go('/about')"
-              :style="$route.path === '/about' ? 'color:red;' : ''"
-              >走进祥粤</a
-            >
-            <a
-              v-if="item.name == '课程'"
-              @click="go('/course-list')"
-              :style="$route.path === '/course-list' ? 'color:red;' : ''"
-              >课程</a
-            >
-            <a
-              v-if="item.name == '直播'"
-              @click="go('/live-list')"
-              :style="$route.path === '/live-list' ? 'color:red;' : ''"
-              >直播</a
-            >
-            <a
-              v-if="item.name == '题库'"
-              @click="go('/bank-list')"
-              :style="$route.path === '/bank-list' ? 'color:red;' : ''"
-              >题库</a
-            >
+            <a v-if="item.name == '走进祥粤'" @click="go('/about')"
+              :style="$route.path === '/about' ? 'color:red;' : ''">走进祥粤</a>
+            <a v-if="item.name == '课程'" @click="go('/course-list')"
+              :style="$route.path === '/course-list' ? 'color:red;' : ''">课程</a>
+            <a v-if="item.name == '直播'" @click="go('/live-list')"
+              :style="$route.path === '/live-list' ? 'color:red;' : ''">直播</a>
+            <a v-if="item.name == '题库'" @click="go('/bank-list')"
+              :style="$route.path === '/bank-list' ? 'color:red;' : ''">题库</a>
           </li>
         </ul>
       </nav>
@@ -50,52 +30,32 @@
             {{ msgData.text }} <el-button style="float:right;" type="text">立即学习</el-button>
           </div>
         </a> -->
-        <el-tooltip
-          placement="bottom-end"
-          v-model="msgShow"
-          :hide-after="0"
-          manual
-          popper-class="tooltipStyle"
-        >
-          <el-badge
-            :is-dot="msgCount > 0 ? true : false"
-            class="item"
-            style="vertical-align: baseline"
-          >
-            <el-button
-              style="font-size: 20px; padding: 0px"
-              icon="el-icon-message-solid"
-              type="text"
-              @click="go('/person-center/my-message')"
-            ></el-button>
+        
+        <!-- <el-tooltip placement="bottom-end" v-model="msgShow" :hide-after="0" manual popper-class="tooltipStyle">
+          <el-badge :is-dot="msgCount > 0 ? true : false" class="item" style="vertical-align: baseline">
+            <el-button style="font-size: 20px; padding: 0px" icon="el-icon-message-solid" type="text"
+              @click="go('/person-center/my-message')"></el-button>
           </el-badge>
           <div slot="content" class="dis_plays">
             <p style="max-width: 247px">{{ msgData.text }}</p>
             <div class="toolbth" @click="newGoToStudy">立即学习</div>
-            <i
-              style="font-size: 18px; cursor: pointer"
-              class="el-icon-close"
-              @click="clearMsg"
-            ></i>
+            <i style="font-size: 18px; cursor: pointer" class="el-icon-close" @click="clearMsg"></i>
           </div>
-        </el-tooltip>
+        </el-tooltip> -->
+        <el-badge :is-dot="msgCount > 0 ? true : false" class="item" style="vertical-align: baseline">
+          <el-button style="font-size: 20px; padding: 0px" icon="el-icon-message-solid" type="text"
+            @click="go('/person-center/my-message')"></el-button>
+        </el-badge>
         <el-dropdown @command="handleCommand">
-          <span
-            class="el-dropdown-link"
-            @click="go('/person-center/my-course')"
-            style="margin-left: 10px; cursor: pointer"
-          >
-            <img
-              style="width: 24px; vertical-align: middle"
-              :src="
-                userInfo
-                  ? userInfo.avatar
-                    ? $tools.splitImgHost(userInfo.avatar, true)
-                    : '@/assets/qrcode.png'
-                  : ''
-              "
-              alt=""
-            />
+          <span class="el-dropdown-link" @click="go('/person-center/my-course')"
+            style="margin-left: 10px; cursor: pointer">
+            <img style="width: 24px; vertical-align: middle" :src="
+              userInfo
+                ? userInfo.avatar
+                  ? $tools.splitImgHost(userInfo.avatar, true)
+                  : '@/assets/qrcode.png'
+                : ''
+            " alt="" />
             <span>{{ userInfo && userInfo.realname }}</span>
           </span>
           <el-dropdown-menu slot="dropdown">
@@ -123,22 +83,13 @@
         </div>
         <div class="search__input">
           <input type="text" v-model="searchKey" autocomplete="off" />
-          <input
-            type="password"
-            autocomplete="new-password"
-            style="display: none"
-          />
+          <input type="password" autocomplete="new-password" style="display: none" />
         </div>
-        <el-button type="primary" @click="search" class="search__btn"
-          >搜索</el-button
-        >
+        <el-button type="primary" @click="search" class="search__btn">搜索</el-button>
       </div>
     </div>
 
-    <RebuildModal
-      ref="rebuildModal"
-      @rebuildSubmit="rebuildSubmit($event)"
-    ></RebuildModal>
+    <RebuildModal ref="rebuildModal" @rebuildSubmit="rebuildSubmit($event)"></RebuildModal>
   </header>
 </template>
 
@@ -177,24 +128,24 @@ export default {
   },
   mounted() {
     if (this.$tools.isLogin()) {
-      this.$request.informUserselectLastUnStudyMsg().then((res) => {
-        if (res.data && res.data.id) {
-          let today = new Date(new Date().toLocaleDateString()).getTime();
-          if (localStorage.getItem("msg")) {
-            let ary = JSON.parse(localStorage.getItem("msg"));
-            if (ary.updateTime === today) {
-              this.msgShow = false;
-              return;
-            }
-          }
-          this.$nextTick(() => {
-            this.msgData = res.data;
-            this.msgShow = true;
-          });
-        } else {
-          this.msgShow = false;
-        }
-      });
+      // this.$request.informUserselectLastUnStudyMsg().then((res) => {
+      //   if (res.data && res.data.id) {
+      //     let today = new Date(new Date().toLocaleDateString()).getTime();
+      //     if (localStorage.getItem("msg")) {
+      //       let ary = JSON.parse(localStorage.getItem("msg"));
+      //       if (ary.updateTime === today) {
+      //         this.msgShow = false;
+      //         return;
+      //       }
+      //     }
+      //     this.$nextTick(() => {
+      //       this.msgData = res.data;
+      //       this.msgShow = true;
+      //     });
+      //   } else {
+      //     this.msgShow = false;
+      //   }
+      // });
       this.getMsgCount();
     }
   },
@@ -300,7 +251,7 @@ export default {
                   .then((_) => {
                     window.open("http://admin.zhujianpeixun.com/", "_blank");
                   })
-                  .catch((_) => {});
+                  .catch((_) => { });
 
                 return;
               } else {
@@ -624,15 +575,18 @@ export default {
     .nav {
       float: left;
       margin-top: 30px;
+
       .list {
         margin-left: 146px;
         display: flex;
 
         li {
           margin: 0 20px;
+
           a {
             color: #333;
           }
+
           a:hover {
             color: #3f8dfd;
           }
@@ -688,6 +642,7 @@ export default {
       margin-top: 30px;
       float: right;
       white-space: nowrap;
+
       a {
         display: inline-block;
         margin-left: 20px;
@@ -701,6 +656,7 @@ export default {
             font-size: 20px;
             color: #3f8dfd;
           }
+
           .pi {
             display: inline-block;
             width: 10px;
@@ -712,6 +668,7 @@ export default {
             top: 0;
             right: 0;
           }
+
           .popover_style {
             position: absolute;
             top: 150%;
@@ -728,6 +685,7 @@ export default {
         &.name {
           position: relative;
           z-index: 99;
+
           img {
             width: 24px;
             vertical-align: middle;
@@ -741,6 +699,7 @@ export default {
             position: absolute;
             top: 55px;
             left: -40px;
+
             li {
               margin-left: 10px;
               border-bottom: 1px solid #eeeeee;
@@ -788,19 +747,23 @@ export default {
   opacity: 0;
   height: 0;
 }
+
 .fade-enter-to,
 .fade-leave {
   opacity: 1;
   height: 122px;
 }
+
 .fade-enter-active,
 .fade-leave-active {
   transition: all 0.3s;
 }
+
 .dis_plays {
   display: flex;
   align-items: center;
 }
+
 .toolbth {
   border-radius: 55px;
   background-color: #fff;
@@ -817,10 +780,12 @@ export default {
   background-color: #3f8dfd !important;
   color: #fff;
 }
+
 .tooltipStyle .popper__arrow {
-  border-bottom-color: #3f8dfd!important;
+  border-bottom-color: #3f8dfd !important;
 }
+
 .tooltipStyle .popper__arrow::after {
-  border-bottom-color: #3f8dfd!important;
+  border-bottom-color: #3f8dfd !important;
 }
 </style>

+ 6 - 6
src/pages/bank-exam-all-explain/index.vue

@@ -83,7 +83,7 @@
                         </div>
                         <div class="answer-list">
                           <div class="answer-list__left">
-                            正确答案:{{ ast[question.ans - 1] }}
+                            题目答案:{{ ast[question.ans - 1] }}
                           </div>
                           <div class="answer-list__left">
                             我的答案:{{ ast[question.ques - 1] }}
@@ -166,7 +166,7 @@
                         </div>
                         <div class="answer-list">
                           <div class="answer-list__left">
-                            正确答案:
+                            题目答案:
                             <template v-for="ansItem in question.ans">{{
                               ast[ansItem - 1]
                             }}</template>
@@ -248,7 +248,7 @@
                         </div>
                         <div class="answer-list">
                           <div class="answer-list__left">
-                            正确答案:{{ ast[question.ans] }}
+                            题目答案:{{ ast[question.ans] }}
                           </div>
                           <div class="answer-list__left">
                             我的答案:{{ ast[question.ques] }}
@@ -359,7 +359,7 @@
                                 </div>
                                 <div class="answer-list">
                                   <div class="answer-list__left">
-                                    正确答案:{{
+                                    题目答案:{{
                                       ast[question.ans[jsonIndex] - 1]
                                     }}
                                   </div>
@@ -464,7 +464,7 @@
                                 </div>
                                 <div class="answer-list">
                                   <div class="answer-list__left">
-                                    正确答案:
+                                    题目答案:
                                     <template
                                       v-for="ansItem in question.ans[jsonIndex]"
                                       >{{ ast[ansItem - 1] }}</template
@@ -562,7 +562,7 @@
                                 </div>
                                 <div class="answer-list">
                                   <div class="answer-list__left">
-                                    正确答案:{{ ast[question.ans[jsonIndex]] }}
+                                    题目答案:{{ ast[question.ans[jsonIndex]] }}
                                   </div>
                                   <div class="answer-list__left">
                                     我的答案:{{

+ 6 - 6
src/pages/bank-exam-continue/index.vue

@@ -90,7 +90,7 @@
                         </div>
                         <div class="answer-list" v-if="question.ques">
                           <div class="answer-list__left">
-                            正确答案:{{ ast[question.ans - 1] }}
+                            题目答案:{{ ast[question.ans - 1] }}
                           </div>
                           <div class="answer-list__left">
                             我的答案:{{ ast[question.ques - 1] }}
@@ -169,7 +169,7 @@
                         </div>
                         <div class="answer-list" v-if="question.ques">
                           <div class="answer-list__left">
-                            正确答案:
+                            题目答案:
                             <template v-for="ansItem in question.ans">{{
                               ast[ansItem - 1]
                             }}</template>
@@ -264,7 +264,7 @@
                         </div>
                         <div class="answer-list" v-if="question.ques">
                           <div class="answer-list__left">
-                            正确答案:{{ ast[question.ans == 1 ? 0 : 1] }}
+                            题目答案:{{ ast[question.ans == 1 ? 0 : 1] }}
                           </div>
                           <div class="answer-list__left">
                             我的答案:{{ ast[question.ques == 1 ? 0 : 1] }}
@@ -382,7 +382,7 @@
                                   v-if="question.ques[jsonIndex]"
                                 >
                                   <div class="answer-list__left">
-                                    正确答案:{{
+                                    题目答案:{{
                                       ast[question.ans[jsonIndex] - 1]
                                     }}
                                   </div>
@@ -492,7 +492,7 @@
                                   v-if="question.ques[jsonIndex]"
                                 >
                                   <div class="answer-list__left">
-                                    正确答案:
+                                    题目答案:
                                     <template
                                       v-for="ansItem in question.ans[jsonIndex]"
                                       >{{ ast[ansItem - 1] }}</template
@@ -622,7 +622,7 @@
                                   v-if="question.ques[jsonIndex]"
                                 >
                                   <div class="answer-list__left">
-                                    正确答案:{{
+                                    题目答案:{{
                                       ast[question.ans[jsonIndex] == 1 ? 0 : 1]
                                     }}
                                   </div>

+ 6 - 6
src/pages/bank-exam-explain/index.vue

@@ -84,7 +84,7 @@
                         </div>
                         <div class="answer-list">
                           <div class="answer-list__left">
-                            正确答案:{{ ast[question.ans - 1] }}
+                            题目答案:{{ ast[question.ans - 1] }}
                           </div>
                           <!-- <div class="answer-list__left">
                             我的答案:{{ ast[question.ques - 1] }}
@@ -165,7 +165,7 @@
                         </div>
                         <div class="answer-list">
                           <div class="answer-list__left">
-                            正确答案:
+                            题目答案:
                             <template v-for="ansItem in question.ans">{{
                               ast[ansItem - 1]
                             }}</template>
@@ -245,7 +245,7 @@
                         </div>
                         <div class="answer-list">
                           <div class="answer-list__left">
-                            正确答案:{{ ast[question.ans] }}
+                            题目答案:{{ ast[question.ans] }}
                           </div>
                           <!-- <div class="answer-list__left">
                             我的答案:{{ ast[question.ques] }}
@@ -354,7 +354,7 @@
                                 </div>
                                 <div class="answer-list">
                                   <div class="answer-list__left">
-                                    正确答案:{{
+                                    题目答案:{{
                                       ast[question.ans[jsonIndex] - 1]
                                     }}
                                   </div>
@@ -459,7 +459,7 @@
                                 </div>
                                 <div class="answer-list">
                                   <div class="answer-list__left">
-                                    正确答案:
+                                    题目答案:
                                     <template
                                       v-for="ansItem in question.ans[jsonIndex]"
                                       >{{ ast[ansItem - 1] }}</template
@@ -557,7 +557,7 @@
                                 </div>
                                 <div class="answer-list">
                                   <div class="answer-list__left">
-                                    正确答案:{{ ast[question.ans[jsonIndex]] }}
+                                    题目答案:{{ ast[question.ans[jsonIndex]] }}
                                   </div>
                                   <!-- <div class="answer-list__left">
                                     我的答案:{{

+ 6 - 6
src/pages/bank-exam-wrong-explain/index.vue

@@ -84,7 +84,7 @@
                         </div>
                         <div class="answer-list">
                           <div class="answer-list__left">
-                            正确答案:{{ ast[question.ans - 1] }}
+                            题目答案:{{ ast[question.ans - 1] }}
                           </div>
                           <div class="answer-list__left">
                             我的答案:{{ ast[question.ques - 1] }}
@@ -167,7 +167,7 @@
                         </div>
                         <div class="answer-list">
                           <div class="answer-list__left">
-                            正确答案:
+                            题目答案:
                             <template v-for="ansItem in question.ans">{{
                               ast[ansItem - 1]
                             }}</template>
@@ -249,7 +249,7 @@
                         </div>
                         <div class="answer-list">
                           <div class="answer-list__left">
-                            正确答案:{{ ast[question.ans] }}
+                            题目答案:{{ ast[question.ans] }}
                           </div>
                           <div class="answer-list__left">
                             我的答案:{{ ast[question.ques] }}
@@ -360,7 +360,7 @@
                                 </div>
                                 <div class="answer-list">
                                   <div class="answer-list__left">
-                                    正确答案:{{
+                                    题目答案:{{
                                       ast[question.ans[jsonIndex] - 1]
                                     }}
                                   </div>
@@ -465,7 +465,7 @@
                                 </div>
                                 <div class="answer-list">
                                   <div class="answer-list__left">
-                                    正确答案:
+                                    题目答案:
                                     <template
                                       v-for="ansItem in question.ans[jsonIndex]"
                                       >{{ ast[ansItem - 1] }}</template
@@ -563,7 +563,7 @@
                                 </div>
                                 <div class="answer-list">
                                   <div class="answer-list__left">
-                                    正确答案:{{ ast[question.ans[jsonIndex]] }}
+                                    题目答案:{{ ast[question.ans[jsonIndex]] }}
                                   </div>
                                   <div class="answer-list__left">
                                     我的答案:{{

+ 7 - 10
src/pages/bank-exam/index.vue

@@ -106,7 +106,7 @@
                           v-if="bankType == 1 && question.ques"
                         >
                           <div class="answer-list__left">
-                            正确答案:{{ ast[question.ans - 1] }}
+                            题目答案:{{ ast[question.ans - 1] }}
                           </div>
                           <div class="answer-list__left">
                             我的答案:{{ ast[question.ques - 1] }}
@@ -195,7 +195,7 @@
                           v-if="bankType == 1 && question.ques"
                         >
                           <div class="answer-list__left">
-                            正确答案:
+                            题目答案:
                             <template v-for="ansItem in question.ans">{{
                               ast[ansItem - 1]
                             }}</template>
@@ -306,7 +306,7 @@
                           v-if="bankType == 1 && question.ques"
                         >
                           <div class="answer-list__left">
-                            正确答案:{{ ast[question.ans == 1 ? 0 : 1] }}
+                            题目答案:{{ ast[question.ans == 1 ? 0 : 1] }}
                           </div>
                           <div class="answer-list__left">
                             我的答案:{{ ast[question.ques == 1 ? 0 : 1] }}
@@ -443,7 +443,7 @@
                                   "
                                 >
                                   <div class="answer-list__left">
-                                    正确答案:{{
+                                    题目答案:{{
                                       ast[question.ans[jsonIndex] - 1]
                                     }}
                                   </div>
@@ -565,7 +565,7 @@
                                   "
                                 >
                                   <div class="answer-list__left">
-                                    正确答案:
+                                    题目答案:
                                     <template
                                       v-for="ansItem in question.ans[jsonIndex]"
                                       >{{ ast[ansItem - 1] }}</template
@@ -727,7 +727,7 @@
                                   "
                                 >
                                   <div class="answer-list__left">
-                                    正确答案:{{ ast[question.ans[jsonIndex]] }}
+                                    题目答案:{{ ast[question.ans[jsonIndex]] }}
                                   </div>
                                   <div class="answer-list__left">
                                     我的答案:{{
@@ -1261,10 +1261,7 @@ export default {
               }
             )
               .then(() => {
-                // confirmButton回调
-                console.log(12);
-                this.leaveNow();
-                next();
+                this.examSubmit();
               })
               .catch(() => {});
           });

+ 24 - 52
src/pages/bank-list/index.vue

@@ -5,9 +5,7 @@
       <div class="section__header">
         <div class="container">
           <el-breadcrumb separator="/">
-            <el-breadcrumb-item :to="{ path: '/index' }"
-              >首页</el-breadcrumb-item
-            >
+            <el-breadcrumb-item :to="{ path: '/index' }">首页</el-breadcrumb-item>
             <el-breadcrumb-item>题库</el-breadcrumb-item>
           </el-breadcrumb>
         </div>
@@ -26,13 +24,8 @@
                   >
                     全部
                   </div> -->
-                  <div
-                    class="item"
-                    v-for="(item, index) in typeList"
-                    :key="index"
-                    :class="{ active: params.educationTypeId == item.id }"
-                    @click="changeType(item)"
-                  >
+                  <div class="item" v-for="(item, index) in typeList" :key="index"
+                    :class="{ active: params.educationTypeId == item.id }" @click="changeType(item)">
                     {{ item.educationName }}
                   </div>
                 </div>
@@ -43,13 +36,8 @@
               <div class="right-item">
                 <div class="list">
                   <!-- <div class="item active">全部</div> -->
-                  <div
-                    class="item"
-                    v-for="(item, index) in businessList"
-                    :key="index"
-                    :class="{ active: params.businessId == item.id }"
-                    @click="changeBusiness(item)"
-                  >
+                  <div class="item" v-for="(item, index) in businessList" :key="index"
+                    :class="{ active: params.businessId == item.id }" @click="changeBusiness(item)">
                     {{ item.aliasName }}
                   </div>
                 </div>
@@ -59,13 +47,8 @@
               <div class="left-item">科目分类:</div>
               <div class="right-item">
                 <div class="list">
-                  <div
-                    class="item"
-                    v-for="(item, index) in subjectList"
-                    :key="index"
-                    :class="{ active: params.subjectId == item.id }"
-                    @click="changeSubject(item)"
-                  >
+                  <div class="item" v-for="(item, index) in subjectList" :key="index"
+                    :class="{ active: params.subjectId == item.id }" @click="changeSubject(item)">
                     {{ item.subjectName }}
                   </div>
                 </div>
@@ -80,36 +63,23 @@
           <div class="course-list">
             <div class="course-list__header">
               <div class="sort-list">
-                <div
-                  class="sort-list__item"
-                  @click="changeSort(1)"
-                  :class="{ active: params.sortType == 1 ? true : false }"
-                >
+                <div class="sort-list__item" @click="changeSort(1)"
+                  :class="{ active: params.sortType == 1 ? true : false }">
                   综合排序
                 </div>
-                <div
-                  class="sort-list__item"
-                  @click="changeSort(2)"
-                  :class="{ active: params.sortType == 2 ? true : false }"
-                >
+                <div class="sort-list__item" @click="changeSort(2)"
+                  :class="{ active: params.sortType == 2 ? true : false }">
                   低价优先
                 </div>
-                <div
-                  class="sort-list__item"
-                  @click="changeSort(3)"
-                  :class="{ active: params.sortType == 3 ? true : false }"
-                >
+                <div class="sort-list__item" @click="changeSort(3)"
+                  :class="{ active: params.sortType == 3 ? true : false }">
                   高价优先
                 </div>
               </div>
             </div>
             <div class="course-list__body">
               <ul class="list clearfix">
-                <li
-                  class="course-item"
-                  v-for="(item, index) in goodsList"
-                  :key="index"
-                >
+                <li class="course-item" v-for="(item, index) in goodsList" :key="index">
                   <GoodsItem :item="item"></GoodsItem>
                 </li>
               </ul>
@@ -117,14 +87,8 @@
           </div>
 
           <div class="pagination">
-            <el-pagination
-              @current-change="currentChange"
-              background
-              layout="prev, pager, next"
-              :total="total"
-              :pager-count="5"
-              :page-size="params.pageSize"
-            >
+            <el-pagination @current-change="currentChange" background layout="prev, pager, next" :total="total"
+              :pager-count="5" :page-size="params.pageSize">
             </el-pagination>
           </div>
         </div>
@@ -168,6 +132,7 @@ export default {
         goodsType: 2,
         sortType: 1,
         searchKey: "",
+        showStatus: 1
       },
       goodsList: [],
     };
@@ -327,6 +292,7 @@ export default {
 
     &__body {
       background: #ebf2fc;
+
       .course-classify {
         overflow: hidden;
 
@@ -334,6 +300,7 @@ export default {
           display: flex;
           margin: 6px 0;
           align-items: flex-start;
+
           .left-item {
             margin-top: 10px;
             padding: 8px 0;
@@ -346,9 +313,11 @@ export default {
 
           .right-item {
             flex: 1;
+
             .list {
               display: flex;
               flex-wrap: wrap;
+
               .item {
                 cursor: pointer;
                 border-radius: 8px;
@@ -374,9 +343,11 @@ export default {
       .course-list {
         &__header {
           margin-top: 32px;
+
           .sort-list {
             display: flex;
             align-items: center;
+
             &__item {
               cursor: pointer;
               width: 96px;
@@ -412,6 +383,7 @@ export default {
 
         &__footer {
           overflow: hidden;
+
           .btn {
             cursor: pointer;
             width: 146px;

文件差異過大導致無法顯示
+ 30 - 1309
src/pages/course-detail/index.vue


文件差異過大導致無法顯示
+ 286 - 568
src/pages/course-exam/index.vue


+ 1 - 0
src/pages/course-list/index.vue

@@ -168,6 +168,7 @@ export default {
         goodsType: 1,
         sortType: 1,
         searchKey: "",
+        showStatus: 1
       },
       goodsList: [],
     };

+ 48 - 20
src/pages/goods-detail/bank-detail.vue

@@ -27,11 +27,27 @@
                   <div class="title">
                     {{ goodsDetail.goodsName }}
                   </div>
-                  <div class="price" v-if="goodsDetail.standPrice === 0">
-                    免费
+                  <div
+                    class="price"
+                    v-if="
+                      !goodsDetail.specTemplateId ||
+                      (!goodsDetail.maxPrice && !goodsDetail.minPrice)
+                    "
+                  >
+                    {{
+                      goodsDetail.standPrice === 0
+                        ? "免费"
+                        : `¥${goodsDetail.standPrice}`
+                    }}
                   </div>
-                  <div class="price" v-else>
-                    ¥{{ goodsDetail.standPrice | toFixed }}
+                  <div v-else class="price">
+                    <span>{{ goodsDetail.minPrice }}</span>
+                    <template
+                      v-if="goodsDetail.minPrice != goodsDetail.maxPrice"
+                    >
+                      <i>-</i>
+                      <span>{{ goodsDetail.maxPrice }}</span>
+                    </template>
                   </div>
                   <div class="btns">
                     <el-button
@@ -162,7 +178,7 @@
                                         v-for="(
                                           section, sectionIndex
                                         ) in item.list"
-                                        :key="sectionIndedialogx"
+                                        :key="sectionIndex"
                                       >
                                         <div class="bank-section__item__text">
                                           {{ section.examName }}
@@ -370,7 +386,7 @@
                   </div>
                   <div class="answer-list" v-if="question.ques">
                     <div class="answer-list__left">
-                      正确答案:{{ ast[question.ans - 1] }}
+                      题目答案:{{ ast[question.ans - 1] }}
                     </div>
                     <div class="answer-list__left">
                       我的答案:{{ ast[question.ques - 1] }}
@@ -431,7 +447,7 @@
                   </div>
                   <div class="answer-list" v-if="question.ques">
                     <div class="answer-list__left">
-                      正确答案:
+                      题目答案:
                       <template v-for="ansItem in question.ans">{{
                         ast[ansItem - 1]
                       }}</template>
@@ -503,7 +519,7 @@
                   </div>
                   <div class="answer-list" v-if="question.ques">
                     <div class="answer-list__left">
-                      正确答案:{{ ast[question.ans == 1 ? 0 : 1] }}
+                      题目答案:{{ ast[question.ans == 1 ? 0 : 1] }}
                     </div>
                     <div class="answer-list__left">
                       我的答案:{{ ast[question.ques == 1 ? 0 : 1] }}
@@ -592,7 +608,7 @@
                             v-if="question.ques[jsonIndex]"
                           >
                             <div class="answer-list__left">
-                              正确答案:{{ ast[question.ans[jsonIndex] - 1] }}
+                              题目答案:{{ ast[question.ans[jsonIndex] - 1] }}
                             </div>
                             <div class="answer-list__left">
                               我的答案:{{ ast[question.ques[jsonIndex] - 1] }}
@@ -671,7 +687,7 @@
                             v-if="question.ques[jsonIndex]"
                           >
                             <div class="answer-list__left">
-                              正确答案:
+                              题目答案:
                               <template
                                 v-for="ansItem in question.ans[jsonIndex]"
                                 >{{ ast[ansItem - 1] }}</template
@@ -765,7 +781,7 @@
                             v-if="question.ques[jsonIndex]"
                           >
                             <div class="answer-list__left">
-                              正确答案:{{
+                              题目答案:{{
                                 ast[question.ans[jsonIndex] == 1 ? 0 : 1]
                               }}
                             </div>
@@ -1037,7 +1053,6 @@
       :specTemplateId="goodsDetail.specTemplateId"
       :isCarOrBuy="isCarOrBuy"
       @toShopCart="getAddCar($event)"
-      @togoBuy="togoBuy($event)"
     ></index-sku-dialog>
   </div>
 </template>
@@ -1788,17 +1803,16 @@ export default {
 
       this.toPayment(this.goodsDetail);
     },
-    toPayment(goodsDetail) {
-      // let selectGoodsList = JSON.parse(JSON.stringify([this.goodsDetail]));
-      let selectGoodsList = JSON.parse(JSON.stringify([goodsDetail]));
+    toPayment(data) {
+      if (!Array.isArray(data)) {
+        data = [data];
+      }
+      let selectGoodsList = JSON.parse(JSON.stringify(data));
       localStorage.setItem("checkGoodsList", JSON.stringify(selectGoodsList));
       this.$router.push({
         path: "/payment",
       });
     },
-    togoBuy(skuItem) {
-      this.toPayment(skuItem);
-    },
     addCart() {
       if (!this.$tools.isLogin()) {
         this.setCurrentRouter(this.$route);
@@ -1817,9 +1831,12 @@ export default {
 
       this.getAddCar(this.goodsId);
     },
-    getAddCar(goodsId) {
+    getAddCar(goodsIds) {
+      if (!Array.isArray(goodsIds)) {
+        goodsIds = [goodsIds];
+      }
       this.$request
-        .addCart({ goodsId: goodsId })
+        .addCart({ goodsIds })
         .then((res) => {
           this.getCartCount();
           this.$message({
@@ -1992,6 +2009,17 @@ export default {
               font-weight: bold;
               color: #ff2d55;
               line-height: 24px;
+              span {
+                font-size: 32px;
+                &::before {
+                  content: "¥";
+                  font-size: 24px;
+                  font-weight: bold;
+                }
+              }
+              i {
+                font-size: 32px;
+              }
             }
 
             .btns {

+ 64 - 177
src/pages/goods-detail/course-detail.vue

@@ -31,11 +31,27 @@
                     {{ courseList.length }} 课程
                     {{ goodsDetail.classHours || "-" }}学时
                   </div>
-                  <div class="price" v-if="goodsDetail.standPrice === 0">
-                    免费
+                  <div
+                    class="price"
+                    v-if="
+                      !goodsDetail.specTemplateId ||
+                      (!goodsDetail.maxPrice && !goodsDetail.minPrice)
+                    "
+                  >
+                    {{
+                      goodsDetail.standPrice === 0
+                        ? "免费"
+                        : `¥${goodsDetail.standPrice}`
+                    }}
                   </div>
-                  <div class="price" v-else>
-                    ¥{{ goodsDetail.standPrice | toFixed }}
+                  <div v-else class="price">
+                    <span>{{ goodsDetail.minPrice }}</span>
+                    <template
+                      v-if="goodsDetail.minPrice != goodsDetail.maxPrice"
+                    >
+                      <i>-</i>
+                      <span>{{ goodsDetail.maxPrice }}</span>
+                    </template>
                   </div>
                   <div class="btns">
                     <el-button
@@ -524,7 +540,6 @@
       :specTemplateId="goodsDetail.specTemplateId"
       :isCarOrBuy="isCarOrBuy"
       @toShopCart="getAddCar($event)"
-      @togoBuy="togoBuy($event)"
     ></index-sku-dialog>
   </div>
 </template>
@@ -632,7 +647,7 @@ export default {
     if (this.player) {
       this.player.destroy();
     }
-    document.removeEventListener('visibilitychange', this.pauseVideo)
+    document.removeEventListener("visibilitychange", this.pauseVideo);
   },
   watch: {
     "$route.params.goodsId": {
@@ -646,7 +661,7 @@ export default {
   },
   mounted() {
     this.getInit();
-    document.addEventListener('visibilitychange', this.pauseVideo)
+    document.addEventListener("visibilitychange", this.pauseVideo);
   },
   computed: {
     compyRecommend: function () {
@@ -668,7 +683,7 @@ export default {
   methods: {
     ...mapMutations(["setCurrentRouter", "getCartCount"]),
     pauseVideo() {
-      if (document.visibilityState === 'hidden') {
+      if (document.visibilityState === "hidden") {
         this.player && this.player.j2s_pauseVideo();
       }
     },
@@ -1456,10 +1471,6 @@ export default {
         return;
       }
     },
-    togoBuy(skuItem) {
-      this.toPayment(skuItem);
-      this.goodsId = skuItem.goodsId;
-    },
     toPayment(goodsDetail) {
       if (this.goodsDetail.templateType) {
         this.selectClassModal = true;
@@ -1587,9 +1598,12 @@ export default {
 
       this.getAddCar(this.goodsId);
     },
-    getAddCar(goodsId) {
+    getAddCar(goodsIds) {
+      if (!Array.isArray(goodsIds)) {
+        goodsIds = [goodsIds];
+      }
       this.$request
-        .addCart({ goodsId: goodsId })
+        .addCart({ goodsIds })
         .then((res) => {
           this.getCartCount();
           this.$message({
@@ -1866,6 +1880,7 @@ export default {
           .text {
             flex: 1;
             margin-left: 24px;
+
             .title {
               font-size: 18px;
               font-family: Microsoft YaHei;
@@ -1892,6 +1907,18 @@ export default {
               font-weight: bold;
               color: #ff2d55;
               line-height: 24px;
+
+              span {
+                font-size: 32px;
+                &::before {
+                  content: "¥";
+                  font-size: 24px;
+                  font-weight: bold;
+                }
+              }
+              i{
+                font-size: 32px;
+              }
             }
 
             .btns {
@@ -1958,6 +1985,7 @@ export default {
 
           .goods-menu {
             margin-top: 15px;
+
             .left-box {
               width: 948px;
               float: left;
@@ -1968,10 +1996,12 @@ export default {
                   padding: 16px;
                   background: #f5f7fa;
                   border-radius: 10px;
+
                   .doubles {
                     display: flex;
                     align-items: center;
                   }
+
                   &__title {
                     font-size: 18px;
                     color: #333;
@@ -1983,6 +2013,7 @@ export default {
                     overflow: hidden;
                     background: #fff;
                     margin-top: 12px;
+
                     &__title {
                       padding: 10px 0;
                       cursor: pointer;
@@ -2059,6 +2090,7 @@ export default {
             .right-box {
               width: 255px;
               float: right;
+
               .title {
                 margin-left: 10px;
                 font-size: 16px;
@@ -2078,90 +2110,6 @@ export default {
                   top: 0;
                 }
               }
-
-              .list {
-                .course-item {
-                  // margin: 110px 9px 0;
-                  // width: 300px;
-                  // height: 178px;
-                  // background: #ffffff;
-                  // box-shadow: 0px 10px 13px 3px rgba(63, 141, 253, 0.1);
-                  // border-radius: 10px;
-                  // position: relative;
-                  // background: #fff;
-                  // padding-top: 100px;
-
-                  // &__img {
-                  //   width: 280px;
-                  //   height: 178px;
-                  //   background: #ffffff;
-                  //   box-shadow: 0px 0px 9px 1px rgba(0, 0, 0, 0.08);
-                  //   border-radius: 10px;
-                  //   position: absolute;
-                  //   left: 10px;
-                  //   top: -78px;
-                  //   background: rgba(122, 136, 246, 1);
-                  //   overflow: hidden;
-                  //   background: no-repeat center center;
-                  //   background-size: 280px 178px;
-                  //   .note {
-                  //     width: 80px;
-                  //     height: 24px;
-                  //     background: #d94404;
-                  //     box-shadow: 0px 1px 1px 0px rgba(248, 78, 5, 0.4);
-                  //     border-radius: 10px 0px 20px 0px;
-                  //     text-align: center;
-                  //     line-height: 24px;
-                  //     color: #fff;
-                  //   }
-                  // }
-
-                  // &__title {
-                  //   margin: 0 8px;
-                  //   font-size: 14px;
-                  //   font-family: Microsoft YaHei;
-                  //   font-weight: 400;
-                  //   color: #333333;
-                  //   line-height: 24px;
-                  // }
-
-                  // &__desc {
-                  //   height: 32px;
-                  //   position: absolute;
-                  //   left: 0;
-                  //   right: 0;
-                  //   bottom: 0;
-                  //   margin-left: 8px;
-                  //   display: flex;
-                  //   justify-content: space-between;
-
-                  //   .price {
-                  //     font-size: 18px;
-                  //     font-family: Microsoft YaHei;
-                  //     font-weight: bold;
-                  //     color: #ff2d55;
-                  //     line-height: 32px;
-                  //   }
-
-                  //   .add {
-                  //     display: block;
-                  //     width: 118px;
-                  //     height: 32px;
-                  //     line-height: 30px;
-                  //     background: #f2f4f7;
-                  //     border-radius: 10px 0px 10px 0px;
-                  //     font-size: 16px;
-                  //     color: #3f8dfd;
-                  //     text-align: center;
-
-                  //     &:hover {
-                  //       background: #3f8dfd;
-                  //       color: #f2f4f7;
-                  //     }
-                  //   }
-                  // }
-                }
-              }
             }
           }
         }
@@ -2191,91 +2139,13 @@ export default {
 
             .recommend-item {
               float: left;
-              // margin: 100px 9px 0;
-              // width: 300px;
-              // height: 178px;
-              // background: #ffffff;
-              // box-shadow: 0px 10px 13px 3px rgba(63, 141, 253, 0.1);
-              // border-radius: 10px;
-              // position: relative;
-              // background: #fff;
-              // padding-top: 100px;
-
-              // &__img {
-              //   width: 280px;
-              //   height: 178px;
-              //   background: #ffffff;
-              //   box-shadow: 0px 0px 9px 1px rgba(0, 0, 0, 0.08);
-              //   border-radius: 10px;
-              //   position: absolute;
-              //   left: 10px;
-              //   top: -78px;
-              //   background: rgba(122, 136, 246, 1);
-              //   overflow: hidden;
-              //   background: no-repeat center center;
-              //   background-size: 280px 178px;
-              //   .note {
-              //     width: 80px;
-              //     height: 24px;
-              //     background: #d94404;
-              //     box-shadow: 0px 1px 1px 0px rgba(248, 78, 5, 0.4);
-              //     border-radius: 10px 0px 20px 0px;
-              //     text-align: center;
-              //     line-height: 24px;
-              //     color: #fff;
-              //   }
-              // }
-
-              // &__title {
-              //   margin: 0 8px;
-              //   font-size: 14px;
-              //   font-family: Microsoft YaHei;
-              //   font-weight: 400;
-              //   color: #333333;
-              //   line-height: 24px;
-              // }
-
-              // &__desc {
-              //   height: 32px;
-              //   position: absolute;
-              //   left: 0;
-              //   right: 0;
-              //   bottom: 0;
-              //   margin-left: 8px;
-              //   display: flex;
-              //   justify-content: space-between;
-
-              //   .price {
-              //     font-size: 18px;
-              //     font-family: Microsoft YaHei;
-              //     font-weight: bold;
-              //     color: #ff2d55;
-              //     line-height: 32px;
-              //   }
-
-              //   .add {
-              //     display: block;
-              //     width: 118px;
-              //     height: 32px;
-              //     line-height: 30px;
-              //     background: #f2f4f7;
-              //     border-radius: 10px 0px 10px 0px;
-              //     font-size: 16px;
-              //     color: #3f8dfd;
-              //     text-align: center;
-
-              //     &:hover {
-              //       background: #3f8dfd;
-              //       color: #f2f4f7;
-              //     }
-              //   }
-              // }
             }
           }
         }
 
         &__footer {
           overflow: hidden;
+
           .btn {
             cursor: pointer;
             width: 146px;
@@ -2302,6 +2172,7 @@ export default {
     /deep/ .el-dialog__header {
       display: none;
     }
+
     /deep/ .el-dialog__body {
       padding: 0;
       overflow: unset;
@@ -2346,6 +2217,7 @@ export default {
           .text {
             margin-left: 15px;
             font-size: 16px;
+
             span {
               font-family: Microsoft YaHei;
               font-weight: bold;
@@ -2391,12 +2263,14 @@ export default {
               &::-webkit-scrollbar {
                 width: 6px;
               }
+
               &::-webkit-scrollbar-track {
                 background-color: #fff;
                 -webkit-border-radius: 2em;
                 -moz-border-radius: 2em;
                 border-radius: 2em;
               }
+
               &::-webkit-scrollbar-thumb {
                 background-color: #eeeeee;
                 -webkit-border-radius: 2em;
@@ -2417,6 +2291,7 @@ export default {
 
               .question-list {
                 padding: 24px 0 0 24px;
+
                 .checkbox,
                 .radio {
                   cursor: pointer;
@@ -2435,10 +2310,12 @@ export default {
                   &.right {
                     background: #37c65b;
                   }
+
                   &.wrong {
                     background: #ff3a30;
                   }
                 }
+
                 &.textarea {
                   margin-right: 12px;
 
@@ -2463,6 +2340,7 @@ export default {
                         max-height: 100%;
                       }
                     }
+
                     &__btn {
                       margin-right: 10px;
                       width: 80px;
@@ -2583,6 +2461,7 @@ export default {
             &__btns {
               position: relative;
               height: 32px;
+
               .submit {
                 cursor: pointer;
                 margin: 0 auto;
@@ -2696,18 +2575,21 @@ export default {
               &::-webkit-scrollbar {
                 width: 6px;
               }
+
               &::-webkit-scrollbar-track {
                 background-color: #fff;
                 -webkit-border-radius: 2em;
                 -moz-border-radius: 2em;
                 border-radius: 2em;
               }
+
               &::-webkit-scrollbar-thumb {
                 background-color: #eeeeee;
                 -webkit-border-radius: 2em;
                 -moz-border-radius: 2em;
                 border-radius: 2em;
               }
+
               .list {
                 display: flex;
                 flex-wrap: wrap;
@@ -2785,6 +2667,7 @@ export default {
     /deep/ .el-dialog__header {
       display: none;
     }
+
     /deep/ .el-dialog__body {
       padding: 0;
       overflow: unset;
@@ -2816,6 +2699,7 @@ export default {
       position: relative;
       box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.04);
       border-radius: 8px;
+
       .video {
         &__title {
           padding-left: 24px;
@@ -2829,6 +2713,7 @@ export default {
 
         &__wrap {
           height: 450px;
+
           video {
             width: 100%;
             height: 100%;
@@ -2852,6 +2737,7 @@ export default {
   .teacher_names {
     display: flex;
     margin-left: 20px;
+
     .names {
       font-size: 13px;
       color: #666666;
@@ -2860,6 +2746,7 @@ export default {
       background: #f8f8f8;
       border-radius: 4px;
       padding: 3px 6px;
+
       &.nactive {
         color: #3f8dfd;
         background: #f2f7ff;

+ 41 - 16
src/pages/goods-detail/live-detail.vue

@@ -31,11 +31,27 @@
                     {{ courseList.length }} 课程
                     {{ goodsDetail.classHours || "-" }}学时
                   </div>
-                  <div class="price" v-if="goodsDetail.standPrice === 0">
-                    免费
+                  <div
+                    class="price"
+                    v-if="
+                      !goodsDetail.specTemplateId ||
+                      (!goodsDetail.maxPrice && !goodsDetail.minPrice)
+                    "
+                  >
+                    {{
+                      goodsDetail.standPrice === 0
+                        ? "免费"
+                        : `¥${goodsDetail.standPrice}`
+                    }}
                   </div>
-                  <div class="price" v-else>
-                    ¥{{ goodsDetail.standPrice | toFixed }}
+                  <div v-else class="price">
+                    <span>{{ goodsDetail.minPrice }}</span>
+                    <template
+                      v-if="goodsDetail.minPrice != goodsDetail.maxPrice"
+                    >
+                      <i>-</i>
+                      <span>{{ goodsDetail.maxPrice }}</span>
+                    </template>
                   </div>
                   <div class="btns">
                     <el-button
@@ -543,7 +559,6 @@
       :specTemplateId="goodsDetail.specTemplateId"
       :isCarOrBuy="isCarOrBuy"
       @toShopCart="getAddCar($event)"
-      @togoBuy="togoBuy($event)"
     ></index-sku-dialog>
   </div>
 </template>
@@ -652,7 +667,7 @@ export default {
     if (this.$tools.isLogin()) {
       this.getProvinceList();
     }
-    document.addEventListener('visibilitychange', this.pauseVideo)
+    document.addEventListener("visibilitychange", this.pauseVideo);
   },
   computed: {
     compyRecommend: function () {
@@ -674,7 +689,7 @@ export default {
   methods: {
     ...mapMutations(["setCurrentRouter", "getCartCount"]),
     pauseVideo() {
-      if (document.visibilityState === 'hidden') {
+      if (document.visibilityState === "hidden") {
         this.player && this.player.j2s_pauseVideo();
       }
     },
@@ -1445,10 +1460,6 @@ export default {
         return;
       }
     },
-    togoBuy(skuItem) {
-      this.toPayment(skuItem);
-      this.goodsId = skuItem.goodsId;
-    },
     toPayment(goodsDetail) {
       let selectGoodsList = JSON.parse(JSON.stringify([goodsDetail]));
       selectGoodsList.forEach((item) => {
@@ -1570,9 +1581,12 @@ export default {
       }
       this.getAddCar(this.goodsId);
     },
-    getAddCar(goodsId) {
+    getAddCar(goodsIds) {
+      if (!Array.isArray(goodsIds)) {
+        goodsIds = [goodsIds];
+      }
       this.$request
-        .addCart({ goodsId: goodsId })
+        .addCart({ goodsIds })
         .then((res) => {
           this.getCartCount();
           this.$message({
@@ -1709,9 +1723,9 @@ export default {
         });
     },
   },
-  beforeDestroy(){
-    document.removeEventListener('visibilitychange', this.pauseVideo)
-  }
+  beforeDestroy() {
+    document.removeEventListener("visibilitychange", this.pauseVideo);
+  },
 };
 </script>
 
@@ -1779,6 +1793,17 @@ export default {
               font-weight: bold;
               color: #ff2d55;
               line-height: 24px;
+              span {
+                font-size: 32px;
+                &::before {
+                  content: "¥";
+                  font-size: 24px;
+                  font-weight: bold;
+                }
+              }
+              i{
+                font-size: 32px;
+              }
             }
 
             .btns {

文件差異過大導致無法顯示
+ 202 - 356
src/pages/home/index.vue


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

@@ -3088,12 +3088,6 @@ export default {
           this.$refs.stamp[0].clearFiles();
         });
     },
-
-    // 页面加载成功  当前页数
-    pageLoaded(e) {
-      this.$emit("current", e);
-      this.curPageNum = e;
-    },
     uploadRules(params) {
       return new Promise((resolve, reject) => {
         const file = params.raw;

+ 1 - 0
src/pages/live-list/index.vue

@@ -168,6 +168,7 @@ export default {
         goodsType: 6,
         sortType: 1,
         searchKey: "",
+        showStatus: 1
       },
       goodsList: [],
     };

+ 6 - 6
src/pages/mock-exam-all-explain/index.vue

@@ -83,7 +83,7 @@
                         </div>
                         <div class="answer-list">
                           <div class="answer-list__left">
-                            正确答案:{{ ast[question.ans - 1] }}
+                            题目答案:{{ ast[question.ans - 1] }}
                           </div>
                           <div class="answer-list__left">
                             我的答案:{{ ast[question.ques - 1] }}
@@ -166,7 +166,7 @@
                         </div>
                         <div class="answer-list">
                           <div class="answer-list__left">
-                            正确答案:
+                            题目答案:
                             <template v-for="ansItem in question.ans">{{
                               ast[ansItem - 1]
                             }}</template>
@@ -248,7 +248,7 @@
                         </div>
                         <div class="answer-list">
                           <div class="answer-list__left">
-                            正确答案:{{ ast[question.ans] }}
+                            题目答案:{{ ast[question.ans] }}
                           </div>
                           <div class="answer-list__left">
                             我的答案:{{ ast[question.ques] }}
@@ -359,7 +359,7 @@
                                 </div>
                                 <div class="answer-list">
                                   <div class="answer-list__left">
-                                    正确答案:{{
+                                    题目答案:{{
                                       ast[question.ans[jsonIndex] - 1]
                                     }}
                                   </div>
@@ -464,7 +464,7 @@
                                 </div>
                                 <div class="answer-list">
                                   <div class="answer-list__left">
-                                    正确答案:
+                                    题目答案:
                                     <template
                                       v-for="ansItem in question.ans[jsonIndex]"
                                       >{{ ast[ansItem - 1] }}</template
@@ -562,7 +562,7 @@
                                 </div>
                                 <div class="answer-list">
                                   <div class="answer-list__left">
-                                    正确答案:{{ ast[question.ans[jsonIndex]] }}
+                                    题目答案:{{ ast[question.ans[jsonIndex]] }}
                                   </div>
                                   <div class="answer-list__left">
                                     我的答案:{{

+ 6 - 6
src/pages/mock-exam-wrong-explain/index.vue

@@ -83,7 +83,7 @@
                         </div>
                         <div class="answer-list">
                           <div class="answer-list__left">
-                            正确答案:{{ ast[question.ans - 1] }}
+                            题目答案:{{ ast[question.ans - 1] }}
                           </div>
                           <div class="answer-list__left">
                             我的答案:{{ ast[question.ques - 1] }}
@@ -166,7 +166,7 @@
                         </div>
                         <div class="answer-list">
                           <div class="answer-list__left">
-                            正确答案:
+                            题目答案:
                             <template v-for="ansItem in question.ans">{{
                               ast[ansItem - 1]
                             }}</template>
@@ -248,7 +248,7 @@
                         </div>
                         <div class="answer-list">
                           <div class="answer-list__left">
-                            正确答案:{{ ast[question.ans] }}
+                            题目答案:{{ ast[question.ans] }}
                           </div>
                           <div class="answer-list__left">
                             我的答案:{{ ast[question.ques] }}
@@ -359,7 +359,7 @@
                                 </div>
                                 <div class="answer-list">
                                   <div class="answer-list__left">
-                                    正确答案:{{
+                                    题目答案:{{
                                       ast[question.ans[jsonIndex] - 1]
                                     }}
                                   </div>
@@ -464,7 +464,7 @@
                                 </div>
                                 <div class="answer-list">
                                   <div class="answer-list__left">
-                                    正确答案:
+                                    题目答案:
                                     <template
                                       v-for="ansItem in question.ans[jsonIndex]"
                                       >{{ ast[ansItem - 1] }}</template
@@ -562,7 +562,7 @@
                                 </div>
                                 <div class="answer-list">
                                   <div class="answer-list__left">
-                                    正确答案:{{ ast[question.ans[jsonIndex]] }}
+                                    题目答案:{{ ast[question.ans[jsonIndex]] }}
                                   </div>
                                   <div class="answer-list__left">
                                     我的答案:{{

+ 25 - 22
src/pages/mock-exam/index.vue

@@ -19,6 +19,7 @@
               <div class="left-box">
                 <Header-tab-box
                   :num="questionOverNum(true)"
+                  :allNum="questionList.length"
                   @prevQuestion="prevQuestion"
                   @nextQuestion="nextQuestion"
                 ></Header-tab-box>
@@ -104,7 +105,7 @@
                           v-if="bankType == 1 && question.ques"
                         >
                           <div class="answer-list__left">
-                            正确答案:{{ ast[question.ans - 1] }}
+                            题目答案:{{ ast[question.ans - 1] }}
                           </div>
                           <div class="answer-list__left">
                             我的答案:{{ ast[question.ques - 1] }}
@@ -194,7 +195,7 @@
                           v-if="bankType == 1 && question.ques"
                         >
                           <div class="answer-list__left">
-                            正确答案:
+                            题目答案:
                             <template v-for="ansItem in question.ans">{{
                               ast[ansItem - 1]
                             }}</template>
@@ -299,7 +300,7 @@
                           v-if="bankType == 1 && question.ques"
                         >
                           <div class="answer-list__left">
-                            正确答案:{{ ast[question.ans == 1 ? 0 : 1] }}
+                            题目答案:{{ ast[question.ans == 1 ? 0 : 1] }}
                           </div>
                           <div class="answer-list__left">
                             我的答案:{{ ast[question.ques == 1 ? 0 : 1] }}
@@ -437,7 +438,7 @@
                                   "
                                 >
                                   <div class="answer-list__left">
-                                    正确答案:{{
+                                    题目答案:{{
                                       ast[question.ans[jsonIndex] - 1]
                                     }}
                                   </div>
@@ -559,7 +560,7 @@
                                   "
                                 >
                                   <div class="answer-list__left">
-                                    正确答案:
+                                    题目答案:
                                     <template
                                       v-for="ansItem in question.ans[jsonIndex]"
                                       >{{ ast[ansItem - 1] }}</template
@@ -712,7 +713,7 @@
                                   "
                                 >
                                   <div class="answer-list__left">
-                                    正确答案:{{
+                                    题目答案:{{
                                       ast[question.ans[jsonIndex] == 1 ? 0 : 1]
                                     }}
                                   </div>
@@ -1135,6 +1136,8 @@ export default {
       isAutoSubmit: false,
       examEndTime: 0,
       examStartTime: 0,
+      doMode:1,
+      simulateExamId:''
     };
   },
   async mounted() {
@@ -1240,10 +1243,7 @@ export default {
               }
             )
               .then(() => {
-                // confirmButton回调
-                console.log(12);
-                this.leaveNow();
-                next();
+                this.examSubmit();
               })
               .catch(() => {});
           });
@@ -1287,7 +1287,7 @@ export default {
           questionId: this.questionList[current].questionId,
           goodsId: this.goodsId,
           orderGoodsId: this.orderGoodsId,
-          doMode: 1
+          doMode: this.doMode
         })
         .then((res) => {
           this.$set(this.collectList, current, res.data);
@@ -1323,12 +1323,17 @@ export default {
      * 请求题目列表
      */
     goodsQuestionList() {
-      this.$request
-        .goodsQuestionList({
+      this.$request[this.doMode==3?'goodsRandomQuestionList':'goodsQuestionList']({
           examId: this.examId,
+          goodsId: this.goodsId,
+          orderGoodsId: this.orderGoodsId,
         })
-        .then(async (res) => {
-          if (!res.data.length) {
+        .then(async (data) => {
+          if(this.doMode==3){
+            this.simulateExamId = data.simulateExamId
+            data = data.questionList
+          }
+          if (!data.length) {
             this.$message({
               type: "warning",
               message: "该试卷暂无题目",
@@ -1367,10 +1372,8 @@ export default {
             }
           }
 
-          res.data.forEach((item, index) => {
+          data.forEach((item, index) => {
             item.jsonStr = JSON.parse(item.jsonStr);
-
-            console.log(item.type, "item");
             if (item.type == 2) {
               //多选
               item.jsonStr.forEach((str) => {
@@ -1488,13 +1491,12 @@ export default {
             item.ans = item.answerQuestion;
           });
 
-          this.questionList = res.data;
+          this.questionList = data;
           this.lastCount = this.questionList.length;
           this.getCollectInfo(this.current)
           await this.mockRecord();
         });
     },
-
     /**
      * 记录总题数,获取recordId
      * hasSpecial (是否包含简答和案例) true 包含  false 不包含
@@ -1657,10 +1659,10 @@ export default {
         this.$request.bankExam(this.examId).then((res) => {
           this.bankType = res.data.doType;
           this.examData = res.data;
+          // this.doMode = res.data.simulateStatus ? 3 : 1;
           if (this.bankType == 2) {
             this.needBack = true;
           }
-
           resolve();
         });
       });
@@ -2129,7 +2131,7 @@ export default {
             questionId: this.questionList[index].questionId,
             goodsId: this.goodsId || "",
             orderGoodsId: this.orderGoodsId,
-            doMode:1
+            doMode:this.doMode
           })
           .then((res) => {
             this.$set(this.collectList, index, true);
@@ -2621,6 +2623,7 @@ export default {
         });
     },
   },
+
 };
 </script>
 

+ 6 - 6
src/pages/person-center/free-bank/bank-explain-detail/index.vue

@@ -65,7 +65,7 @@
                       </div>
                       <div class="answer-list" v-if="question.ques">
                         <div class="answer-list__left">
-                          正确答案:{{ ast[question.ans - 1] }}
+                          题目答案:{{ ast[question.ans - 1] }}
                         </div>
                         <!-- <div class="answer-list__left">
                           我的答案:{{ ast[question.ques - 1] }}
@@ -124,7 +124,7 @@
                       </div>
                       <div class="answer-list" v-if="question.ques">
                         <div class="answer-list__left">
-                          正确答案:
+                          题目答案:
                           <template v-for="ansItem in question.ans">{{
                             ast[ansItem - 1]
                           }}</template>
@@ -183,7 +183,7 @@
                       </div>
                       <div class="answer-list" v-if="question.ques">
                         <div class="answer-list__left">
-                          正确答案:{{ ast[question.ans] }}
+                          题目答案:{{ ast[question.ans] }}
                         </div>
                         <!-- <div class="answer-list__left">
                           我的答案:{{ ast[question.ques] }}
@@ -272,7 +272,7 @@
                                 v-if="question.ques[jsonIndex]"
                               >
                                 <div class="answer-list__left">
-                                  正确答案:{{
+                                  题目答案:{{
                                     ast[question.ans[jsonIndex] - 1]
                                   }}
                                 </div>
@@ -364,7 +364,7 @@
                                 v-if="question.ques[jsonIndex]"
                               >
                                 <div class="answer-list__left">
-                                  正确答案:
+                                  题目答案:
                                   <template
                                     v-for="ansItem in question.ans[jsonIndex]"
                                     >{{ ast[ansItem - 1] }}</template
@@ -451,7 +451,7 @@
                                 v-if="question.ques[jsonIndex]"
                               >
                                 <div class="answer-list__left">
-                                  正确答案:{{ ast[question.ans[jsonIndex]] }}
+                                  题目答案:{{ ast[question.ans[jsonIndex]] }}
                                 </div>
                                 <!-- <div class="answer-list__left">
                                   我的答案:{{ ast[question.ques[jsonIndex]] }}

+ 291 - 128
src/pages/person-center/my-bank/bank-detailCopy/index.vue

@@ -4,22 +4,35 @@
       <div class="section__body">
         <div class="left-box">
           <el-tabs v-model="activeName" @tab-click="handelTab">
-            <el-tab-pane v-for="tab in newList" :key="tab.paperId" :label="tab.paperName" :name="tab.paperId + ''">
-              <div v-if="tab.paperName == '每日一练'" style="background: #f8f8fa; padding: 20px">
+            <el-tab-pane
+              v-for="tab in newList"
+              :key="tab.paperId"
+              :label="tab.paperName"
+              :name="tab.paperId + ''"
+            >
+              <div
+                v-if="tab.paperName == '每日一练'"
+                style="background: #f8f8fa; padding: 20px"
+              >
                 <template v-if="tab.examInfo">
                   <el-row :gutter="20">
                     <el-col :span="16">
                       <div class="day-box">
                         <div>
                           <p>
-                            打卡天数<span>{{ tab.examInfo.recordCount }}</span>天
+                            打卡天数<span>{{ tab.examInfo.recordCount }}</span
+                            >天
                           </p>
                           <p>
-                            打卡进度超过了{{ tab.examInfo.recordPercentage }}的学员
+                            打卡进度超过了{{
+                              tab.examInfo.recordPercentage
+                            }}的学员
                           </p>
                         </div>
                         <div @click="handelPunchClock(tab)">
-                          {{ tab.examInfo.examRecord ? "今日已打卡" : "今日打卡" }}
+                          {{
+                            tab.examInfo.examRecord ? "今日已打卡" : "今日打卡"
+                          }}
                         </div>
                         <img src="../../../../assets/basket.png" alt="" />
                       </div>
@@ -34,12 +47,21 @@
                           <p class="clock-title">打卡记录</p>
                           <div class="clock-calendar">
                             <el-calendar :first-day-of-week="7">
-                              <template slot="dateCell" slot-scope="{ date, data }">
-                                <p v-if="!isSelected(data.day)" :class="isToday(data.day) ? 'date-today' : ''">
+                              <template
+                                slot="dateCell"
+                                slot-scope="{ date, data }"
+                              >
+                                <p
+                                  v-if="!isSelected(data.day)"
+                                  :class="isToday(data.day) ? 'date-today' : ''"
+                                >
                                   {{ data.day.split("-").slice(2).join("-") }}
                                 </p>
                                 <p v-else class="is-Select">
-                                  <img src="../../../../assets/tick.png" alt="" />
+                                  <img
+                                    src="../../../../assets/tick.png"
+                                    alt=""
+                                  />
                                 </p>
                               </template>
                             </el-calendar>
@@ -51,13 +73,15 @@
                       <div class="ranki-list">
                         <p class="ranki-list-title">打卡PK榜</p>
                         <ul>
-                          <li style="font-size: 12px;">
+                          <li style="font-size: 12px">
                             <p>排名</p>
                             <p>用户ID</p>
                             <p>打卡天数</p>
                           </li>
-                          <li v-for="(item, index) in  rankiList" :key="index">
-                            <p>{{ index > 8 ? index + 1 : '0' + (index + 1) }}</p>
+                          <li v-for="(item, index) in rankiList" :key="index">
+                            <p>
+                              {{ index > 8 ? index + 1 : "0" + (index + 1) }}
+                            </p>
                             <p>
                               <el-image :src="$tools.splitImgHost(item.avatar)">
                                 <div slot="error" class="image-slot">
@@ -66,13 +90,12 @@
                               </el-image>
                               {{ item.userName }}
                             </p>
-                            <p style="color: #222222;">{{ item.recordCount }}</p>
+                            <p style="color: #222222">{{ item.recordCount }}</p>
                           </li>
                         </ul>
                       </div>
                     </el-col>
                   </el-row>
-
                 </template>
                 <div class="no-data" v-else>
                   <div>
@@ -81,12 +104,19 @@
                   </div>
                 </div>
               </div>
-              <div v-else-if="tab.paperName == '随机练习'" style="background: #f8f8fa; padding: 20px">
+              <div
+                v-else-if="tab.paperName == '随机练习'"
+                style="background: #f8f8fa; padding: 20px"
+              >
                 <div class="random-box">
                   <div class="random-box-top">
                     <p class="random-box-title">试卷情况</p>
                     <div class="random-box-top-num">
-                      <img style="margin-right: 12px" src="../../../../assets/testpaper.png" alt="" />
+                      <img
+                        style="margin-right: 12px"
+                        src="../../../../assets/testpaper.png"
+                        alt=""
+                      />
                       <div>
                         <p>{{ tab.examInfo ? tab.examInfo.doNum : "-" }}</p>
                         <p>已完成提数</p>
@@ -100,13 +130,13 @@
                       <div>
                         <p>
                           {{
-                              tab.examInfo
-                                ? toFixed(
+                            tab.examInfo
+                              ? toFixed(
                                   (tab.examInfo.rightNum /
                                     tab.examInfo.totalNum) *
-                                  100
+                                    100
                                 )
-                                : "-"
+                              : "-"
                           }}%
                         </p>
                         <p>正确率</p>
@@ -116,12 +146,19 @@
                   <div class="random-box-bom">
                     <p class="random-box-title">做题数量</p>
                     <div class="sle-num-box">
-                      <div :class="activeNum == val ? 'actvie' : ''" v-for="val in numList" :key="val"
-                        @click="handelNum(val)">
+                      <div
+                        :class="activeNum == val ? 'actvie' : ''"
+                        v-for="val in numList"
+                        :key="val"
+                        @click="handelNum(val)"
+                      >
                         {{ val }}
                       </div>
                     </div>
-                    <div class="random-box-bom-btn" @click="beginExam(tab.examInfo)">
+                    <div
+                      class="random-box-bom-btn"
+                      @click="beginExam(tab.examInfo)"
+                    >
                       开始做题
                     </div>
                   </div>
@@ -129,37 +166,71 @@
               </div>
               <div class="goods-menu" v-else>
                 <div class="goods-menu__body">
-                  <div class="item" v-for="(item, index) in bankList" :key="index">
+                  <div
+                    class="item"
+                    v-for="(item, index) in bankList"
+                    :key="index"
+                  >
                     <template v-if="item.type == 1">
                       <div class="item__title" @click="moduleExam(item)">
                         {{ item.name }}
-                        <span style="float: right; color: #99a0a7; font-weight: 400">{{ item.showList ? "收起∧" : "展开∨" }}
+                        <span
+                          style="float: right; color: #99a0a7; font-weight: 400"
+                          >{{ item.showList ? "收起∧" : "展开∨" }}
                         </span>
                       </div>
                       <div class="item__content" v-if="item.showList">
                         <div class="bank-chapter">
-                          <div class="bank-chapter__item" v-for="(chapter, chapterIndex) in item.list"
-                            :key="chapterIndex">
-                            <div class="bank-chapter__item__text" @click="chapterExam(chapter, item.majorId)">
-                              <span style="
+                          <div
+                            class="bank-chapter__item"
+                            v-for="(chapter, chapterIndex) in item.list"
+                            :key="chapterIndex"
+                          >
+                            <div
+                              class="bank-chapter__item__text"
+                              @click="chapterExam(chapter, item.majorId)"
+                            >
+                              <span
+                                style="
                                   margin-left: 21px;
                                   margin-right: 8px;
                                   color: #a7b0b8;
-                                "><span v-if="chapterIndex + 1 < 10">0{{ chapterIndex + 1 }}</span><span v-else>
+                                "
+                                ><span v-if="chapterIndex + 1 < 10"
+                                  >0{{ chapterIndex + 1 }}</span
+                                ><span v-else>
                                   {{ chapterIndex + 1 }}
-                                </span></span>{{ chapter.name }}
-                              <i v-if="chapter.showList" class="el-icon-arrow-up"
-                                style="float: right; margin-right: 20px"></i>
-                              <i v-else class="el-icon-arrow-down" style="float: right; margin-right: 20px"></i>
+                                </span></span
+                              >{{ chapter.name }}
+                              <i
+                                v-if="chapter.showList"
+                                class="el-icon-arrow-up"
+                                style="float: right; margin-right: 20px"
+                              ></i>
+                              <i
+                                v-else
+                                class="el-icon-arrow-down"
+                                style="float: right; margin-right: 20px"
+                              ></i>
                             </div>
 
                             <div class="bank-section" v-if="chapter.showList">
-                              <div class="bank-section__item" v-for="(section, sectionIndex) in chapter.list"
-                                :key="sectionIndex">
+                              <div
+                                class="bank-section__item"
+                                v-for="(section, sectionIndex) in chapter.list"
+                                :key="sectionIndex"
+                              >
                                 <div class="bank-section__item__text">
-                                  <span style="margin-right: 8px; color: #a7b0b8">●</span>
+                                  <span
+                                    style="margin-right: 8px; color: #a7b0b8"
+                                    >●</span
+                                  >
                                   {{ section.examName }}
-                                  <span v-if="section.newRecordStatus" class="upStudyStyle">上次做到</span>
+                                  <span
+                                    v-if="section.newRecordStatus"
+                                    class="upStudyStyle"
+                                    >上次做到</span
+                                  >
                                 </div>
                                 <div class="btn_div">
                                   <!-- 正确率
@@ -171,44 +242,64 @@
                                       )
                                     }}%</span
                                   > -->
-                                  <span style="margin-left: 6px">题目数: </span><span style="color: blue">{{
-                                      section.doQuestionNum || 0
+                                  <span style="margin-left: 6px">题目数: </span
+                                  ><span style="color: blue">{{
+                                    section.doQuestionNum || 0
                                   }}</span>
                                   /
                                   {{ section.questionNum || 0 }}
                                 </div>
-                                <el-button v-if="section.recordStatus == -1" type="primary" @click="
-                                  toDo(
-                                    section,
-                                    chapter.chapterExamId,
-                                    item.majorId
-                                  )
-                                " class="btn">开始做题</el-button>
-                                <el-button v-if="
-                                  section.recordStatus == 0 &&
-                                  section.doType == 1
-                                " type="primary" @click="
-  continueDo(
-    section,
-    chapter.chapterExamId,
-    item.majorId
-  )
-" class="btn">继续做题</el-button>
-
-                                <el-button v-if="
-                                  section.recordStatus == 1 ||
-                                  (section.recordStatus == 0 &&
-                                    section.doType == 2)
-                                " :disabled="
-  section.answerNum > 0 &&
-  section.doNum >= section.answerNum
-" type="primary" @click="
-  doRepeat(
-    section,
-    chapter.chapterExamId,
-    item.majorId
-  )
-" class="btn">重新做题</el-button>
+                                <el-button
+                                  v-if="section.recordStatus == -1"
+                                  type="primary"
+                                  @click="
+                                    toDo(
+                                      section,
+                                      chapter.chapterExamId,
+                                      item.majorId
+                                    )
+                                  "
+                                  class="btn"
+                                  >开始做题</el-button
+                                >
+                                <el-button
+                                  v-if="
+                                    section.recordStatus == 0 &&
+                                    section.doType == 1
+                                  "
+                                  type="primary"
+                                  @click="
+                                    continueDo(
+                                      section,
+                                      chapter.chapterExamId,
+                                      item.majorId
+                                    )
+                                  "
+                                  class="btn"
+                                  >继续做题</el-button
+                                >
+
+                                <el-button
+                                  v-if="
+                                    section.recordStatus == 1 ||
+                                    (section.recordStatus == 0 &&
+                                      section.doType == 2)
+                                  "
+                                  :disabled="
+                                    section.answerNum > 0 &&
+                                    section.doNum >= section.answerNum
+                                  "
+                                  type="primary"
+                                  @click="
+                                    doRepeat(
+                                      section,
+                                      chapter.chapterExamId,
+                                      item.majorId
+                                    )
+                                  "
+                                  class="btn"
+                                  >重新做题</el-button
+                                >
                               </div>
                             </div>
                           </div>
@@ -220,29 +311,57 @@
                       <div class="item__content">
                         <div class="bank-chapter">
                           <div class="bank-chapter__item">
-                            <div class="bank-chapter__item__text" @click="chapterExam(item, 0)">
-                              <span style="
+                            <div
+                              class="bank-chapter__item__text"
+                              @click="chapterExam(item, 0)"
+                            >
+                              <span
+                                style="
                                   margin-left: 21px;
                                   margin-right: 8px;
                                   color: #a7b0b8;
-                                ">
-                                <span v-if="index + 1 < 10">0{{ index + 1 }}</span><span v-else>
+                                "
+                              >
+                                <span v-if="index + 1 < 10"
+                                  >0{{ index + 1 }}</span
+                                ><span v-else>
                                   {{ index + 1 }}
-                                </span> </span>{{ item.name }}
-                              <i v-if="item.showList" class="el-icon-arrow-up"
-                                style="float: right; margin-right: 20px"></i>
-                              <i v-else class="el-icon-arrow-down" style="float: right; margin-right: 20px"></i>
+                                </span> </span
+                              >{{ item.name }}
+                              <i
+                                v-if="item.showList"
+                                class="el-icon-arrow-up"
+                                style="float: right; margin-right: 20px"
+                              ></i>
+                              <i
+                                v-else
+                                class="el-icon-arrow-down"
+                                style="float: right; margin-right: 20px"
+                              ></i>
                             </div>
 
                             <div class="bank-section" v-if="item.showList">
-                              <div class="bank-section__item" v-for="(section, sectionIndex) in item.list"
-                                :key="sectionIndex">
+                              <div
+                                class="bank-section__item"
+                                v-for="(section, sectionIndex) in item.list"
+                                :key="sectionIndex"
+                              >
                                 <div class="bank-section__item__text">
-                                  <span style="margin-right: 8px; color: #a7b0b8">●</span>
+                                  <span
+                                    style="margin-right: 8px; color: #a7b0b8"
+                                    >●</span
+                                  >
                                   {{ section.examName }}
-                                  <span v-if="section.newRecordStatus" class="upStudyStyle">上次做到</span>
+                                  <span
+                                    v-if="section.newRecordStatus"
+                                    class="upStudyStyle"
+                                    >上次做到</span
+                                  >
                                 </div>
-                                <div style="width: auto; padding: 0px 14px" class="btn_div">
+                                <div
+                                  style="width: auto; padding: 0px 14px"
+                                  class="btn_div"
+                                >
                                   <!-- 正确率
                                   <span style="color: rgb(52, 216, 71)"
                                     >{{
@@ -252,28 +371,45 @@
                                       )
                                     }}%</span
                                   > -->
-                                  <span style="margin-left: 6px">题目数: </span><span style="color: blue">{{
-                                      section.doQuestionNum || 0
+                                  <span style="margin-left: 6px">题目数: </span
+                                  ><span style="color: blue">{{
+                                    section.doQuestionNum || 0
                                   }}</span>
                                   /
                                   {{ section.questionNum || 0 }}
                                 </div>
-                                <el-button v-if="section.recordStatus == -1" type="primary"
-                                  @click="toDo(section, item.majorId, 0)" class="btn">开始做题</el-button>
-                                <el-button v-if="
-                                  section.recordStatus == 0 &&
-                                  section.doType == 1
-                                " type="primary" @click="continueDo(section, item.majorId, 0)" class="btn">继续做题
+                                <el-button
+                                  v-if="section.recordStatus == -1"
+                                  type="primary"
+                                  @click="toDo(section, item.majorId, 0)"
+                                  class="btn"
+                                  >开始做题</el-button
+                                >
+                                <el-button
+                                  v-if="
+                                    section.recordStatus == 0 &&
+                                    section.doType == 1
+                                  "
+                                  type="primary"
+                                  @click="continueDo(section, item.majorId, 0)"
+                                  class="btn"
+                                  >继续做题
                                 </el-button>
 
-                                <el-button v-if="
-                                  section.recordStatus == 1 ||
-                                  (section.recordStatus == 0 &&
-                                    section.doType == 2)
-                                " :disabled="
-  section.answerNum > 0 &&
-  section.doNum >= section.answerNum
-" type="primary" @click="doRepeat(section, item.majorId, 0)" class="btn">重新做题
+                                <el-button
+                                  v-if="
+                                    section.recordStatus == 1 ||
+                                    (section.recordStatus == 0 &&
+                                      section.doType == 2)
+                                  "
+                                  :disabled="
+                                    section.answerNum > 0 &&
+                                    section.doNum >= section.answerNum
+                                  "
+                                  type="primary"
+                                  @click="doRepeat(section, item.majorId, 0)"
+                                  class="btn"
+                                  >重新做题
                                 </el-button>
                               </div>
                             </div>
@@ -287,11 +423,20 @@
                         <div class="bank-section">
                           <div class="bank-section__item">
                             <div class="bank-section__item__text">
-                              <span style="margin-right: 8px; color: #a7b0b8">●</span>
+                              <span style="margin-right: 8px; color: #a7b0b8"
+                                >●</span
+                              >
                               {{ item.name }}
-                              <span v-if="item.newRecordStatus" class="upStudyStyle">上次做到</span>
+                              <span
+                                v-if="item.newRecordStatus"
+                                class="upStudyStyle"
+                                >上次做到</span
+                              >
                             </div>
-                            <div style="width: auto; padding: 0px 14px" class="btn_div">
+                            <div
+                              style="width: auto; padding: 0px 14px"
+                              class="btn_div"
+                            >
                               <!-- 正确率
                               <span style="color: rgb(52, 216, 71)"
                                 >{{
@@ -301,23 +446,41 @@
                                   )
                                 }}%</span
                               > -->
-                              <span style="margin-left: 6px">题目数: </span><span style="color: blue">{{
-                                  item.doQuestionNum || 0
+                              <span style="margin-left: 6px">题目数: </span
+                              ><span style="color: blue">{{
+                                item.doQuestionNum || 0
                               }}</span>
                               / {{ item.questionNum || 0 }}
                             </div>
-                            <el-button v-if="item.recordStatus == -1" type="primary" @click="toDo(item, 0, 0)"
-                              class="btn">开始做题</el-button>
-                            <el-button v-if="item.recordStatus == 0 && item.doType == 1" type="primary"
-                              @click="continueDo(item, 0, 0)" class="btn">继续做题</el-button>
-
-                            <el-button v-if="
-                              item.recordStatus == 1 ||
-                              (item.recordStatus == 0 && item.doType == 2)
-                            " :disabled="
-  item.answerNum > 0 &&
-  item.doNum >= item.answerNum
-" type="primary" @click="doRepeat(item, 0, 0)" class="btn">重新做题</el-button>
+                            <el-button
+                              v-if="item.recordStatus == -1"
+                              type="primary"
+                              @click="toDo(item, 0, 0)"
+                              class="btn"
+                              >开始做题</el-button
+                            >
+                            <el-button
+                              v-if="item.recordStatus == 0 && item.doType == 1"
+                              type="primary"
+                              @click="continueDo(item, 0, 0)"
+                              class="btn"
+                              >继续做题</el-button
+                            >
+
+                            <el-button
+                              v-if="
+                                item.recordStatus == 1 ||
+                                (item.recordStatus == 0 && item.doType == 2)
+                              "
+                              :disabled="
+                                item.answerNum > 0 &&
+                                item.doNum >= item.answerNum
+                              "
+                              type="primary"
+                              @click="doRepeat(item, 0, 0)"
+                              class="btn"
+                              >重新做题</el-button
+                            >
                           </div>
                         </div>
                       </div>
@@ -365,10 +528,10 @@ export default {
       numList: [5, 10, 15, 20, 50, 100],
       activeNum: 5,
       punchList: [],
-      rankiList: []
+      rankiList: [],
     };
   },
-  mounted() { },
+  mounted() {},
   computed: {
     compyRecommend: function () {
       return function (array) {
@@ -628,9 +791,11 @@ export default {
         this.$request.getToDayExam(this.goodsId).then((res) => {
           this.$set(item, "examInfo", res.data);
           if (res.data) {
-            this.$request.getPunchRecord({ goodsId: this.goodsId }).then((res) => {
-              this.punchList = res.data;
-            });
+            this.$request
+              .getPunchRecord({ goodsId: this.goodsId })
+              .then((res) => {
+                this.punchList = res.data;
+              });
             this.$request.getRankiList(this.goodsId).then((res) => {
               this.rankiList = res.data;
             });
@@ -1053,7 +1218,6 @@ export default {
 
     &__body {
       .left-box {
-
         // float: left;
         // width: 768px;
         .day-box {
@@ -1117,13 +1281,13 @@ export default {
 
         .ranki-list {
           padding: 20px 16px 0;
-          background: #FFFFFF;
+          background: #ffffff;
 
           .ranki-list-title {
             color: #484848;
             font-size: 14px;
             font-weight: bold;
-            border-bottom: 1px solid #E9E9E9;
+            border-bottom: 1px solid #e9e9e9;
             padding-bottom: 14px;
           }
 
@@ -1134,7 +1298,7 @@ export default {
               height: 30px;
               line-height: 30px;
               display: flex;
-              color: #6C7386;
+              color: #6c7386;
               margin-bottom: 16px;
 
               p {
@@ -1159,14 +1323,13 @@ export default {
 
                 &:nth-of-type(3) {
                   padding-right: 16px;
-
                 }
               }
 
               &:nth-of-type(1) {
                 height: 40px;
                 line-height: 40px;
-                background: #F8F8FA;
+                background: #f8f8fa;
                 color: #888691;
                 margin-bottom: 8px;
 

+ 6 - 6
src/pages/person-center/my-bank/bank-explain-detail/index.vue

@@ -65,7 +65,7 @@
                       </div>
                       <div class="answer-list" v-if="question.ques">
                         <div class="answer-list__left">
-                          正确答案:{{ ast[question.ans - 1] }}
+                          题目答案:{{ ast[question.ans - 1] }}
                         </div>
                         <!-- <div class="answer-list__left">
                           我的答案:{{ ast[question.ques - 1] }}
@@ -124,7 +124,7 @@
                       </div>
                       <div class="answer-list" v-if="question.ques">
                         <div class="answer-list__left">
-                          正确答案:
+                          题目答案:
                           <template v-for="ansItem in question.ans">{{
                             ast[ansItem - 1]
                           }}</template>
@@ -183,7 +183,7 @@
                       </div>
                       <div class="answer-list" v-if="question.ques">
                         <div class="answer-list__left">
-                          正确答案:{{ ast[question.ans] }}
+                          题目答案:{{ ast[question.ans] }}
                         </div>
                         <!-- <div class="answer-list__left">
                           我的答案:{{ ast[question.ques] }}
@@ -272,7 +272,7 @@
                                 v-if="question.ques[jsonIndex]"
                               >
                                 <div class="answer-list__left">
-                                  正确答案:{{
+                                  题目答案:{{
                                     ast[question.ans[jsonIndex] - 1]
                                   }}
                                 </div>
@@ -364,7 +364,7 @@
                                 v-if="question.ques[jsonIndex]"
                               >
                                 <div class="answer-list__left">
-                                  正确答案:
+                                  题目答案:
                                   <template
                                     v-for="ansItem in question.ans[jsonIndex]"
                                     >{{ ast[ansItem - 1] }}</template
@@ -451,7 +451,7 @@
                                 v-if="question.ques[jsonIndex]"
                               >
                                 <div class="answer-list__left">
-                                  正确答案:{{ ast[question.ans[jsonIndex]] }}
+                                  题目答案:{{ ast[question.ans[jsonIndex]] }}
                                 </div>
                                 <!-- <div class="answer-list__left">
                                   我的答案:{{ ast[question.ques[jsonIndex]] }}

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

@@ -155,6 +155,7 @@
                               @click="getResource(item, i, 3)"
                               >进入学习</el-button
                             >
+                            <!-- v-if="record.status == 0 && record.historyExamJson" -->
                             <el-button
                               size="mini"
                               style="width: 90px !important"
@@ -1501,6 +1502,7 @@ export default {
         let index = this.courseList.findIndex(
           (e) => e.courseId == courseLists.courseId
         );
+        
         if (index) {
           let prevItem = this.courseList[index - 1]; //上一课
           if (prevItem.stuAllNum != prevItem.secAllNum) {
@@ -1541,26 +1543,27 @@ export default {
     },
     async getResource(courseLists, section, type) {
       //type:1章卷,2节卷,3模考卷,4习题
-      if (!this.checkCanLearn()) {
-        return false;
-      }
+      // if (!this.checkCanLearn()) {
+      //   return false;
+      // }
       // 学习次数
-      if (!(await this.exceedLearnNum(courseLists, section))) {
-        return false;
-      }
+      // if (!(await this.exceedLearnNum(courseLists, section))) {
+      //   return false;
+      // }
 
-      // 学习顺序
+      // // 学习顺序
 
-      if (!(await this.orderTopTobottom(courseLists, section, type))) {
-        this.$message({
-          type: "warning",
-          message: "请学完视频课程再进行练习和测试",
-        });
-        return false;
-      }
+      // if (!(await this.orderTopTobottom(courseLists, section, type))) {
+      //   this.$message({
+      //     type: "warning",
+      //     message: "请学完视频课程再进行练习和测试",
+      //   });
+      //   return false;
+      // }
       //有次数限制
       let num = await this.bankRecordDoNum(courseLists, section);
       // section.doNum
+      // record.status == 0 && record.historyExamJson 继续做题
       if (section.answerNum - num > 0 && section.answerNum > 0) {
         this.$router.push({
           path: "/course-exam/" + this.goodsData.goodsId,

+ 6 - 6
src/pages/subject/collect-bank.vue

@@ -91,7 +91,7 @@
                         </div>
                         <div class="answer-list" v-if="question.ques">
                           <div class="answer-list__left">
-                            正确答案:{{ ast[question.ans - 1] }}
+                            题目答案:{{ ast[question.ans - 1] }}
                           </div>
                           <div class="answer-list__left" v-if="!explain">
                             我的答案:{{ ast[question.ques - 1] }}
@@ -170,7 +170,7 @@
                         </div>
                         <div class="answer-list" v-if="question.ques">
                           <div class="answer-list__left">
-                            正确答案:
+                            题目答案:
                             <template v-for="ansItem in question.ans">{{
                               ast[ansItem - 1]
                             }}</template>
@@ -260,7 +260,7 @@
                         </div>
                         <div class="answer-list" v-if="question.ques">
                           <div class="answer-list__left">
-                            正确答案:{{ ast[question.ans == 1 ? 0 : 1] }}
+                            题目答案:{{ ast[question.ans == 1 ? 0 : 1] }}
                           </div>
                           <div class="answer-list__left" v-if="!explain">
                             我的答案:{{ ast[question.ques == 1 ? 0 : 1] }}
@@ -378,7 +378,7 @@
                                   v-if="question.ques[jsonIndex]"
                                 >
                                   <div class="answer-list__left">
-                                    正确答案:{{
+                                    题目答案:{{
                                       ast[question.ans[jsonIndex] - 1]
                                     }}
                                   </div>
@@ -490,7 +490,7 @@
                                   v-if="question.ques[jsonIndex]"
                                 >
                                   <div class="answer-list__left">
-                                    正确答案:
+                                    题目答案:
                                     <template
                                       v-for="ansItem in question.ans[jsonIndex]"
                                       >{{ ast[ansItem - 1] }}</template
@@ -623,7 +623,7 @@
                                   v-if="question.ques[jsonIndex]"
                                 >
                                   <div class="answer-list__left">
-                                    正确答案:{{
+                                    题目答案:{{
                                       ast[question.ans[jsonIndex] == 1 ? 0 : 1]
                                     }}
                                   </div>

+ 6 - 6
src/pages/subject/collect-type-bank.vue

@@ -91,7 +91,7 @@
                         </div>
                         <div class="answer-list" v-if="question.ques">
                           <div class="answer-list__left">
-                            正确答案:{{ ast[question.ans - 1] }}
+                            题目答案:{{ ast[question.ans - 1] }}
                           </div>
                           <div class="answer-list__left" v-if="!explain">
                             我的答案:{{ ast[question.ques - 1] }}
@@ -173,7 +173,7 @@
                         </div>
                         <div class="answer-list" v-if="question.ques">
                           <div class="answer-list__left">
-                            正确答案:
+                            题目答案:
                             <template v-for="ansItem in question.ans">{{
                               ast[ansItem - 1]
                             }}</template>
@@ -264,7 +264,7 @@
                         </div>
                         <div class="answer-list" v-if="question.ques">
                           <div class="answer-list__left">
-                            正确答案:{{ ast[question.ans == 1 ? 0 : 1] }}
+                            题目答案:{{ ast[question.ans == 1 ? 0 : 1] }}
                           </div>
                           <div class="answer-list__left" v-if="!explain">
                             我的答案:{{ ast[question.ques == 1 ? 0 : 1] }}
@@ -385,7 +385,7 @@
                                   v-if="question.ques[jsonIndex]"
                                 >
                                   <div class="answer-list__left">
-                                    正确答案:{{
+                                    题目答案:{{
                                       ast[question.ans[jsonIndex] - 1]
                                     }}
                                   </div>
@@ -498,7 +498,7 @@
                                   v-if="question.ques[jsonIndex]"
                                 >
                                   <div class="answer-list__left">
-                                    正确答案:
+                                    题目答案:
                                     <template
                                       v-for="ansItem in question.ans[jsonIndex]"
                                       >{{ ast[ansItem - 1] }}</template
@@ -631,7 +631,7 @@
                                   v-if="question.ques[jsonIndex]"
                                 >
                                   <div class="answer-list__left">
-                                    正确答案:{{
+                                    题目答案:{{
                                       ast[question.ans[jsonIndex] == 1 ? 0 : 1]
                                     }}
                                   </div>

+ 6 - 6
src/pages/subject/wrong-bank.vue

@@ -91,7 +91,7 @@
                         </div>
                         <div class="answer-list" v-if="question.ques">
                           <div class="answer-list__left">
-                            正确答案:{{ ast[question.ans - 1] }}
+                            题目答案:{{ ast[question.ans - 1] }}
                           </div>
                           <div class="answer-list__left" v-if="!explain">
                             我的答案:{{ ast[question.ques - 1] }}
@@ -173,7 +173,7 @@
                         </div>
                         <div class="answer-list" v-if="question.ques">
                           <div class="answer-list__left">
-                            正确答案:
+                            题目答案:
                             <template v-for="ansItem in question.ans">{{
                               ast[ansItem - 1]
                             }}</template>
@@ -264,7 +264,7 @@
                         </div>
                         <div class="answer-list" v-if="question.ques">
                           <div class="answer-list__left">
-                            正确答案:{{ ast[question.ans == 1 ? 0 : 1] }}
+                            题目答案:{{ ast[question.ans == 1 ? 0 : 1] }}
                           </div>
                           <div class="answer-list__left" v-if="!explain">
                             我的答案:{{ ast[question.ques == 1 ? 0 : 1] }}
@@ -385,7 +385,7 @@
                                   v-if="question.ques[jsonIndex]"
                                 >
                                   <div class="answer-list__left">
-                                    正确答案:{{
+                                    题目答案:{{
                                       ast[question.ans[jsonIndex] - 1]
                                     }}
                                   </div>
@@ -498,7 +498,7 @@
                                   v-if="question.ques[jsonIndex]"
                                 >
                                   <div class="answer-list__left">
-                                    正确答案:
+                                    题目答案:
                                     <template
                                       v-for="ansItem in question.ans[jsonIndex]"
                                       >{{ ast[ansItem - 1] }}</template
@@ -631,7 +631,7 @@
                                   v-if="question.ques[jsonIndex]"
                                 >
                                   <div class="answer-list__left">
-                                    正确答案:{{
+                                    题目答案:{{
                                       ast[question.ans[jsonIndex] == 1 ? 0 : 1]
                                     }}
                                   </div>

+ 6 - 6
src/pages/subject/wrong-type-bank.vue

@@ -91,7 +91,7 @@
                         </div>
                         <div class="answer-list" v-if="question.ques">
                           <div class="answer-list__left">
-                            正确答案:{{ ast[question.ans - 1] }}
+                            题目答案:{{ ast[question.ans - 1] }}
                           </div>
                           <div class="answer-list__left" v-if="!explain">
                             我的答案:{{ ast[question.ques - 1] }}
@@ -173,7 +173,7 @@
                         </div>
                         <div class="answer-list" v-if="question.ques">
                           <div class="answer-list__left">
-                            正确答案:
+                            题目答案:
                             <template v-for="ansItem in question.ans">{{
                               ast[ansItem - 1]
                             }}</template>
@@ -264,7 +264,7 @@
                         </div>
                         <div class="answer-list" v-if="question.ques">
                           <div class="answer-list__left">
-                            正确答案:{{ ast[question.ans == 1 ? 0 : 1] }}
+                            题目答案:{{ ast[question.ans == 1 ? 0 : 1] }}
                           </div>
                           <div class="answer-list__left" v-if="!explain">
                             我的答案:{{ ast[question.ques == 1 ? 0 : 1] }}
@@ -385,7 +385,7 @@
                                   v-if="question.ques[jsonIndex]"
                                 >
                                   <div class="answer-list__left">
-                                    正确答案:{{
+                                    题目答案:{{
                                       ast[question.ans[jsonIndex] - 1]
                                     }}
                                   </div>
@@ -498,7 +498,7 @@
                                   v-if="question.ques[jsonIndex]"
                                 >
                                   <div class="answer-list__left">
-                                    正确答案:
+                                    题目答案:
                                     <template
                                       v-for="ansItem in question.ans[jsonIndex]"
                                       >{{ ast[ansItem - 1] }}</template
@@ -631,7 +631,7 @@
                                   v-if="question.ques[jsonIndex]"
                                 >
                                   <div class="answer-list__left">
-                                    正确答案:{{
+                                    题目答案:{{
                                       ast[question.ans[jsonIndex] == 1 ? 0 : 1]
                                     }}
                                   </div>

部分文件因文件數量過多而無法顯示