wyling 3 سال پیش
والد
کامیت
578202e0ff
1فایلهای تغییر یافته به همراه6 افزوده شده و 4 حذف شده
  1. 6 4
      src/views/collection/index.vue

+ 6 - 4
src/views/collection/index.vue

@@ -123,10 +123,12 @@ const useQuestionList = (type: CollectionAndWrongType.type) => {
     collectionList.value = collectionListRes.rows;
     total.value = collectionListRes.total;
     const ids = collectionListRes.rows.map((item) => item.questionId);
-    const questions = await getQuestionInfoByIds({
-      ids,
-    });
-    questionList.value = questions.rows;
+    if (ids.length > 0) {
+      const questions = await getQuestionInfoByIds({
+        ids,
+      });
+      questionList.value = questions.rows;
+    }
   };
 
   const finished = computed(() => {