WXL
18 小时以前 05c363fdd7ab04e3bd9a753e2c5d5bfff04d681c
1
"use strict";const e=require("../../common/vendor.js"),t=require("../../common/assets.js");if(!Array){e.resolveComponent("uni-popup")()}Math;const o={__name:"chat",setup(o){const r=e.ref({avatar:"/static/doctor/avatar.jpg",name:"张医生",title:"主任医师",hospital:"青岛镜湖医院",specialty:"擅长:呼吸系统疾病、慢性病管理",price:50}),a=e.ref("/static/avatar/default.jpg"),i=e.ref([]),s=e.ref(0),c=e.ref(""),n=e.ref(!1),p=async()=>{c.value.trim()&&(i.value.push({type:"user",content:c.value}),c.value="",await e.nextTick$1(),u(),setTimeout(()=>{i.value.push({type:"doctor",content:"您好,根据您描述的症状...",prescription:{time:"2024-03-25 10:30",medicines:[{name:"阿莫西林胶囊",usage:"一次1粒,一日3次"},{name:"布洛芬缓释胶囊",usage:"一次1粒,必要时服用"}]}}),u()},1e3))},u=()=>{e.nextTick$1(()=>{const t=e.index.createSelectorQuery();t.select(".message-list").boundingClientRect(),t.exec(e=>{e[0]&&(s.value=e[0].height)})})};return(o,u)=>({a:r.value.avatar,b:e.t(r.value.name),c:e.t(r.value.title),d:e.t(r.value.hospital),e:e.t(r.value.specialty),f:e.t(r.value.price),g:e.f(i.value,(i,s,c)=>{var n,p,u;return e.e({a:"user"===i.type},"user"===i.type?e.e({b:e.t(i.content),c:null==(n=i.images)?void 0:n.length},(null==(p=i.images)?void 0:p.length)?{d:e.f(i.images,(t,r,a)=>({a:r,b:t,c:e.o(e=>o.previewImage(i.images,r),r)}))}:{},{e:i.report},i.report?{f:i.report.icon,g:e.t(i.report.name),h:e.t(i.report.time)}:{},{i:a.value}):e.e({j:r.value.avatar,k:(u=i.content,u.replace(/\n/g,"<br>")),l:i.prescription},i.prescription?{m:t._imports_0$14,n:e.f(i.prescription.medicines,(t,o,r)=>({a:e.t(t.name),b:e.t(t.usage),c:o})),o:e.t(i.prescription.time),p:e.o(e=>o.viewPrescription(i.prescription),s)}:{}),{q:s,r:e.n(i.type)})}),h:s.value,i:e.o((...e)=>o.loadMoreHistory&&o.loadMoreHistory(...e)),j:e.o((...e)=>o.chooseImage&&o.chooseImage(...e)),k:e.o((...e)=>o.chooseReport&&o.chooseReport(...e)),l:e.o((...e)=>o.recordVoice&&o.recordVoice(...e)),m:e.o((...e)=>o.onFocus&&o.onFocus(...e)),n:e.o((...e)=>o.onBlur&&o.onBlur(...e)),o:c.value,p:e.o(e=>c.value=e.detail.value),q:c.value?1:"",r:e.o(p),s:n.value?1:"",t:e.o((...e)=>o.startRecord&&o.startRecord(...e)),v:e.o((...e)=>o.stopRecord&&o.stopRecord(...e)),w:e.t(n.value?"松开结束":"按住开始"),x:e.sr("voicePopup","75937719-0"),y:e.p({type:"bottom"}),z:e.gei(o,"")})}};wx.createPage(o);