From 11a86c59421c39a4b732cdec3ecb79803df8e0bb Mon Sep 17 00:00:00 2001 From: liuyalei Date: Tue, 19 Dec 2023 10:08:03 +0800 Subject: [PATCH] change --- src/views/IndexChat.vue | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/views/IndexChat.vue b/src/views/IndexChat.vue index 8e3a3f6..bdb36a0 100644 --- a/src/views/IndexChat.vue +++ b/src/views/IndexChat.vue @@ -289,13 +289,10 @@ let messagesCopy = reactive([ ]); const sendMessage = () => { - console.log("dddd", inputText.value) - /* setTimeout(() => { - console.log("inputText.value:", inputText.value); - }, 0); */ + if (inputText.value.trim()) { - console.log("sendMessage", inputText.value.trim()) + // console.log("sendMessage", inputText.value.trim()) messages.push({ id: Date.now(), text: inputText.value, isMe: true, type: 'txt' }); if (inputText.value.indexOf('导航') != -1 || inputText.value.indexOf('怎么走') != -1) { messagesCopy[10].id = Date.now(); @@ -315,15 +312,15 @@ const sendMessage = () => { messagesCopy[3].id = Date.now() + 1; messages.push(messagesCopy[2], messagesCopy[3]); } else { - messages.push({ id: Date.now(), text: '抱歉没听听懂 您可以尝试输入 最近总是头疼挂什么科室', isMe: false, type: 'txt' }); + messages.push({ id: Date.now(), text: '抱歉没听懂 您可以尝试输入 最近总是头疼挂什么科室', isMe: false, type: 'txt' }); } - console.log("messages", messages) + // console.log("messages", messages) scollToButtom(); inputText.value = ''; } } const goke = () => { - console.log("goke"); + // console.log("goke"); const insertWord = '您想看普通还是专家门诊?如有其他需求,也请告诉我' messagesCopy[11].id = Date.now(); messagesCopy[11].text = insertWord