import{d as y,O as z,S as C,U as A,j as a,v as F,z as s,bz as c,F as E,g as I,x as N}from"./index.3bfa6a0e.js";import{C as R}from"./index.85c8c2f7.js";import{C as m}from"./index.79997a38.js";import{I as g}from"./index.0fd5538f.js";import{R as p,C as t}from"./index.bb2d59fe.js";import{C as Y}from"./index.645e7ddc.js";import{T as L}from"./index.52c97b40.js";import{s as e}from"./index.module.37c25674.js";import{o as h}from"./index.68f32c85.js";import{i as x}from"./icon_member.663cb792.js";import"./index.b1671445.js";import"./index.4a8093e5.js";var q=y({name:"trade-detail",setup(){const v=z(),o=C({}),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 A(()=>{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"?x:(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{q as default};
