aaa 4 vuotta sitten
vanhempi
commit
f02a781ada

+ 10 - 14
src/views/home/answer/page-answer-recruit.vue

@@ -27,7 +27,7 @@
         <div class="exam-question-describe">
           {{
             examQuestionList[answerIndex].questionContent ||
-              examQuestionList[answerIndex].content
+            examQuestionList[answerIndex].content
           }}
         </div>
         <!-- 答题列表 -->
@@ -35,7 +35,7 @@
         <div
           v-if="
             examQuestionList[answerIndex].type === questionType.singleChoice ||
-              examQuestionList[answerIndex].type === questionType.multipleChoice
+            examQuestionList[answerIndex].type === questionType.multipleChoice
           "
           class="exam-question-options"
         >
@@ -46,7 +46,7 @@
               'exam-question-options-item': true,
               'exam-question-options-item-checked': answerValue.includes(item),
               'exam-question-options-false':
-                answerValue.includes(item) && answerStatus === 2
+                answerValue.includes(item) && answerStatus === 2,
             }"
             @click="handleExamQuestionOptionsItemFun(item)"
           >
@@ -161,12 +161,16 @@ export default {
         return;
       }
       this.$store.commit("toggleLoading", true);
+      let params = {
+        type: "aaaaaaaa"
+      };
       this.$_http
         .post(
           this.$pathParams(this.$_API.POST_JTXT_GET_EXAMS_START, {
             examId: this.answerRecruitId
           }),
-          this.userInfo
+          this.userInfo,
+          { params }
         )
         .then(res => {
           if (res.data) {
@@ -398,16 +402,8 @@ export default {
       let grades = this.getUserExamAllPointsFun(); // 方法:计算成绩
       let answers = this.getUserExamAllAnswersFun(); // 方法:获取当前用户所有题目作答的答案
       let params = {
-        user: this.userInfo,
-        exam: {
-          id: 0,
-          name: "",
-          description: "",
-          creator: this.userInfo,
-          duration: "",
-          deadline: "",
-          startTime: ""
-        },
+        userId: this.userInfo.id,
+        examId: this.answerRecruitId,
         points: grades, // 成绩:积分
         startTime: "", // this.answerTime.startTime,
         endTime: "", // this.answerTime.endTime

+ 15 - 20
src/views/home/exam/page-exam-item-doing.vue

@@ -14,7 +14,7 @@
         :class="{
           'exam-question-item': true,
           'exam-question-item-on': answerIndex === index,
-          'exam-question-item-down': examQuestionList[index].userAnswer.length
+          'exam-question-item-down': examQuestionList[index].userAnswer.length,
         }"
         v-for="(item, index) in examQuestionList"
         :key="index"
@@ -51,7 +51,7 @@
         <div v-if="examQuestionList.length" class="exam-question-describe">
           {{
             examQuestionList[answerIndex].questionContent ||
-              examQuestionList[answerIndex].content
+            examQuestionList[answerIndex].content
           }}
         </div>
         <!-- 答题列表 -->
@@ -59,10 +59,9 @@
         <div
           v-if="
             examQuestionList.length &&
-              (examQuestionList[answerIndex].type ===
-                questionType.singleChoice ||
-                examQuestionList[answerIndex].type ===
-                  questionType.multipleChoice)
+            (examQuestionList[answerIndex].type === questionType.singleChoice ||
+              examQuestionList[answerIndex].type ===
+                questionType.multipleChoice)
           "
           class="exam-question-options"
         >
@@ -71,7 +70,7 @@
             :key="index"
             :class="{
               'exam-question-options-item': true,
-              'exam-question-options-item-checked': answerValue.includes(item)
+              'exam-question-options-item-checked': answerValue.includes(item),
             }"
             @click="handleExamQuestionOptionsItemFun(item)"
           >
@@ -82,7 +81,7 @@
         <div
           v-if="
             examQuestionList.length &&
-              examQuestionList[answerIndex].type === questionType.gapFilling
+            examQuestionList[answerIndex].type === questionType.gapFilling
           "
           class="exam-question-gapFilling"
         >
@@ -125,7 +124,7 @@
       accept="image/*"
       capture="user"
       @change="startTakePhotoFUn"
-      style="display: none;"
+      style="display: none"
     />
   </div>
 </template>
@@ -206,12 +205,16 @@ export default {
     // 方法:开始考试
     examStartFun() {
       this.$store.commit("toggleLoading", true);
+      let params = {
+        type: "aaaaaaaa"
+      };
       this.$_http
         .post(
           this.$pathParams(this.$_API.POST_JTXT_GET_EXAMS_START, {
             examId: this.examItem.id
           }),
-          this.userInfo
+          this.userInfo,
+          { params }
         )
         .then(res => {
           if (res.data) {
@@ -510,16 +513,8 @@ export default {
       let grades = this.getUserExamAllPointsFun(); // 方法:计算成绩
       let answers = this.getUserExamAllAnswersFun(); // 方法:获取当前用户所有题目作答的答案
       let params = {
-        user: this.userInfo,
-        exam: {
-          id: this.examItem.id,
-          name: this.examItem.name,
-          description: this.examItem.description,
-          creator: this.userInfo,
-          duration: this.examItem.duration,
-          deadline: this.examItem.deadline,
-          startTime: this.examItem.startTime
-        },
+        userId: this.userInfo.id,
+        examId: this.answerRecruitId,
         points: grades, // 成绩:分数
         startTime: this.answerTime.startTime,
         endTime: this.answerTime.endTime,

+ 4 - 5
src/views/home/learn/page-learn-content.vue

@@ -1,7 +1,8 @@
 <template>
   <div class="page-learn-content-box">
     <van-nav-bar title="学习" left-arrow @click-left="onClickLeft" />
-    <div v-if="seconds > 0" class="learn-content-rest-time">
+    <div v-if="isRead" class="learn-content-rest-time">已学完</div>
+    <div v-else class="learn-content-rest-time">
       剩余学习时间: {{ getTimeHoursMinuteSecondsFun(seconds) }}
     </div>
     <!-- 内容 -->
@@ -187,7 +188,8 @@ export default {
           this.seconds--;
         } else {
           Toast("学习完成");
-          if (this.isRead) {
+          if (!this.isRead) {
+            this.isRead = true;
             this.ReadMaterial();
           }
           clearInterval(this.startStudyInterval);
@@ -289,9 +291,6 @@ export default {
         .then(res => {
           this.isRead = res;
           console.log(this.isRead);
-          if (this.isRead) {
-            this.ReadMaterial();
-          }
         })
         .catch(() => {
           this.$store.commit("toggleLoading", false);