This commit is contained in:
liuyalei 2023-12-07 15:25:31 +08:00
parent e2f99ccb31
commit b5c1d923dc
2 changed files with 186 additions and 13 deletions

BIN
src/assets/c1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

View File

@ -86,7 +86,12 @@
<div class="Left" v-if="!message.isMe"> <div class="Left" v-if="!message.isMe">
<div class="Left_mesg"> <div class="Left_mesg">
<div v-if="message.type == 'txt'" class="txt txt_l"> {{ message.text }}</div> <div v-if="message.type == 'txt'" class="txt txt_l"> {{ message.text }}</div>
<div v-else-if="message.type == 'card'" class="card"> <div v-else-if="message.type == 'fstxt'" class="txt txt_l">
<div style="font-weight: 600;font-size: 14px;">你好呀</div>
<div style="font-weight: 600;font-size: 14px;">我是你的智能生活助手~</div>
<div> 您可以点击下方快捷方式选择问题或直接编辑问题发送给我哟</div>
</div>
<div v-else-if="message.type == 'card1'" class="card">
<div class="main_card"> <div class="main_card">
<div class="card_top"> <div class="card_top">
<img src="../assets/5.png" alt=""> <img src="../assets/5.png" alt="">
@ -115,6 +120,44 @@
</div> </div>
</div> </div>
</div> </div>
<div v-else-if="message.type == 'card2'" class="card2">
<div class="main_card">
<div class="card_top">
<img src="../assets/c1.png" alt="">
<div class="desc">
<div class="name">
<span class="fullname">白亮</span>
<span class="workername">主任医师</span>
</div>
<div class="work_tag">
<span>象山县中医医院</span>
<div class="xie"></div>
<span>神经外科</span>
</div>
<!-- <div class="tag_wrp">
<div class="tag">医保定点</div>
<div style="width: 4px;"></div>
<div class="tag">医保定点</div>
</div> -->
<div class="detail"> 象山中医院建于1985年3月是一所集中医中西医结合医疗预防康复于一体的非...</div>
</div>
</div>
<div class="card_botm">
<div class="card_bt">换一家医院</div>
<div class="split_line"></div>
<div class="card_bt">帮我预约该医院</div>
</div>
</div>
<div class="prise_wrp">
<div class="prise">
<img src="../assets/1.png" alt="">
<div class="spl_line"></div>
<img src="../assets/2.png" alt="">
</div>
</div>
</div>
</div> </div>
</div> </div>
<div class="Right" v-else> <div class="Right" v-else>
@ -124,10 +167,7 @@
</div> </div>
</div> </div>
</div> </div>
<!-- <div v-for="(message, index) in messages" :key="message.id" class="message">
<div v-if="message.isMe">{{ message.text }}</div>
<div v-else>{{ message.text }}</div>
</div> -->
<div class="recomand"> <div class="recomand">
<div class="recomand_itm">公积金查询</div> <div class="recomand_itm">公积金查询</div>
<div class="recomand_itm">2024放假安排</div> <div class="recomand_itm">2024放假安排</div>
@ -141,7 +181,7 @@
<div class="w_icon"> <div class="w_icon">
<img src="../assets/4.png" alt=""> <img src="../assets/4.png" alt="">
</div> </div>
<div class="send" @click="sendMessage" @keyup.enter="sendMessage">发送</div> <div class="send" @click="sendMessage">发送</div>
</div> </div>
</div> </div>
@ -150,9 +190,12 @@
import { ref, reactive } from 'vue' import { ref, reactive } from 'vue'
let inputText = ref('') let inputText = ref('')
let messages = reactive([ let messages = reactive([
{ id: 1, type: 'txt', text: '您可以点击下方快捷方式选择问题,或直接编辑问题发送给我哟', isMe: false }, { id: 1, type: 'fstxt', text: '您可以点击下方快捷方式选择问题,或直接编辑问题发送给我哟', isMe: false },
{ id: 2, type: 'txt', text: 'Hi', isMe: true }, { id: 2, type: 'txt', text: '骨折去哪家医院', isMe: true },
{ id: 3, type: 'card', text: 'Hi', isMe: true }, { id: 3, type: 'card1', text: '基于您目前的地理位置、时间、医院号源等多种因素为您推荐如下结果。您还可根据自身偏好重新选择,继续为您推荐;如偏好因素不在其列,可继续提出您的需求。', isMe: false },
{ id: 4, type: 'txt', text: '基于号源等多种因素考虑,以下是相关医生推荐:', isMe: false },
{ id: 5, type: 'card2', text: '基:', isMe: false },
{ id: 6, type: 'txt', text: '最近总是头疼可以挂什么科室', isMe: true },
]); ]);
let sendMessage = () => { let sendMessage = () => {
console.log("dddd", inputText.value) console.log("dddd", inputText.value)
@ -205,7 +248,7 @@ let scollToButtom = () => {
padding-right: 59px; padding-right: 59px;
.Left_mesg { .Left_mesg {
margin-bottom: 16px; // margin-bottom: 16px;
} }
} }
@ -216,7 +259,7 @@ let scollToButtom = () => {
padding-left: 59px; padding-left: 59px;
.Right_mesg { .Right_mesg {
margin-bottom: 16px; // margin-bottom: 16px;
} }
} }
@ -281,6 +324,7 @@ let scollToButtom = () => {
font-weight: 500; font-weight: 500;
color: #333333; color: #333333;
line-height: 14px; line-height: 14px;
} }
.addr { .addr {
@ -292,6 +336,8 @@ let scollToButtom = () => {
margin: 8px 0px; margin: 8px 0px;
} }
.tag_wrp { .tag_wrp {
display: flex; display: flex;
@ -372,6 +418,132 @@ let scollToButtom = () => {
} }
.card2 {
width: 300px;
height: 210px;
.main_card {
border-radius: 16px;
background: #FFFFFF;
height: 165px;
.card_top {
display: flex;
padding: 16px;
box-sizing: border-box;
img {
width: 50px;
height: 50px;
border-radius: 5px;
margin-right: 12px;
}
.desc {
.name {
.fullname {
font-size: 14px;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
color: #333333;
line-height: 14px;
}
.workername {
font-size: 12px;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
color: #666666;
margin-left: 8px;
}
}
.work_tag {
font-size: 12px;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #999999;
display: flex;
align-items: center;
.xie {
width: 1px;
border: 1px solid #999999;
height: 12px;
margin: 0px 10px;
opacity: 0.5;
}
}
.detail {
font-size: 10px;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #999999;
line-height: 14px;
margin-top: 12px;
}
}
}
.card_botm {
border-top: 1px solid #F1F1F1;
display: flex;
align-items: center;
.card_bt {
height: 47px;
width: calc(50% - 1px);
color: #4379FF;
text-align: center;
line-height: 47px;
}
.split_line {
width: 1px;
height: 47px;
background-color: #F1F1F1;
}
}
}
.prise_wrp {
display: flex;
justify-content: end;
.prise {
width: 76px;
height: 28px;
background-color: #fff;
box-sizing: border-box;
padding: 6px 12px;
display: flex;
align-items: center;
margin-top: 8px;
// margin-right: -1px;
img {
width: 16px;
height: 16px;
}
.spl_line {
height: 12px;
width: 1px;
border: 1px solid #D6D6D6;
margin-left: 10px;
margin-right: 10px;
}
}
}
}
.txt { .txt {
min-height: 44px; min-height: 44px;
padding: 10px 16px; padding: 10px 16px;
@ -414,6 +586,7 @@ let scollToButtom = () => {
.message { .message {
/* width: 100%; /* width: 100%;
height: 100%; */ height: 100%; */
margin-bottom: 16px!important;
} }
} }