Bläddra i källkod

clear data before collection query

hehaitao 1 år sedan
förälder
incheckning
ec7e80cc73
1 ändrade filer med 2 tillägg och 20 borttagningar
  1. 2 20
      src/views/questioncenter/components/generate-tabs/paper-by-hand.vue

+ 2 - 20
src/views/questioncenter/components/generate-tabs/paper-by-hand.vue

@@ -270,7 +270,8 @@ export default {
       this.queryQuestions()
     },
     async queryCollections() {
-      console.log('queryCollections', this.queryOutput)
+      this.total = 0
+      this.queList = []
       if (!this.queryOutput.subjectName) return // 条件切换中间状态
       delete this.queryOutput.collectType // favQuestions接口不需要这个参数
       const res = await favQuestions({
@@ -334,30 +335,11 @@ export default {
     clearQueCard() {
       if (this.queCardForm.queList.length > 0) {
         deleteQuestionCard(this.extraData).then((res) => {
-          console.log(res)
           this.queCardForm.queList = []
           this.msgSuccess('清空成功')
         })
       }
     },
-    toCollectQue(item) {
-      queCollect({
-        questionId: item.id
-      }).then((res) => {
-        item.collect = !item.collect
-        this.msgSuccess('收藏成功')
-        console.log(res)
-      })
-    },
-    toCancelCollectQue(item) {
-      queCancelCollect({
-        questionId: item.id
-      }).then((res) => {
-        item.collect = !item.collect
-        this.msgSuccess('取消收藏成功')
-        console.log(res)
-      })
-    },
     viewDetail(item) {
       item.expand = !item.expand
     },