diff --git a/src/App.vue b/src/App.vue
index 46136f9..503361e 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -1,7 +1,7 @@
@@ -38,9 +52,6 @@ let clickNum = (num, path) => {
* {
padding: 0px;
}
-
-
-
.bottom {
z-index: 999;
background-color: #fff !important;
diff --git a/src/views/IndexChat.vue b/src/views/IndexChat.vue
index 28fb464..8e3a3f6 100644
--- a/src/views/IndexChat.vue
+++ b/src/views/IndexChat.vue
@@ -156,9 +156,9 @@
推荐您可以挂神经内科,您还可根据自身偏好重新选择,继续为您推荐,如偏好因素不在其列,可继续提出您的需求。
@@ -207,7 +207,7 @@
- 预约
+ 预约
@@ -272,6 +272,7 @@ let inputText = ref('')
let messages = reactive([
]);
+let kearr = reactive([{ name: '神经内科', path: '' }, { name: '儿科', path: '' }, { name: '外科', path: '' }])
let messagesCopy = reactive([
{ id: 1, type: 'fstxt', text: '您可以点击下方快捷方式选择问题,或直接编辑问题发送给我哟', isMe: false },
{ id: 2, type: 'txt', text: '骨折去哪家医院', isMe: true },
@@ -284,6 +285,7 @@ let messagesCopy = reactive([
{ id: 9, type: 'card4', text: '为您推荐相关医生,也可选择查看更多医生。', isMe: false },
{ id: 10, type: 'txt', text: '人民医院怎么走', isMe: true },
{ id: 11, type: 'card5', text: '卡片5', isMe: false },
+ { id: 12, type: 'txt', text: '空白', isMe: false },
]);
const sendMessage = () => {
@@ -295,29 +297,43 @@ const sendMessage = () => {
if (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) {
- messagesCopy[2].id = Date.now();
- messagesCopy[3].id = Date.now()+1;
- messages.push(messagesCopy[2],messagesCopy[3]);
- } else if (inputText.value.indexOf('医生') != -1) {
- messagesCopy[4].id = Date.now();
- messagesCopy[5].id = Date.now()+1;
- messages.push(messagesCopy[4],messagesCopy[5]);
- }else if (inputText.value.indexOf('科室') != -1) {
- messagesCopy[7].id = Date.now();
- messagesCopy[8].id = Date.now()+1;
- messages.push(messagesCopy[7],messagesCopy[8]);
- }else if (inputText.value.indexOf('导航') != -1) {
+ if (inputText.value.indexOf('导航') != -1 || inputText.value.indexOf('怎么走') != -1) {
messagesCopy[10].id = Date.now();
messages.push(messagesCopy[10]);
- }else{
- messages.push({ id: Date.now(), text: '抱歉没听听懂 支持 医院 医生 科室 导航 关键词', isMe: false, type: 'txt' });
+ } else if (inputText.value.indexOf('医生') != -1) {
+ messagesCopy[4].id = Date.now();
+ messagesCopy[5].id = Date.now() + 1;
+ messages.push(messagesCopy[4], messagesCopy[5]);
+ } else if (inputText.value.indexOf('总是头疼') != -1) {
+ messagesCopy[7].id = Date.now();
+ messages.push(messagesCopy[7]);
+ } else if (inputText.value.indexOf('普通') != -1 || inputText.value.indexOf('专家') != -1) {
+ messagesCopy[8].id = Date.now();
+ messages.push(messagesCopy[8]);
+ } else if (inputText.value.indexOf('医院') != -1) {
+ messagesCopy[2].id = Date.now();
+ messagesCopy[3].id = Date.now() + 1;
+ messages.push(messagesCopy[2], messagesCopy[3]);
+ } else {
+ messages.push({ id: Date.now(), text: '抱歉没听听懂 您可以尝试输入 最近总是头疼挂什么科室', isMe: false, type: 'txt' });
}
console.log("messages", messages)
scollToButtom();
inputText.value = '';
}
}
+const goke = () => {
+ console.log("goke");
+ const insertWord = '您想看普通还是专家门诊?如有其他需求,也请告诉我'
+ messagesCopy[11].id = Date.now();
+ messagesCopy[11].text = insertWord
+ messages.push(messagesCopy[11]);
+ scollToButtom();
+};
+// 预约医生
+const bookDoctor = () => {
+ location.href = 'https://wx.nbgzjk.cn/#/home'
+};
const scollToButtom = () => {
nextTick(() => {
let chatForm = document.getElementById('chatform'); // 获取对象
@@ -1128,8 +1144,9 @@ onMounted(() => {
width: 16px;
height: 16px;
position: absolute;
- left: calc(100vw - 303px);
- ;
+ // left: calc(100vw - 303px);
+ left: 73px;
+
top: 22px;
z-index: 2;