소스 검색

修改查询历史记录

aaa 4 년 전
부모
커밋
6996a78062

+ 4 - 0
src/views/home/answer/page-answer-recruit.vue

@@ -257,6 +257,10 @@ export default {
         )
         .then(res => {
           if (res.data) {
+            if (res.data.length === 0) {
+              this.isInited = true;
+              return;
+            }
             let httpResultData = [];
             res.data.forEach(element => {
               this.answerStatus.push(0);

+ 1 - 0
src/views/home/answer/through/through-question-doing.vue

@@ -245,6 +245,7 @@ export default {
           { params }
         )
         .then(res => {
+          console.log("--222--" + JSON.stringify(res.data));
           if (res.data) {
             let httpResultData = [];
             res.data.forEach((item, index) => {

+ 1 - 0
src/views/home/exam/page-exam-item-doing.vue

@@ -238,6 +238,7 @@ export default {
           { params }
         )
         .then(res => {
+          console.log("--333--" + JSON.stringify(res.data));
           if (res.data) {
             let httpResultData = [];
             res.data.forEach((item, index) => {

+ 1 - 1
src/views/home/index.vue

@@ -173,7 +173,7 @@ export default {
         .get(this.$_API.JTXT_GET_USER_EXAMS_HISTORY, { params })
         .then(res => {
           let obj = {};
-          res.data.forEach(element => {
+          res.data.content.forEach(element => {
             obj[element.examId] = element;
           });
           this.$store.commit("updateExamItemStore", {

+ 1 - 1
src/views/home/person/exam-history.vue

@@ -137,7 +137,7 @@ export default {
       this.$_http
         .get(this.$_API.JTXT_GET_USER_EXAMS_HISTORY, { params })
         .then(res => {
-          res.data.forEach((item, index) => {
+          res.data.content.forEach((item, index) => {
             this.getExamDetailFun(item, index, index + 1 === res.data.length);
           });
           this.finished = true;