"use strict";var t=require("../common/vendor.js"),o=require("../api/hospital.js"),s=require("../api/doctor.js");require("../common/request.js");const a={data:()=>({hospitalId:null,hospital:null,doctors:[]}),onLoad(t){this.hospitalId=t.hospitalId,this.getHospitalById(),this.getDoctorList()},methods:{goMap(){t.index.openLocation({latitude:parseFloat(this.hospital.lat),longitude:parseFloat(this.hospital.lng),scale:18,name:this.hospital.hospitalName,address:this.hospital.address,success:()=>{console.log("导航success")}})},getHospitalById(){var s={hospitalId:this.hospitalId};o.getHospitalById(s).then((o=>{200==o.code?this.hospital=o.data:t.index.showToast({icon:"none",title:"请求失败"})}))},getDoctorList(){var o={hospitalId:this.hospitalId,pageNum:1,pageSize:10};s.getDoctorList(o).then((o=>{200==o.code?(o.data.list.forEach((function(t,o,s){t.prices=JSON.parse(t.priceJson)})),this.doctors=o.data.list):t.index.showToast({icon:"none",title:"请求失败"})}))},navTo(o){t.index.navigateTo({url:o})}}};var e=t._export_sfc(a,[["render",function(o,s,a,e,i,d){return t.e({a:i.hospital.imgUrl,b:t.t(i.hospital.hospitalName),c:t.t(i.hospital.hospitalType),d:t.t(i.hospital.address),e:t.o((t=>d.goMap())),f:t.t(i.hospital.descs),g:i.doctors.length>0},i.doctors.length>0?{h:t.f(i.doctors,((o,s,a)=>({a:o.avatar,b:t.t(o.doctorName),c:t.t(o.position),d:t.t(o.hospitalName),e:t.t(o.deptName),f:t.t(o.speciality),g:t.t(o.pingStar),h:t.t(o.orderNumber),i:t.f(o.prices,((o,s,a)=>t.e({a:t.t(o.price.toFixed(2)),b:0==s},{}))),j:t.o((t=>d.navTo("/pages/doctor/doctorDetails?doctorId="+o.doctorId)))})))}:{})}],["__scopeId","data-v-0889513c"]]);wx.createPage(e);
