feat: always insert new welcome message when entering chat page

This commit is contained in:
Your Name 2026-04-01 14:38:08 +08:00
parent b4fea7b34f
commit 39223cad85

View File

@ -1259,6 +1259,22 @@ onLoad(async (op) => {
//
getHistoryMessages(1)
//
setTimeout(() => {
if (quickQuestionsData.value.length > 0) {
const welcomeMessage: Message = {
role: 'ai',
content: '您好!我是物业客服,有什么可以帮助您的吗?',
quickQuestions: quickQuestionsData.value,
created_at: new Date().toISOString()
}
messages.value.unshift(welcomeMessage)
console.log('[Customer] 每次进入页面都插入开场白消息')
scrollToBottom()
}
}, 100)
if(op?.message){
handleQuickAction(op as QuickAction)
}