This commit is contained in:
2025-07-25 16:18:33 +08:00
parent c09cbc3f01
commit a4c6140ed5
50 changed files with 2249 additions and 1599 deletions
+2 -2
View File
@@ -115,7 +115,7 @@ export const useDiaryStore = defineStore('diary', () => {
}
// 生成AI回复的辅助函数
const generateAIReply = (content: string, mood?: string) => {
const generateAIReply = (_content: string, mood?: string) => {
const replies = {
happy: [
'很高兴看到你心情愉快!继续保持这份美好的心情吧。',
@@ -134,7 +134,7 @@ export const useDiaryStore = defineStore('diary', () => {
]
}
const moodReplies = replies[mood as keyof typeof replies] || replies.neutral
const moodReplies = replies[(mood as keyof typeof replies) || 'neutral'] || replies.neutral
return moodReplies[Math.floor(Math.random() * moodReplies.length)]
}