"use strict";const e=require("../../common/vendor.js"),t={__name:"detail",setup(t){const a=e.ref({id:1,hospitalName:"青岛镜湖医院",hospitalLogo:"/static/hospital/kiang-wu.jpg",hospitalAddress:"青岛连胜马路33号",departmentName:"心内科",departmentIcon:"/static/department/cardiology.png",doctorName:"张医生",doctorTitle:"主任医师",patientName:"张三",cardNo:"1234567890",status:"unpaid",statusText:"待支付",payTime:"2024-03-25 09:30:00",orderNo:"P202403250001",paymentMethod:"微信支付",items:[{name:"挂号费",desc:"普通门诊",amount:60},{name:"检查费",desc:"心电图检查",amount:180},{name:"药品费",desc:"处方药品",amount:120}],totalAmount:360,hasInvoice:!0}),o=e.computed(()=>{if("completed"!==a.value.status)return!1;const e=new Date(a.value.payTime).getTime();return Date.now()-e<=864e5}),u=e=>`/static/payment/status-${e}.png`,n=()=>{e.index.navigateTo({url:`/pages/hospital/detail?id=${a.value.hospitalId}`})},s=()=>{e.index.navigateTo({url:`/pages/payment/index?id=${a.value.id}`})},l=()=>{e.index.showModal({title:"申请退款",content:"确定要申请退款吗?",success:e=>{e.confirm&&console.log("申请退款:",a.value.id)}})},i=()=>{e.index.navigateTo({url:`/pages/payment/invoice?id=${a.value.id}`})};e.onMounted(()=>{var e,t;const a=getCurrentPages(),o=null==(t=null==(e=a[a.length-1].$page)?void 0:e.options)?void 0:t.id;d(o)});const d=e=>{console.log("加载缴费详情:",e)};return(t,d)=>{return e.e({a:e.t(a.value.statusText),b:e.t((v=a.value.status,{unpaid:"请在15分钟内完成支付",completed:"支付成功",refunded:"退款已完成"}[v]||"")),c:u(a.value.status),d:e.n(a.value.status),e:a.value.hospitalLogo,f:e.t(a.value.hospitalName),g:e.t(a.value.hospitalAddress),h:e.o(n),i:a.value.departmentIcon,j:e.t(a.value.departmentName),k:e.t(a.value.doctorName),l:e.t(a.value.doctorTitle),m:e.f(a.value.items,(t,a,o)=>({a:e.t(t.name),b:e.t(t.desc),c:e.t(t.amount),d:a})),n:e.t(a.value.totalAmount),o:e.t(a.value.patientName),p:e.t(a.value.cardNo),q:e.t(a.value.payTime),r:e.t(a.value.orderNo),s:e.t(a.value.paymentMethod),t:"unpaid"===a.value.status},"unpaid"===a.value.status?{v:e.t(a.value.totalAmount),w:e.o(s)}:"completed"===a.value.status?e.e({y:o.value},o.value?{z:e.o(l)}:{},{A:a.value.hasInvoice},a.value.hasInvoice?{B:e.o(i)}:{}):{},{x:"completed"===a.value.status,C:e.gei(t,"")});var v}}};wx.createPage(t);
|