فهرست منبع

对接七大员完成

谢杰标 2 سال پیش
والد
کامیت
de000d0ff5

+ 1 - 1
common/config.js

@@ -1,6 +1,6 @@
 // test 测试环境
 const test = {
-  BASE_URL: "http://120.79.166.78:19012",
+  BASE_URL: "http://192.168.1.7:5055",
   BASE_IMG_URL: "https://file-dev.xyyxt.net/",
   domain: "h.xyyxt.net",
   tenantId: "867735392558919680", //详粤云学堂

+ 241 - 234
common/httpList/course.js

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

+ 21 - 13
components/common/ClassTimeTip.vue

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

+ 3 - 4
components/course/courseChapter.vue

@@ -169,7 +169,6 @@ export default {
   onLoad() {},
   created() {},
   mounted() {
-    // console.log('needOpen:', this.needOpen, this.chapterOpen);
     if (this.needOpen && this.chapterOpen) {
       this.updateChapterOpen(false);
       this.openChapter(this.menuItem);
@@ -720,10 +719,10 @@ export default {
   computed: {
     ...mapGetters(["goodsAuditionConfigIdList", "chapterOpen"]),
     learnStatus() {
-      // console.log(this.menuItem, "this.menuItem");
+      if (!this.isBuy) {
+        return 0;
+      }
       let { id, courseId, moduleId } = this.menuItem;
-      // console.log(this.menuItem, id, courseId, moduleId, "this.menuItem");
-      // console.log(this.sectionItem,)
       if (
         this.sectionItem.courseId == courseId &&
         this.sectionItem.moduleId == (moduleId || 0) &&

+ 7 - 2
pages/learn/index.vue

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

+ 103 - 5
pages2/order/confirm_list.vue

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

+ 25 - 14
pages2/order/confirm_pay.vue

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

+ 3 - 0
pages2/order/index.vue

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

+ 1 - 2
pages3/course/detail.vue

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

+ 21 - 2
pages3/polyv/detail.vue

@@ -928,6 +928,7 @@ export default {
       // stream: null,
       faceUrl: "",
       erJianErZao: false,
+      jjShiGongYuan: false,
       pauseTime: 0,
       pauseTimer: null,
       barTimer: null,
@@ -985,7 +986,6 @@ export default {
     this.option = option;
     // 公众号模板消息的数据埋点
     option.informId && this.clickOfficial(option.informId);
-
   },
   async onShow() {
     if (uni.getStorageSync("nofresh")) {
@@ -998,6 +998,7 @@ export default {
     if (this.$method.isGoLogin()) {
       return;
     }
+    this.option.isQ !== "" && (await this.qCheckIsCanLearn());
     !this.userInfo && this.$api.refreshUserInfo();
     this.closePhoto();
     this.courseCourseList();
@@ -1014,6 +1015,19 @@ export default {
   mounted() {},
   methods: {
     ...mapMutations(["updateChapterOpen", "updateLiveLast"]),
+    // 七大员是否能进入学习
+    async qCheckIsCanLearn() {
+      let res = await this.$api.qCheckIsCanLearn(this.orderGoodsId);
+      if (res.data.code !== 200) {
+        return Promise.reject();
+      }
+      let res1 = await this.$api.syncSevenPublicClass({
+        orderGoodsId: this.orderGoodsId,
+      });
+      if (res1.data.code !== 200) {
+        return Promise.reject();
+      }
+    },
     // 新增微信公众号模板消息点击数据
     clickOfficial(informId) {
       this.$http({
@@ -2334,7 +2348,10 @@ export default {
         }
         //没有历史拍照间隔数据
         if (this.photoList.length == 0) {
-          this.commonConfig(totalVideoTime, true?46*60:undefined)
+          this.commonConfig(
+            totalVideoTime,
+            this.jjShiGongYuan ? 46 * 60 : undefined
+          );
           this.postCoursePhotoRecord(true); //提交随机拍照时间数组
         }
         //兼容已有观看历史
@@ -3570,8 +3587,10 @@ export default {
         if (self.goodsData.buyNote) {
           this.baseHandoutTipList();
         }
+        console.log(this.goodsData, 798);
         self.gradeId = self.goodsData.gradeId;
         self.erJianErZao = self.goodsData.erJianErZao;
+        self.jjShiGongYuan = self.goodsData.jjShiGongYuan;
         this.courseBusiness(this.goodsData.businessId);
         self.getMenuList();
         self.getReMenuList(); //获取重修目录

+ 94 - 10
pages4/shopping/shoppingCart.vue

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