From c7a0c84d699d727af04ad368e8909f352bfd8ace Mon Sep 17 00:00:00 2001 From: Your Name Date: Wed, 1 Apr 2026 11:33:03 +0800 Subject: [PATCH] feat: add QuickAction interface and quickActions data --- src/pages/ai/chat.vue | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/pages/ai/chat.vue b/src/pages/ai/chat.vue index 20f2ed0..6caf8ac 100644 --- a/src/pages/ai/chat.vue +++ b/src/pages/ai/chat.vue @@ -239,6 +239,12 @@ interface Message { } } +// 快捷按钮接口定义 +interface QuickAction { + label: string // 按钮显示文字 + message: string // 点击后发送的消息内容 +} + const auth = useWeAppAuthStore() const inputMessage = ref('') const selectedImages = ref([]) // 选中的图片 @@ -269,6 +275,14 @@ const currentOffset = ref(0) // 当前偏移量 const quickQuestionsData = ref([]) // 存储开场白数据 const lastMessageContent = ref('') // 用于防止重复显示相同的消息 +// 快捷按钮数据定义 +const quickActions: QuickAction[] = [ + { label: '我的账单', message: '请帮我查询我的账单信息' }, + { label: '我要报修', message: '我要报修' }, + { label: '工单查询', message: '请帮我查询我的工单' }, + { label: '社区服务', message: '请提供社区服务信息' } +] + // 获取开场白按钮数据 const getQuickQuestions = async () => { try {