浏览代码

clear data before collection query

hehaitao 1 年之前
父节点
当前提交
ec7e80cc73
共有 1 个文件被更改,包括 2 次插入20 次删除
  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()
       this.queryQuestions()
     },
     },
     async queryCollections() {
     async queryCollections() {
-      console.log('queryCollections', this.queryOutput)
+      this.total = 0
+      this.queList = []
       if (!this.queryOutput.subjectName) return // 条件切换中间状态
       if (!this.queryOutput.subjectName) return // 条件切换中间状态
       delete this.queryOutput.collectType // favQuestions接口不需要这个参数
       delete this.queryOutput.collectType // favQuestions接口不需要这个参数
       const res = await favQuestions({
       const res = await favQuestions({
@@ -334,30 +335,11 @@ export default {
     clearQueCard() {
     clearQueCard() {
       if (this.queCardForm.queList.length > 0) {
       if (this.queCardForm.queList.length > 0) {
         deleteQuestionCard(this.extraData).then((res) => {
         deleteQuestionCard(this.extraData).then((res) => {
-          console.log(res)
           this.queCardForm.queList = []
           this.queCardForm.queList = []
           this.msgSuccess('清空成功')
           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) {
     viewDetail(item) {
       item.expand = !item.expand
       item.expand = !item.expand
     },
     },