feat: 预定组件对接
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
<template v-if="item.msgType === MessageRole.AI">
|
||||
<ChatCardAI class="message-item-ai" :text="item.msg">
|
||||
<template v-if="item.toolCall">
|
||||
<QuickBookingComponent v-if="item.toolCall.componentName === 'createWorkOrderCard'" />
|
||||
<QuickBookingComponent v-if="item.toolCall.componentName === 'quickBookingCard'" />
|
||||
</template>
|
||||
</ChatCardAI>
|
||||
</template>
|
||||
@@ -91,6 +91,7 @@
|
||||
import { mainPageData } from '../../request/api/MainPageData';
|
||||
import { conversationMsgList } from '../../request/api/ConversationMsgList';
|
||||
import { recentConversation } from '../../request/api/RecentConversation';
|
||||
import { SCROLL_TO_BOTTOM } from '../../constant/constant'
|
||||
|
||||
/// 导航栏相关
|
||||
const statusBarHeight = ref(20);
|
||||
@@ -207,8 +208,17 @@
|
||||
getMainPageData()
|
||||
await loadRecentConversation()
|
||||
loadConversationMsgList()
|
||||
addNoticeListener()
|
||||
})
|
||||
|
||||
const addNoticeListener = () => {
|
||||
uni.$on(SCROLL_TO_BOTTOM, (value) => {
|
||||
setTimeout(() => {
|
||||
scrollToBottom()
|
||||
}, 200)
|
||||
})
|
||||
}
|
||||
|
||||
/// 获取最近一次的会话id
|
||||
const loadRecentConversation = async() => {
|
||||
const res = await recentConversation()
|
||||
|
||||
Reference in New Issue
Block a user