feat(home): 添加热门问题点击处理及优化反馈逻辑

This commit is contained in:
yangzhe 2025-12-01 09:20:31 +08:00
parent 70cbde0d11
commit d78a71d09e
1 changed files with 23 additions and 9 deletions

View File

@ -36,6 +36,7 @@
class="qa-item" class="qa-item"
v-for="(item, index) in hotQuestions" v-for="(item, index) in hotQuestions"
:key="index" :key="index"
@click="handleQAClick(item)"
> >
<text class="qa-question">{{ item.content }}</text> <text class="qa-question">{{ item.content }}</text>
</view> </view>
@ -793,7 +794,11 @@ export default {
console.log("触发上拉刷新"); console.log("触发上拉刷新");
// //
if (this.noMoreData || this.isSwitchingConversation || !this.currentConversationId) { if (
this.noMoreData ||
this.isSwitchingConversation ||
!this.currentConversationId
) {
return; return;
} }
@ -848,7 +853,17 @@ export default {
}); });
}, },
// // /&退
handleFeedback(message, isHelp) {
this.$u.api.ModifyStatus({ id: message.id, isHelp }).then((res) => {
if (!res.succeed) return;
this.$u.toast("操作成功");
// 退
this.refreshPageWithFallback();
});
},
//
hotQARefresh() { hotQARefresh() {
console.log("刷新问题"); console.log("刷新问题");
@ -860,13 +875,12 @@ export default {
}); });
}, },
// /&退 //
handleFeedback(message, isHelp) { handleQAClick(item) {
this.$u.api.ModifyStatus({ id: message.id, isHelp }).then((res) => { this.$u.api.GetHotQuestionsFromId({ id: item.id }).then((res) => {
if (!res.succeed) return; if (res.succeed) {
this.$u.toast("操作成功"); console.log("hotQuestionsDetail.....", res.data);
// 退 }
this.refreshPageWithFallback();
}); });
}, },
}, },