更新了AI页和我的页,一级页面都重构完成。
This commit is contained in:
@@ -146,6 +146,25 @@ Page({
|
||||
this.sendMessage()
|
||||
},
|
||||
|
||||
// 把常见问题清单作为一条 AI 消息铺进会话流(可随时唤起、可重复点选)
|
||||
showQuickQuestions() {
|
||||
const questions = this.data.quickQuestions || []
|
||||
if (!questions.length) return
|
||||
|
||||
const questionMessage = {
|
||||
id: `msg_${++this.messageIdCounter}`,
|
||||
type: 'ai',
|
||||
contentType: 'questions',
|
||||
content: questions,
|
||||
time: this.formatTime(new Date())
|
||||
}
|
||||
|
||||
const messages = [...this.data.messages, questionMessage]
|
||||
this.setData({ messages: messages })
|
||||
this.saveChatHistory(messages)
|
||||
this.scrollToBottom()
|
||||
},
|
||||
|
||||
sendMessage() {
|
||||
const content = this.data.inputValue.trim()
|
||||
if (!content) return
|
||||
|
||||
Reference in New Issue
Block a user