Selaa lähdekoodia

transfer query parameters

hare8999@163.com 2 vuotta sitten
vanhempi
commit
7981cfa4d8
2 muutettua tiedostoa jossa 4 lisäystä ja 4 poistoa
  1. 2 2
      src/api/webApi/webQue.js
  2. 2 2
      src/views/questioncenter/question-preview.vue

+ 2 - 2
src/api/webApi/webQue.js

@@ -747,11 +747,11 @@ export function downloadRealPaper(paperId, period) {
 }
 
 // /front/questionCollection/getNextQuestionForImageGenerate
-export function getNextQuestionForImageGenerate(questionId) {
+export function getNextQuestionForImageGenerate(params) {
   return request({
     url: '/front/questionCollection/getNextQuestionForImageGenerate',
     method: 'get',
-    params: { questionId },
+    params,
     withoutToken: true
   })
 }

+ 2 - 2
src/views/questioncenter/question-preview.vue

@@ -22,7 +22,7 @@ export default {
   },
   computed: {
     questionId() {
-      return this.$route.query?.id || this.$route.query?.questionId || 0
+      return this.$route.query.id || this.$route.query.questionId || 0
     },
     questionOptions() {
       return {
@@ -40,7 +40,7 @@ export default {
   methods: {
     loadQuestion() {
       if (this.questionId) {
-        getNextQuestionForImageGenerate(this.questionId)
+        getNextQuestionForImageGenerate(this.$route.query)
           .then(res => this.question = res.data)
       }
     }