|
@@ -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
|
|
|
},
|