Explorar o código

跳转课程和试卷列表i哦

chenxiong %!s(int64=3) %!d(string=hai) anos
pai
achega
1dbfed3184

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

@@ -862,6 +862,7 @@ export default {
     };
   },
   async mounted() {
+    this.current = +this.$route.query.current || 0;
     this.goodsId = this.$route.params.goodsId;
     this.examId = this.$route.query.examId;
     this.moduleId = this.$route.query.moduleId;

+ 2 - 2
src/pages/bank-report/index.vue

@@ -231,9 +231,9 @@ export default {
 
     backBank() {
       this.$router.replace({
-        path: "/bank-exam/" + this.nextExamId,
+        path: "/bank-exam/" + this.goodsId,
         query: {
-          examId: this.examId,
+          examId: this.nextExamId,
           moduleId: this.moduleId || 0,
           chapterId: this.chapterId || 0,
         },

+ 78 - 5
src/pages/person-center/my-message/index.vue

@@ -16,7 +16,7 @@
         <div class="content__header">
           <div class="text">
             未读共
-            <span class="note">{{receiptNum}}</span>
+            <span class="note">{{ receiptNum }}</span>
           </div>
 
@@ -113,14 +113,31 @@
                   v-for="(item, index) in listData.informVo.informCourseVo"
                   :key="index"
                 >
-                  123
+                  <div class="item__title">{{ item.goodsName }}</div>
+                  <div class="item__desc">
+                    {{ item.courseName
+                    }}{{ item.moduleName ? "/" + item.moduleName : ""
+                    }}{{ item.chapterName ? "/" + item.chapterName : ""
+                    }}{{ item.sectionName }}
+                  </div>
+                  <div class="item__content" @click="jumpSection(item)">
+                    {{ $tools.secondToTime(item.topicNum) }}(点击可直接跳转)
+                  </div>
                 </div>
                 <div
                   class="item"
                   v-for="(item, index) in listData.informVo.informExamVo"
                   :key="index"
                 >
-                  123123
+                  <div class="item__title">{{ item.goodsName }}</div>
+                  <div class="item__desc">
+                    {{ item.moduleName ? "/" + item.moduleName : ""
+                    }}{{ item.chapterName ? "/" + item.chapterName : ""
+                    }}{{ item.examName }}
+                  </div>
+                  <div class="item__content" @click="jumpExam(item)">
+                    第{{ item.topicNum }}道题(点击可直接跳转)
+                  </div>
                 </div>
               </div>
             </div>
@@ -693,6 +710,48 @@ export default {
         }
       });
     },
+
+    //跳转节视频
+    jumpSection(item) {
+      item.noteSecond = Number(item.topicNum) * 60; //转秒数\
+      this.$router.push({
+        path: "/my-course-detail/" + item.goodsId,
+        query: {
+          courseId: item.courseId,
+          sectionId: item.sectionId,
+          moduleId: item.moduleId || 0,
+          chapterId: item.chapterId || 0,
+          recordingUrl: item.recordingUrl,
+          noteSecond: item.noteSecond,
+        },
+      });
+    },
+    //跳转题库题目
+    jumpExam(item) {
+      this.$router.push({
+        path: "/bank-exam/" + item.goodsId,
+        query: {
+          current: item.topicNum - 1,
+          examId: item.examId,
+          moduleId: item.moduleId || 0,
+          chapterId: item.chapterId || 0,
+        },
+      });
+      console.log(item);
+      uni.navigateTo({
+        url:
+          "/pages2/bank/questionBank?current=" +
+          (item.topicNum - 1) +
+          "&id=" +
+          item.examId +
+          "&goodsid=" +
+          item.goodsId +
+          "&chapterId=" +
+          item.moduleId +
+          "&moduleId=" +
+          item.moduleId,
+      });
+    },
   },
 };
 </script>
@@ -1019,13 +1078,27 @@ export default {
 
           .list {
             .item {
-              cursor: pointer;
               margin-top: 18px;
               font-size: 14px;
               font-family: Microsoft YaHei;
               font-weight: 400;
-              color: #3f8dfd;
               line-height: 28px;
+
+              &__title {
+                color: #333;
+                font-size: 16px;
+              }
+
+              &__desc {
+                color: #666;
+                font-size: 16px;
+              }
+
+              &__content {
+                font-size: 14px;
+                cursor: pointer;
+                color: #3f8dfd;
+              }
             }
           }
         }