import{d as y,P as C,U as A,V as z,j as a,w as F,A as s,bC as c,F as E,g as I,y as N}from"./ResizeObserver.es.b7226882.js";import{C as R}from"./index.9269bf1e.js";import{C as m}from"./index.40f703b6.js";import{I as g}from"./index.20c0f4c5.js";import{R as p,C as t}from"./index.af733095.js";import{C as Y}from"./index.969bba7f.js";import{T as L}from"./index.1743594f.js";import{s as e}from"./index.module.37c25674.js";import{o as h}from"./index.bd8c6150.js";import{i as P}from"./icon_member.4d7750c3.js";import"./index.1eaf642c.js";var j=y({name:"trade-detail",setup(){const v=C(),o=A({}),T=async l=>{var u;try{const i=I.platformType==="TEACHER"?"/api-teacher":"/api-student",f=(await N.get(`${i}/userOrder/detailByOrderNo/${v.query.orderNo}`,{hideLoading:l})).data||{};(u=f.orderDetailList)==null||u.forEach(r=>{const n=r.bizContent?JSON.parse(r.bizContent):{};if(n&&n.purchaseType){const b={MONTH:1,QUARTERLY:3,YEAR_HALF:6,YEAR:12};n.purchaseType==="DAY"?r.unit="\u5929":(r.unit="\u4E2A\u6708",r.bizInfo.bizValidTime=r.bizInfo.bizValidTime*b[n.purchaseType])}else r.unit="\u4E2A\u6708"}),o.value=f}catch{}};return z(()=>{T()}),()=>a("div",null,[a(L,null,{default:()=>[a(Y,{isFixed:!1,border:!1,color:"#131415"},null)]}),a("div",{class:e.tradeList},[a(R,{border:!1,class:e.orderDetailGroup},{default:()=>[a(m,{border:!1,title:F(o.value.createTime).format("YYYY-MM-DD HH:mm"),value:h[o.value.status],valueClass:e.tradeType},null),o.value.orderDetailList&&o.value.orderDetailList.map(l=>a(m,{border:!1,class:e.orderSection},{icon:()=>{var u;return a(g,{src:l.goodType==="VIP"?P:(u=l.bizInfo)==null?void 0:u.bizCover,class:e.tradeLogo},null)},title:()=>{var u,i,d;return a("div",{class:e.goodsSection},[a("div",{class:[e.title]},[a("span",{class:[e.name,"van-ellipsis"]},[(u=l.bizInfo)==null?void 0:u.bizName]),a("span",{class:e.desc},[s("\xA5"),c(l.actualPrice)])]),a("div",{class:e.description},[a("span",{class:[e.d,"van-ellipsis"]},[(i=l.bizInfo)==null?void 0:i.bizDesc]),l.goodType!=="VIP"&&a(E,null,[l.goodType==="TENANT_ALBUM"?a("span",{class:e.t},[s("x"),(d=l.bizInfo)==null?void 0:d.bizValidTime,l.unit]):a("span",{class:e.t},[s("\u6C38\u4E45")])])])])}})),a("div",{class:e.paymentPrice},[["PAYING","WAIT_PAY"].includes(o.value.status)?"\u9700\u4ED8\u6B3E":"\u5B9E\u4ED8\u6B3E",a("span",null,[a("i",null,[s("\xA5")]),c(o.value.actualPrice)])])]}),a("div",{class:e.optionGroup},[a(p,{class:e.optionRow},{default:()=>[a(t,{span:"8",offset:1},{default:()=>[s("\u8BA2\u5355\u53F7:")]}),a(t,{span:"14"},{default:()=>[o.value.orderNo]}),a(t,{span:"1"},{default:()=>[s(" ")]})]}),a(p,{class:e.optionRow},{default:()=>[a(t,{span:"8",offset:1},{default:()=>[s("\u4EA4\u6613\u6D41\u6C34\u53F7:")]}),a(t,{span:"14"},{default:()=>[o.value.transNo]}),a(t,{span:"1"},{default:()=>[s(" ")]})]}),a(p,{class:e.optionRow},{default:()=>[a(t,{span:"8",offset:1},{default:()=>[s("\u521B\u5EFA\u65F6\u95F4:")]}),a(t,{span:"14"},{default:()=>[o.value.createTime]}),a(t,{span:"1"},{default:()=>[s(" ")]})]}),a(p,{class:e.optionRow},{default:()=>[a(t,{span:"8",offset:1},{default:()=>[s("\u4ED8\u6B3E\u65F6\u95F4:")]}),a(t,{span:"14"},{default:()=>[o.value.payTime]}),a(t,{span:"1"},{default:()=>[s(" ")]})]})])])])}});export{j as default};