Parcourir la source

Merge branch 'dev' of http://120.79.166.78:19005/zhongzheng-edu/saas_pc into tang

Tang il y a 2 ans
Parent
commit
ff2acb2e49

+ 9 - 9
src/pages/person-center/my-classhour/index/index.vue

@@ -2,11 +2,11 @@
   <div class="my-classhour">
     <div class="my-classhour__body">
       <el-tabs :value="activeName" @tab-click="tabChange">
-        <el-tab-pane label="学时审核" name="1"></el-tab-pane>
-        <el-tab-pane label="学习凭证" name="2"></el-tab-pane>
+        <el-tab-pane label="学习凭证" name="1"></el-tab-pane>
+        <el-tab-pane label="学时审核" name="2"></el-tab-pane>
       </el-tabs>
 
-      <template v-if="activeName == '1'">
+      <template v-if="activeName == '2'">
         <div class="no-data" v-if="listData.length == 0">
           您暂无相关学时审核记录哦
         </div>
@@ -173,7 +173,7 @@
         </template>
       </template>
 
-      <template v-if="activeName == '2'">
+      <template v-if="activeName == '1'">
         <div class="no-data" v-if="listData1.length == 0">
           您暂无相关学习凭证记录哦
         </div>
@@ -340,7 +340,7 @@ export default {
   },
   mounted() {
     this.setSystemTime();
-    this.getcourseperiodlistGoods();
+    this.getUserCertificateList();
   },
   methods: {
     ...mapActions(["setSystemTime"]),
@@ -468,18 +468,18 @@ export default {
       this.param.pageNum = 1;
 
       if (this.activeName == "1") {
-        this.getcourseperiodlistGoods();
-      } else {
         this.getUserCertificateList();
+      } else {
+        this.getcourseperiodlistGoods();
       }
     },
     currentChange(e) {
       this.param.pageNum = e;
 
       if (this.activeName == "1") {
-        this.getcourseperiodlistGoods();
-      } else {
         this.getUserCertificateList();
+      } else {
+        this.getcourseperiodlistGoods();
       }
     },
     appointment(item) {

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

@@ -1304,7 +1304,7 @@ export default {
           });
       });
     },
-    checkCanLearn() {
+    checkCanLearn(section) {
       let time = this.$tools.timest();
       let {
         interfaceAccountId,
@@ -1320,7 +1320,7 @@ export default {
       console.log(interfaceAccountId,learnStatus,"xzx")
       if (interfaceAccountId > 0) {
         learnStatus == 1
-          ? this.rebuildSubmit(this.goodsData)
+          ? this.rebuildSubmit(this.goodsData, section)
           : this.$message({
               type: "warning",
               message:
@@ -1352,8 +1352,7 @@ export default {
       return index === -1;
     },
     async studyFunc(courseItem, items) {
-      console.log(items);
-      if (!this.checkCanLearn()) {
+      if (!this.checkCanLearn(items)) {
         return false;
       }
       if (!(await this.orderTopTobottom(courseItem, items, 99))) {
@@ -1503,7 +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) {
@@ -1803,13 +1802,17 @@ export default {
           });
       });
     },
-    rebuildSubmit(item) {
+    rebuildSubmit(item, section) {
       this.$router.push({
         path: `/my-course-detail/${item.goodsId}`,
         query: {
           gradeId: item.gradeId,
           orderGoodsId: item.orderGoodsId,
           rebuild: 1,
+          courseId: section.courseId,
+          chapterId: section.chapterId,
+          moduleId: section.moduleId,
+          sectionId: section.sectionId || section.menuId,
         },
       });
     },

+ 2 - 2
src/pages/person-center/my-order/index.vue

@@ -55,7 +55,7 @@
                       <span class="note">¥{{ items.goodsRealPrice }}</span>
                     </div>
                   </div>
-
+<div v-if="false">
                   <div
                     class="btn btn--nobg"
                     @click="refund(item.orderSn, items.goodsId)"
@@ -72,7 +72,7 @@
                     "
                   >
                     申请退款
-                  </div>
+                  </div></div>
                   <div class="state" v-if="items.refundStatus == 2">已退款</div>
                 </div>
               </div>