diff --git a/constant/constant.js b/constant/constant.js index 27d6b04..95d8eb5 100644 --- a/constant/constant.js +++ b/constant/constant.js @@ -2,4 +2,7 @@ export const SCROLL_TO_BOTTOM = 'SCROLL_TO_BOTTOM' // 推荐帖子 -export const RECOMMEND_POSTS_TITLE = 'RECOMMEND_POSTS_TITLE' \ No newline at end of file +export const RECOMMEND_POSTS_TITLE = 'RECOMMEND_POSTS_TITLE' + +// 发送命令 +export const SEND_COMMAND_TEXT = 'SEND_COMMAND_TEXT' \ No newline at end of file diff --git a/pages/chat/ChatMainList.vue b/pages/chat/ChatMainList.vue index 56aabf0..d6c81a8 100644 --- a/pages/chat/ChatMainList.vue +++ b/pages/chat/ChatMainList.vue @@ -79,7 +79,7 @@ import { ref } from 'vue' import { defineEmits } from 'vue' import { onLoad } from '@dcloudio/uni-app'; - import { SCROLL_TO_BOTTOM, RECOMMEND_POSTS_TITLE } from '@/constant/constant' + import { SCROLL_TO_BOTTOM, RECOMMEND_POSTS_TITLE, SEND_COMMAND_TEXT } from '@/constant/constant' import { MessageRole, MessageType, CompName } from '../../model/ChatModel'; import ChatTopWelcome from './ChatTopWelcome.vue'; @@ -269,6 +269,15 @@ handleReply(value) } }) + + uni.$on(SEND_COMMAND_TEXT, (value) => { + console.log('SEND_COMMAND_TEXT:', value) + if(value && value.length > 0) { + commonType = 'Command.quickBooking' + sendMessage(value, true) + setTimeoutScrollToBottom() + } + }) } /// 获取最近一次的会话id diff --git a/pages/module/banner/ActivityListComponent.vue b/pages/module/banner/ActivityListComponent.vue index ce1eccb..ea36fc3 100644 --- a/pages/module/banner/ActivityListComponent.vue +++ b/pages/module/banner/ActivityListComponent.vue @@ -8,7 +8,7 @@ :interval="interval" :duration="duration"> - + 快速预定 @@ -20,6 +20,7 @@