feat: 来对话列表的处理

This commit is contained in:
2025-07-29 20:21:43 +08:00
parent 0efc7fe6a0
commit 87a302b799
4 changed files with 45 additions and 13 deletions

View File

@@ -1,7 +1,7 @@
<template>
<view class="quick-access">
<view class="quick-access-scroll">
<view class="quick-access-item" v-for="(item, index) in itemList" :key="index" @click="sendReply(item.title)">
<view class="quick-access-item" v-for="(item, index) in itemList" :key="index" @click="sendReply(item)">
<image class="quick-access-item-bg" src="/static/quick/quick_icon_bg.png" mode="aspectFill"></image>
<view class="quick-access-item-title">
<image :src="item.icon"></image>
@@ -19,8 +19,8 @@
const emits = defineEmits(['replySent']);
const sendReply = (text) => {
emits('replySent', text); // 向父组件传递数据
const sendReply = (item) => {
emits('replySent', item); // 向父组件传递数据
}
onMounted(() => {
@@ -33,21 +33,25 @@
icon: '/static/quick/quick_icon_yuding.png',
title: '预定门票',
content: '快速预定天沐温泉门票',
type: 'Command.quickBooking'
},
{
icon: '/static/quick/quick_icon_find.png',
title: '探索发现',
content: '亲子、团建等更多玩法',
type: 'Command.discovery'
},
{
icon: '/static/quick/quick_icon_call.png',
title: '呼叫服务',
content: '加床、订麻将机...',
type: 'Command.createWorkOrder'
},
{
icon: '/static/quick/quick_icon_order.png',
title: '我的订单',
content: '快速查看订单',
type: 'MyOrder'
}
]
}