1 |
- import{g as u,d as m,P as ne,Q as ie,V as G,j as e,M as w,z as a,bz as z,B as W,D as E,w as P,n as Z,T as j,b0 as le,f as D,F as U,u as R,Z as ce,S as ue,a2 as de,U as pe,W as me,X as ye,y as he,aR as H}from"./index.394decd7.js";import{C as _e}from"./index.7ad13071.js";import{C as fe}from"./index.d66a5072.js";import{U as ve}from"./index.39e45819.js";import{i as be,a as ge,P as Te}from"./index.2569f88d.js";import{C as l}from"./index.9e0d46e4.js";import{C as T}from"./index.9462d7c5.js";import{R as Ce,a as B}from"./index.4ef31a7f.js";import"./index.b91a923c.js";import{u as Q}from"./hooks.9e5ee122.js";import{a as X,i as J}from"./icon_checkbox_default.2fe5d57e.js";import{a as M}from"./icon_checkbox-tenant.ecfa11df.js";import{C as Ie}from"./index.e6e212d8.js";import{o as n,b as Ae,c as Oe,d as Pe,r as je}from"./orderStatus.535346ee.js";import{I as b}from"./index.ae2dd816.js";import{i as F}from"./icon_teacher.40b6f077.js";import{C as Y,a as $}from"./index.d5d6d341.js";import{i as Le}from"./icon_member.663cb792.js";import{T as Ve}from"./index.dab716ce.js";import{g as Se}from"./tradeOrder.ba7e9856.js";import{U as ze}from"./index.e98d90c3.js";import{i as xe,b as we}from"./browser.8379baf6.js";import"./index.24fb4ee4.js";import"./index.6726afc4.js";import"./index.a9c78aa8.js";import"./index.224299a1.js";import"./use-id.e2f22365.js";import"./index.4c43caee.js";import"./index.68f32c85.js";import"./item.2362e6e9.js";const Ne="_tips_1lbdq_6",ke="_paymentInfo_1lbdq_31",Ee="_protocol_1lbdq_37",Ue="_protocolTenant_1lbdq_41",Fe="_btnGroup_1lbdq_48",qe="_priceSection_1lbdq_58",Ge="_price_1lbdq_58",De="_priceUnit_1lbdq_71",Re="_btnTenant_1lbdq_74",He="_qrcodePopup_1lbdq_82";var y={"order-detail":"_order-detail_1lbdq_1",tips:Ne,paymentInfo:ke,protocol:Ee,protocolTenant:Ue,btnGroup:Fe,priceSection:qe,price:Ge,priceUnit:De,btnTenant:Re,qrcodePopup:He};const Be="_payment_y6th3_1",Qe="_boxStyle_y6th3_31",Xe="_title_y6th3_37",Je="_payAmount_y6th3_45",Me="_amount_y6th3_55",Ke="_blank_y6th3_64",We="_payTypeRe_y6th3_67",Ze="_recommend_y6th3_75",Ye="_payBtn_y6th3_84",$e="_tenantPayBtn_y6th3_91";var f={payment:Be,boxStyle:Qe,title:Xe,payAmount:Je,amount:Me,blank:Ke,payTypeRe:We,recommend:Ze,payBtn:Ye,tenantPayBtn:$e};const K=u.platformType==="TEACHER"?"/api-teacher":"/api-student";var et=m({name:"payment",props:{modelValue:{type:Boolean,default:!1},paymentConfig:{type:Object,default:()=>({})},paymentVendor:{type:String,default:""},paymentChannels:{type:Array,default:()=>[]}},emits:["backOut","close","confirm","update:modelValue"],setup(t,{emit:r}){const i=ne(),s=ie({payType:"wx",pay_channel:""}),d=()=>{E.confirm({message:"\u662F\u5426\u653E\u5F03\u672C\u6B21\u4ED8\u6B3E",confirmButtonText:"\u7EE7\u7EED\u4ED8\u6B3E",cancelButtonText:"\u653E\u5F03"}).then(()=>{}).catch(async()=>{Q("\u53D6\u6D88\u652F\u4ED8"),await ee(),r("close"),Q("\u53D6\u6D88\u652F\u4ED8")})},g=G(()=>{var p;if(t.paymentVendor==="yeepay"||t.paymentVendor==="adapay")return!0;const o=(p=t.paymentChannels)==null?void 0:p.join(",");return!!(o&&o.indexOf("wxpay")!==-1)}),_=G(()=>{var p;if(t.paymentVendor==="yeepay"||t.paymentVendor==="adapay")return!0;const o=(p=t.paymentChannels)==null?void 0:p.join(",");return!!(o&&o.indexOf("alipay")!==-1)}),ee=async o=>{try{await P.post(K+"/userOrder/orderCancel",{data:{orderNo:t.paymentConfig.orderNo}})}catch{}r("update:modelValue",!1),!o&&i.go(-1),r("backOut")},te=async()=>{t.paymentVendor&&(t.paymentVendor.indexOf("wxpay")>-1||t.paymentVendor.indexOf("alipay")>-1)?re():ae()},re=async()=>{try{const o=s.payType==="zfb"?"ali_app":"wx_app";console.log(t.paymentConfig,"paymentConfig");let p=t.paymentVendor;t.paymentChannels.forEach(C=>{s.payType==="zfb"&&C.indexOf("alipay")!==-1&&(p=C),s.payType==="wx"&&C.indexOf("wxpay")!==-1&&(p=C)});const oe={merOrderNo:t.paymentConfig.orderNo,paymentChannel:o,paymentVendor:p},q=await P.post(K+"/userOrder/executePayment/v2",{data:{...oe}});Z({api:"paymentOrder",content:{orderNo:t.paymentConfig.orderNo,payChannel:o,payInfo:q.data.reqParams.body||JSON.stringify(q.data.reqParams)}}),j.loading({message:"\u652F\u4ED8\u4E2D...",forbidClick:!0,duration:3e3,loadingType:"spinner"}),j.clear(),r("update:modelValue",!1),le("paymentOperation",C=>{console.log(C,"init paymentOperation"),se(C==null?void 0:C.content)})}catch(o){console.log(o)}},se=o=>{if(console.log(o,"paymentOperation"),o.status==="success"||o.status==="error")j.clear(),r("update:modelValue",!1),i.replace({path:"/tradeDetail",query:{orderNo:t.paymentConfig.orderNo}});else if(o.status==="cancel")j.clear(),r("update:modelValue",!1);else if(o.status==="fail"){const p=s.payType==="zfb"?"\u60A8\u5C1A\u672A\u5B89\u88C5\u652F\u4ED8\u5B9D":"\u60A8\u5C1A\u672A\u5B89\u88C5\u5FAE\u4FE1";E.alert({title:"\u63D0\u793A",message:p}).then(()=>{j.clear(),r("update:modelValue",!1)})}},ae=()=>{const o=s.payType;D().weixin?o=="zfb"?(s.pay_channel="alipay_qr",x("qrCode")):o=="wx"&&(s.pay_channel="wx_pub",x("pay")):D().alipay?o=="zfb"?(s.pay_channel="alipay_wap",x("pay")):o=="wx"&&(s.pay_channel="wx_pub",x("qrCode")):(o=="zfb"?s.pay_channel="alipay_qr":o=="wx"&&(s.pay_channel="wx_pub"),x("qrCode"))},x=o=>{const p=o=="qrCode"?"payCenter":"payResult";r("confirm",{payCode:p,pay_channel:s.pay_channel})};return()=>e("div",{class:f.payment},[e(w,{onClick:d,name:"cross",size:20},null),e("div",{class:[f.title]},[a("\u9009\u62E9\u652F\u4ED8\u65B9\u5F0F")]),e("div",{class:f.payAmount},[e("p",null,[a("\u5E94\u4ED8\u91D1\u989D")]),e("div",{class:f.amount},[e("span",null,[a("\uFFE5")]),z(t.paymentConfig.actualPrice)])]),e(Ce,{modelValue:s.payType,"onUpdate:modelValue":o=>s.payType=o},{default:()=>[e(T,{border:!1},{default:()=>[g.value&&e(l,{border:!0,center:!0,onClick:()=>{s.payType="wx"}},{icon:()=>e(w,{name:be,size:18},null),"right-icon":()=>e(B,{name:"wx"},{icon:o=>e(w,{class:f.boxStyle,name:o.checked?u.projectType==="tenant"?M:X:J},null)}),title:()=>e("div",{class:f.payTypeRe},[a("\u5FAE\u4FE1\u652F\u4ED8 "),e("span",{class:f.recommend},[a("\u63A8\u8350")])])}),_.value&&e(l,{title:"\u652F\u4ED8\u5B9D\u652F\u4ED8",border:!0,center:!0,onClick:()=>{s.payType="zfb"}},{icon:()=>e(w,{name:ge,size:18},null),"right-icon":()=>e(B,{name:"zfb"},{icon:o=>e(w,{class:f.boxStyle,name:o.checked?u.projectType==="tenant"?M:X:J},null)})})]})]}),e("div",{class:f.blank},null),e(W,{type:"primary",class:[f.payBtn,u.projectType==="tenant"&&f.tenantPayBtn],block:!0,round:!0,onClick:te},{default:()=>[a("\u786E\u8BA4\u652F\u4ED8")]})])}});const tt="_videoOrder_50lha_1",rt="_tag_50lha_1",st="_title_50lha_12",at="_titleSong_50lha_17",ot="_teacher_50lha_21",nt="_price_50lha_27",it="_userLogo_50lha_37",lt="_classItem_50lha_43",ct="_time_50lha_49",ut="_line_50lha_55",dt="_img_50lha_69",pt="_titleClass_50lha_76",mt="_labelClass_50lha_81";var c={videoOrder:tt,tag:rt,title:st,titleSong:at,teacher:ot,price:nt,userLogo:it,classItem:lt,time:ct,line:ut,img:dt,titleClass:pt,labelClass:mt},yt=m({name:"OrderVideo",props:{item:{type:Object,default:{}}},computed:{album(){const t=this.item.courseInfo||[],r=[];return t.map(i=>{i.musicAlbumInfos&&i.musicAlbumInfos.map(s=>{s.relationType==="ALBUM"&&r.findIndex(g=>g.musicAlbumId===s.musicAlbumId)===-1&&r.push(s)})}),this.item.relationType==="GIFT"?[...r]:[]},music(){const t=this.item.courseInfo||[],r=[];return t.map(i=>{i.musicAlbumInfos&&i.musicAlbumInfos.map(s=>{s.relationType==="MUSIC"&&r.findIndex(g=>g.musicAlbumId===s.musicAlbumId)===-1&&r.push(s)})}),this.item.relationType==="GIFT"?[...r]:[]}},render(){const t=this.item;return console.log(t),e("div",{class:c.videoOrder},[e(T,{border:!1},{default:()=>[e(l,{center:!0},{title:()=>e("div",{class:[c.title,"van-ellipsis"]},[e("span",{class:c.tag},[a("\u89C6\u9891\u8BFE")]),t.courseGroupName])}),e(l,{center:!0,title:t.teacherName,titleClass:c.teacher},{icon:()=>e(b,{class:c.userLogo,src:t.avatar||F},null),default:()=>e("span",{class:c.price},[e("i",null,[a("\xA5")]),z(t.coursePrice)])})]}),this.album.length>0&&e(T,{border:!1},{default:()=>[e(l,{center:!0},{title:()=>e("div",{class:[c.title,"van-ellipsis"],style:{display:"flex",alignItems:"center"}},[e("span",{class:c.line},null),a("\u9644\u5E26\u4E13\u8F91")]),value:()=>e("span",{class:c.titleSong},[a("\xB7 \u8D60\u9001")])}),this.album.map(r=>e(l,{center:!0,title:r.name,titleClass:c.titleClass,label:r.remark||"",labelClass:[c.labelClass,"van-ellipsis"]},{icon:()=>e(b,{src:r.cover,class:c.img},null)}))]}),this.music.length>0&&e(T,{border:!1},{default:()=>[e(l,{center:!0},{title:()=>e("div",{class:[c.title,"van-ellipsis"],style:{display:"flex",alignItems:"center"}},[e("span",{class:c.line},null),a("\u9644\u5E26\u4E50\u8C31")]),value:()=>e("span",{class:c.titleSong},[a("\xB7 \u8D60\u9001")])}),this.music.map(r=>e(l,{center:!0,title:r.name,titleClass:c.titleClass,label:"\u4F5C\u8005\uFF1A"+(r.remark||""),labelClass:[c.labelClass,"van-ellipsis"]},{icon:()=>e(b,{src:r.cover,class:c.img},null)}))]})])}});const ht="_liveOrder_12rl8_1",_t="_tag_12rl8_1",ft="_title_12rl8_12",vt="_collapseItem_12rl8_17",bt="_teacher_12rl8_22",gt="_price_12rl8_28",Tt="_userLogo_12rl8_38",Ct="_classItem_12rl8_44",It="_time_12rl8_49";var I={liveOrder:ht,tag:_t,title:ft,collapseItem:vt,teacher:bt,price:gt,userLogo:Tt,classItem:Ct,time:It},At=m({name:"OrderLive",props:{item:{type:Object,default:{}}},data(){return{collapse:[1]}},render(){const t=this.item;return e("div",{class:I.liveOrder},[e(T,{border:!1},{default:()=>[e(l,{center:!0},{title:()=>e("div",{class:[I.title,"van-ellipsis"]},[e("span",{class:I.tag},[a("\u76F4\u64AD\u8BFE")]),t.courseGroupName])}),e(l,{center:!0,border:!1,title:t.teacherName,titleClass:I.teacher},{icon:()=>e(b,{class:I.userLogo,src:t.avatar||F},null),default:()=>e("span",{class:I.price},[e("i",null,[a("\xA5")]),z(t.coursePrice)])}),e(l,{border:!1},{default:()=>[e(Y,{border:!1,modelValue:this.collapse,"onUpdate:modelValue":r=>this.collapse=r},{default:()=>[e($,{title:"\u8BFE\u7A0B\u8BE6\u60C5",name:1,class:I.collapseItem},{default:()=>[e("div",{class:I.classItem},[t.courseInfo.map(r=>e("div",{class:I.time},[r.courseTime]))])]})]})]})]})])}});const Ot="_videoOrder_1rdsx_1",Pt="_tag_1rdsx_1",jt="_title_1rdsx_12",Lt="_collapseItem_1rdsx_17",Vt="_teacher_1rdsx_22",St="_price_1rdsx_28",zt="_userLogo_1rdsx_38",xt="_classItem_1rdsx_44",wt="_time_1rdsx_49";var A={videoOrder:Ot,tag:Pt,title:jt,collapseItem:Lt,teacher:Vt,price:St,userLogo:zt,classItem:xt,time:wt},Nt=m({name:"OrderPractice",props:{item:{type:Object,default:{}}},data(){return{collapse:[1]}},render(){const t=this.item;return console.log(t.classTime),e("div",{class:A.videoOrder},[e(T,{border:!1},{default:()=>[e(l,{center:!0},{title:()=>e("div",{class:[A.title,"van-ellipsis"]},[e("span",{class:A.tag},[a("\u966A\u7EC3\u8BFE")]),t.courseGroupName])}),e(l,{center:!0,border:!1,title:t.teacherName,titleClass:A.teacher},{icon:()=>e(b,{class:A.userLogo,src:t.avatar||F},null),default:()=>e(U,null,[e("span",{class:A.price},[e("i",null,[a("\xA5")]),z(t.coursePrice)]),a("/"),t.classTime.length,a("\u8BFE\u65F6")])}),e(l,{border:!1},{default:()=>[e(Y,{border:!1,modelValue:this.collapse,"onUpdate:modelValue":r=>this.collapse=r},{default:()=>[e($,{title:"\u8BFE\u7A0B\u8BE6\u60C5",name:1,class:A.collapseItem},{default:()=>[e("div",{class:A.classItem},[t.classTime.map(r=>{const i=`${r.classDate} ${R(r.startTime).format("HH:mm")}-${R(r.endTime).format("HH:mm")}`;return e("div",{class:A.time},[i])})])]})]})]})]})])}});const kt="_memberLogo_pgeia_1",Et="_container_pgeia_5",Ut="_titleClass_pgeia_8",Ft="_title_pgeia_8",qt="_price_pgeia_18",Gt="_timerTitle_pgeia_30",Dt="_timer_pgeia_30",Rt="_timerCell_pgeia_45",Ht="_cellGroup_pgeia_55",Bt="_cellGroupTimer_pgeia_59";var h={memberLogo:kt,container:Et,titleClass:Ut,title:Ft,price:qt,timerTitle:Gt,timer:Dt,timerCell:Rt,cellGroup:Ht,cellGroupTimer:Bt},Qt=m({name:"OrderVideo",props:{item:{type:Object,default:{}}},render(){const t=this.item;return e("div",{class:h.videoOrder},[e(T,{class:["mb12",h.cellGroup],border:!1},{default:()=>[e(l,{titleClass:h.titleClass},{icon:()=>e(b,{class:h.memberLogo,src:Le},null),title:()=>e("div",{class:h.container},[e("div",{class:h.title},[a("\u5C0F\u9177Ai"),t.title]),e("div",{class:h.price},[e("i",null,[a("\xA5")]),this.$filters.moneyFormat(t.price)])])})]}),e(T,{class:["mb12",h.cellGroup,h.cellGroupTimer],border:!1},{default:()=>[e(l,{center:!0},{title:()=>e("div",{class:h.timerCell},[e("div",{class:h.timerTitle},[e("span",{style:{paddingLeft:"5px"}},[a("\u751F\u6548\u65F6\u95F4")])]),e("div",{class:h.timer},[t.startTime,a(" \u81F3 "),t.endTime])])})]})])}}),Xt="./assets/music-icon.fd0e8ce9.png";const Jt="_item_zkj4k_1",Mt="_header_zkj4k_8",Kt="_mate_zkj4k_12",Wt="_icon_zkj4k_16",Zt="_info_zkj4k_22",Yt="_btn_zkj4k_38",$t="_vip_zkj4k_46",er="_free_zkj4k_50",tr="_charge_zkj4k_54",rr="_tags_zkj4k_58",sr="_footer_zkj4k_72",ar="_user_zkj4k_78",or="_userIcon_zkj4k_83",nr="_favorite_zkj4k_88";var O={item:Jt,header:Mt,mate:Kt,icon:Wt,info:Zt,btn:Yt,vip:$t,free:er,charge:tr,tags:rr,footer:sr,user:ar,userIcon:or,favorite:nr};function ir(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!ce(t)}var lr=m({name:"OrderMusic",props:{item:{type:Object,default:{}}},render(){const t=this.item;return e("div",{class:O.item},[e("header",{class:O.header},[e("div",{class:O.mate},[e(b,{src:t.titleImg||Xt,class:O.icon},null),e("div",{class:O.info},[e("h4",null,[t.musicSheetName]),e("p",null,[t.composer]),e("div",{class:O.tags},[(t.subjectNames||"").split(",").map(r=>e(Ve,null,ir(r)?r:{default:()=>[r]}))])])]),e("div",{class:O.buttons},null)])])}});const cr="_memberLogo_1ki51_1",ur="_titleClass_1ki51_5",dr="_title_1ki51_5",pr="_price_1ki51_14",mr="_timerTitle_1ki51_25",yr="_timer_1ki51_25",hr="_timerCell_1ki51_39";var L={memberLogo:cr,titleClass:ur,title:dr,price:pr,timerTitle:mr,timer:yr,timerCell:hr},_r="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGoAAABkCAMAAABZ9VXVAAACQ1BMVEUAAAD/v33/////2Yr/vHL/7t7/9N//7Nj/w4H/wHr/7t3/8OL/69b/wX7/vHP/vnj/793/7uD/v3r/8OP/6dL/7+H/v3j/vnf/6dL/v3j/vHb/8OP/6NP/w4H/vHP/7+D/woH/vX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8o2OQinnXuWnhvf9Fo3XTuTOp4A9+SfSoH0vwwAAAAABJRU5ErkJggg==",fr=m({name:"OrderPinao",props:{item:{type:Object,default:{}}},render(){const t=this.item;return console.log(t),e("div",{class:L.videoOrder},[e(T,{class:"mb12",border:!1,style:{borderRadius:"8px"}},{default:()=>[e(l,{center:!0,titleClass:L.titleClass},{icon:()=>e(b,{class:L.memberLogo,src:_r},null),title:()=>e("div",{class:L.container},[e("div",{class:L.title},[t.times,a("\u5206\u949F\u7434\u623F\u65F6\u957F")]),e("div",{class:L.price},[e("i",null,[a("\xA5")]),this.$filters.moneyFormat(t.salePrice)])])})]})])}});const vr="_liveOrder_w4wdr_1",br="_tag_w4wdr_1",gr="_title_w4wdr_12",Tr="_collapseItem_w4wdr_17",Cr="_line_w4wdr_22",Ir="_teacher_w4wdr_31",Ar="_price_w4wdr_42",Or="_userLogo_w4wdr_52",Pr="_classItem_w4wdr_58",jr="_time_w4wdr_63";var V={liveOrder:vr,tag:br,title:gr,collapseItem:Tr,line:Cr,teacher:Ir,price:Ar,userLogo:Or,classItem:Pr,time:jr},Lr="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFQAAABUCAMAAAArteDzAAACJVBMVEUAAAD/gDf/rHr/fTX/rH7/fjH/t4P/fTP/mFP/qlX/VQD/u4//jUv/p3L/sID/gTv/div/uY3/cSL/vJD/lln/lln/ei//soH/fDL/u5D/nmX/jk3/ciP/sYH/uIv/hD//dCn/omv/ezL/cyb/sIH/u4//o2v/i0j/cyX/tIP/dCn/lln/sH3/ejT/t5D/fTT/ciT/vJH/l1r/llj/uY3/iEX/cyb/mFv/lVj/cSL/n2b/jkz/vJH/cCL/sYH/tof/rHn/gTv/fjX/ei//p3L/qXT/ciP/cyf/nGH/cCP/r3z/tIb/nWL/kFH/gj3/gTn/vpH/vJH/vI//pG7/o2v/nGL/ml7/l1r/p3L/gTr/fTX/qXX/h0P/n2b/fDL/hD7/fzf/lFb/iUb/tYf/rn3/i0n/eS7/jU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h4SG4JQvQwSdzPvz/XZMVQxs0J3mVfGPOjKpAFRa9rtCvx9LQdPUTAHyfyRqXJVmbGy3M2FJ7iKzo2Vb4BPdAY93WW7bW733EXhol7+REWjLtQw3m3rmj4+6hWiQbXkfR2j2WbTbbdHcb3CSLs6DJqiwN4SP0urRYfFVbBv1DO7IhaV2+37WQFoj06GnfYq6Lu9ZdHyOKL7hQXO6KkwGeu65Dssc0KgGgpuo8P2c6jxeKuuWFHnSQ0cbS3iP7Hvf4cOQLFnZIKRKHpvHMLO6eL+wTQj7NibKf7PuxUb5NtQnOQiu1TPENEILbbr7rmibLraGyvANo4/Fca/bs2CERxAH9yyMktioM4OIguIoRkCmTIkAQSsiRTCZehSIdOIYMkCA5OFhz6Z7RLC/0be2AiGu/8ET9w732P94aDUxO+09f9qcznzzlppspQsqMi59+P/Kf+vg+UL2HytIMysqBip5fr9fBG2y0IVCCVMkEgMcENpeXUPlcRPNhLwUDSHmqc40AO1JHlcZAlAQ7FfB3AVIALG/z9OC6icG5gEMBm/CQTg5Cyeq+J4/KNP18p0IA4xXIUlbs4s+4QaOZrUU+aD62QcbmJokplJ8/VuYGgA+Jql5o0raSC5hLoRrbTjmwZuhvZadgqtUfQz3gzDRtNN2PoD3tWmGVZyEouZO7J8jA8SfbWelajrz0ZhkG+u7Xm+mwymelza+v6CNr8AxUNQ4kURe08AAAAAElFTkSuQmCC",Vr=m({name:"OrderLive",props:{item:{type:Object,default:{}}},data(){return{collapse:[1]}},render(){const t=this.item;return e("div",{class:V.liveOrder},[e(T,{border:!1},{default:()=>[e(l,{center:!0},{title:()=>e("div",{class:[V.title,"van-ellipsis"]},[e("span",{class:V.line},null),a("\u6D3B\u52A8\u62A5\u540D")])}),e(l,{center:!0,border:!1,title:t.goodsName,titleClass:V.teacher},{icon:()=>e(b,{class:V.userLogo,src:Lr},null),default:()=>e("span",{class:V.price},[e("i",null,[a("\xA5")]),z(t.actualPrice)])})]})])}});const Sr="_album_sw8i4_1",zr="_albumType_sw8i4_9",xr="_img_sw8i4_21",wr="_content_sw8i4_34",Nr="_footer_sw8i4_50",kr="_icon_sw8i4_71";var N={album:Sr,albumType:zr,img:xr,content:wr,footer:Nr,icon:kr},Er=m({name:"OrderMusic",props:{item:{type:Object,default:{}}},render(){const t=this.item;return e("div",{class:N.album},[e(b,{class:N.img,src:t.albumCoverUrl},null),t.paymentType==="CHARGE"&&e("span",{class:N.albumType},[a("\u4ED8\u8D39")]),e("div",{class:N.content},[e("h4",{class:"van-ellipsis"},[t.albumName]),e("p",{class:"van-multi-ellipsis--l2"},[t.albumDesc]),e("div",{class:N.footer},[e("span",null,[t.musicSheetCount,a("\u9996")]),e("span",null,[t.albumFavoriteCount,a("\u4EBA\u6536\u85CF")])])])])}});const Ur="_saveShareImage_r51oz_1",Fr="_tips_r51oz_8",qr="_tipsTitle_r51oz_14",Gr="_tipsContent_r51oz_20",Dr="_iconLogo_r51oz_26",Rr="_schoolName_r51oz_33",Hr="_previewSection_r51oz_48",Br="_topImage_r51oz_55",Qr="_shareSection_r51oz_62",Xr="_shareContaienr_r51oz_70",Jr="_shareType_r51oz_74",Mr="_qrcodeSection_r51oz_84",Kr="_memo_r51oz_92";var v={saveShareImage:Ur,tips:Fr,tipsTitle:qr,tipsContent:Gr,iconLogo:Dr,schoolName:Rr,previewSection:Hr,topImage:Br,shareSection:Qr,shareContaienr:Xr,shareType:Jr,qrcodeSection:Mr,memo:Kr};const Wr="_qrcode_izshm_1",Zr="_qrcodeCanvas_izshm_4",Yr="_qrcodeLogo_izshm_8",$r="_small_izshm_18";var k={qrcode:Wr,qrcodeCanvas:Zr,qrcodeLogo:Yr,small:$r},es=m({props:{text:{type:String,default:""},size:{type:String,default:"200px"},logoSize:{type:String,default:"default"}},setup(t){const r=ue(),i=()=>{we.toCanvas(r.value,t.text,{margin:1},s=>{s&&console.log(s),console.log("success")})};return de(()=>t.text,()=>{i()}),pe(()=>{me(()=>{i()})}),()=>e("div",{class:k.qrcode,style:{width:t.size,height:t.size}},[e("canvas",{ref:r,class:k.qrcodeCanvas},null),e("img",{src:xe,class:[k.qrcodeLogo,t.logoSize==="small"&&k.small]},null)])}}),ts="./assets/icon-logo.4dc927fa.png",rs=m({name:"qrcode-payment",props:{url:{type:String,default:""},pay_channel:{type:String,default:"wx_pub"}},setup(t){return()=>e("div",{class:[v.saveShareImage]},[e("div",{style:{overflow:"hidden"}},[e("div",{class:v.schoolName},null)]),e("img",{src:ts,class:v.iconLogo},null),e("div",{class:v.shareSection},[e("div",{class:[v.shareContaienr]},[e("div",{class:v.shareType},[a("\u8BF7\u622A\u56FE\u4E8C\u7EF4\u7801"),e("span",null,[a("\u6253\u5F00"),t.pay_channel==="wx_pub"?"\u5FAE\u4FE1":"\u652F\u4ED8\u5B9D",a("\u626B\u7801\u652F\u4ED8")])]),e("div",{class:v.qrcodeSection},[e(es,{text:t.url,logoSize:"small",size:"100%"},null)]),e("div",{class:v.memo},[a("\u8BF7\u572830\u5206\u949F\u5185\u626B\u7801\u652F\u4ED8")])]),e("div",{class:[v.tips]},[e("div",{class:v.tipsTitle},[a("\u4F7F\u7528\u8BF4\u660E\uFF1A")]),e("div",{class:v.tipsContent},[a("1.\u6253\u5F00"),t.pay_channel==="wx_pub"?"\u5FAE\u4FE1":"\u652F\u4ED8\u5B9D",a("\u626B\u4E00\u626B"),e("br",null,null),a("2.\u9009\u62E9\u76F8\u518C\u4E2D\u7684\u4E8C\u7EF4\u7801"),e("br",null,null),a("3.\u8BF7\u572830\u5206\u949F\u5185\u626B\u7801\u652F\u4ED8")])])])])}});const ss="_album_1risa_1",as="_albumType_1risa_9",os="_img_1risa_20",ns="_content_1risa_33",is="_musicNum_1risa_49",ls="_footer_1risa_56",cs="_icon_1risa_68",us="_albumWeek_1risa_75",ds="_albumTitle_1risa_84",ps="_albumNum_1risa_90";var S={album:ss,albumType:as,img:os,content:ns,musicNum:is,footer:ls,icon:cs,albumWeek:us,albumTitle:ds,albumNum:ps},ms=m({name:"OrderMusic",props:{item:{type:Object,default:{}}},render(){const t=this.item;return console.log(t),e(U,null,[e("div",{class:S.album},[e(b,{class:S.img,src:t.coverImg},null),e("div",{class:S.content},[e("h4",{class:"van-ellipsis"},[t.name]),e("p",{class:"van-multi-ellipsis--l2"},[t.describe])])]),e("div",{class:S.albumWeek},[e("span",{class:S.albumTitle},[a("\u8D2D\u4E70\u5468\u671F")]),e("span",{class:S.albumNum},[t.purchaseCycle,a("\u4E2A\u6708")])])])}}),Bs=m({name:"order-detail",data(){const t=this.$route.query;return{loading:!1,orderType:t.orderType,recomUserId:t.recomUserId,activityId:t.activityId,id:t.id,agreeStatus:!1,popupShow:!1,paymentStatus:!1,orderAmount:0,orderPrice:0,dataLoading:!0,exists:!1,bottomHeight:0,paymentVendor:"",paymentVersion:"V1",paymentChannels:[],showQrcode:!1,orderTimer:null,qrCodeUrl:"",pay_channel:"",orderInfo:{},config:{},orderNo:""}},unmounted(){n.orderInfo={orderNo:"",actualPrice:0,payStatus:!1}},computed:{orderList(){return n.orderObject.orderList||[]}},async mounted(){if(await this.getUserRegisterProtocol(),this.dataLoading=!0,this.orderType=="MUSIC"&&this.id)try{const t=await Se(this.id);n.orderObject.orderType="MUSIC",n.orderObject.orderName=t.musicSheetName,n.orderObject.orderDesc=t.musicSheetName,n.orderObject.actualPrice=t.musicPrice,n.orderObject.recomUserId=this.recomUserId,n.orderObject.activityId=this.activityId,["WAIT_PAY","PAYING"].includes(t.orderStatus)?n.orderObject.orderNo=t.orderNo:["PAID","CLOSE","FAIL"].includes(t.orderStatus)&&(j("\u8BA2\u5355\u6709\u8BEF"),Z({api:"back",content:{}})),n.orderObject.orderList=[{orderType:"MUSIC",goodsName:t.musicSheetName,actualPrice:t.musicPrice,...t}]}catch{}await this.getOrderPayType(),this.orderAmount=n.orderObject.actualPrice||0,this.orderPrice=n.orderObject.actualPrice||0,this.dataLoading=!1,this.orderPrice===0&&n.orderObject.orderType&&(this.loading=!0,this.onSubmit()),this.$nextTick(()=>{const{height:t}=ye(this.$refs.paymentButtom);this.bottomHeight=t+10})},methods:{async getUserRegisterProtocol(){try{const t=await P.get(u.platformApi+"/sysUserContractRecord/checkContractSign",{params:{contractType:"REGISTER"}});this.exists=t.data}catch{}},async getOrderPayType(){try{const t=n.orderObject;let r=t.orderList.length>0?t.orderList[0].id:"";t.orderType==="PRACTICE"&&(r=t.orderList.length>0?t.orderList[0].teacherId:""),(t.orderType==="LIVE"||t.orderType==="VIDEO")&&(r=t.orderList.length>0?t.orderList[0].courseGroupId:"");const{data:i}=await P.post(u.platformApi+"/userOrder/orderPayType",{data:{goodType:t.orderType,bizId:r,recomUserId:t.recomUserId?t.recomUserId:null}}),s=n.orderObject.paymentConfig||{};s.paymentVersion&&n.orderObject.orderNo?(this.paymentVersion=s.paymentVersion||"V1",this.paymentVendor=s.paymentVendor):(this.paymentVersion=i.paymentVersion||"V1",this.paymentVendor=i.paymentVendor),this.paymentChannels=i.paymentChannels}catch{}},async onAuthSuccess(){this.popupShow=!1,await this.getUserRegisterProtocol(),this.onSubmit()},async onSubmit(){var t,r,i;if(this.orderPrice>0){if(!this.agreeStatus){j("\u8BF7\u5148\u9605\u8BFB\u5E76\u540C\u610F\u300A\u9177\u4E50\u79C0\u5E73\u53F0\u670D\u52A1\u534F\u8BAE\u300B");return}const s=u.user.data;if(!(s!=null&&s.realName)||!(s!=null&&s.idCardNo)){this.popupShow=!0;return}}if(n.orderObject.orderNo){if(this.paymentVersion==="V1")this.paymentStatus=!0;else{this.orderInfo=n.orderObject.paymentConfig||{},this.orderNo=n.orderObject.orderNo;const s=this.orderInfo.paymentConfig.paymentChannel;if(((t=this.orderInfo.paymentVendor)==null?void 0:t.indexOf("wxpay"))>-1||((r=this.orderInfo.paymentVendor)==null?void 0:r.indexOf("alipay"))>-1)this.paymentStatus=!0;else if(s){const d=Ae(s);this.onConfirm({payCode:d,pay_channel:s})}else this.paymentStatus=!0}return}try{const s=n.orderObject;if(this.paymentVersion==="V1"){const d=u.platformType==="TEACHER"?"/api-teacher/userOrder/executeOrder":"/api-student/userOrder/executeOrder",_=(await P.post(d,{data:{orderName:s.orderName,orderDesc:s.orderDesc,orderType:s.orderType,actualPrice:this.orderPrice||0,recomUserId:s.recomUserId,activityId:s.activityId,couponId:s.couponId,orderInfos:[...Oe()]}})).data||{};if(_.status=="PAID"){this.$router.replace({path:"/tradeDetail",query:{orderNo:_.orderNo}});return}n.orderObject.orderNo=_.orderNo,n.orderObject.actualPrice=_.actualPrice}else{const d=u.platformType==="TEACHER"?"/api-teacher/userOrder/executeOrder/v2":"/api-student/userOrder/executeOrder/v2",g=await P.post(d,{data:{activityId:s.activityId||null,couponIds:s.couponId,goodsInfos:[...Pe()],orderDesc:s.orderDesc,orderName:s.orderName,orderType:s.orderType,paymentCashAmount:this.orderPrice||0,paymentType:this.paymentVendor,recomUserId:s.recomUserId||null}}),_=g.data||{};if(_.status=="PAID"){this.$router.replace({path:"/tradeDetail",query:{orderNo:_.orderNo}});return}n.orderObject.paymentConfig=g.data||{},n.orderObject.orderNo=(i=g.data)==null?void 0:i.orderNo,this.orderInfo=_,this.orderNo=_.orderNo}this.paymentStatus=!0}catch{this.loading=!1,this.orderPrice===0&&E.alert({title:"\u63D0\u793A",message:"\u652F\u4ED8\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\uFF01",confirmButtonText:"\u786E\u5B9A",confirmButtonColor:"#2dc7aa"})}},onBackOut(){je()},onCouponSelect(t){console.log("onCouponSelect",t);let r=0;(t||[]).forEach(d=>{r+=Number(d.discountPrice)});const i=Number((Number(this.orderAmount)-Number(r)).toFixed(2));this.orderPrice=i>=0?i:0;const s=(t||[]).map(d=>d.couponIssueId);n.orderObject.couponId=s.join(",")||""},onConfirm(t){const r=this.orderInfo.paymentConfig||{};n.orderObject.paymentConfig.paymentConfig.paymentChannel=t.pay_channel,this.pay_channel=t.pay_channel;const i=he.stringify({pay_channel:t.pay_channel,wxAppId:r.wxAppId,alipayAppId:r.alipayAppId,paymentType:this.orderInfo.paymentType,body:r.body,price:r.price,orderNo:r.merOrderNo,userId:r.userId});t.payCode==="payResult"?window.location.href=window.location.origin+u.payBackPath+"#/payResult?"+i:(this.qrCodeUrl=window.location.origin+u.payBackPath+"#/payDefine?"+i,this.showQrcode=!0,this.paymentStatus=!1,setTimeout(()=>{this.getPaymentOrderStatus()},300))},async getPaymentOrderStatus(){const t=setInterval(async()=>{if(this.$route.name!="orderDetail"){clearInterval(t);return}this.orderTimer=t;try{const r=u.platformType==="TEACHER"?"/api-teacher":"/api-student",{data:i}=await P.get(`${r}/userOrder/detailByOrderNo/${this.orderNo}`,{hideLoading:!0});i.status!=="WAIT_PAY"&&i.status!=="PAYING"&&(this.showQrcode=!1,clearInterval(this.orderTimer),setTimeout(()=>{this.$router.replace({path:"/tradeDetail",query:{orderNo:this.orderNo}})},100))}catch(r){console.log(r,"error"),clearInterval(this.orderTimer)}},5e3)}},render(){return e("div",{class:y["order-detail"],style:{paddingBottom:this.bottomHeight+"px"}},[e(Ie,null,null),!this.loading&&e(U,null,[this.orderList.map(t=>{if(t.orderType==="VIDEO")return e(yt,{item:t},null);if(t.orderType==="LIVE")return e(At,{item:t},null);if(t.orderType==="PRACTICE")return e(Nt,{item:t},null);if(t.orderType==="VIP")return e(Qt,{item:t},null);if(t.orderType==="MUSIC")return e(lr,{item:t},null);if(t.orderType==="PIANO_ROOM")return e(fr,{item:t},null);if(t.orderType==="ACTI_REGIST")return e(Vr,{item:t},null);if(t.orderType==="ALBUM")return e(Er,{item:t},null);if(t.orderType==="TENANT_ALBUM")return e(ms,{item:t},null)}),!this.dataLoading&&e(ze,{discountPrice:n.orderObject.discountPrice,orderType:this.orderType,orderAmount:this.orderAmount,onCouponSelect:this.onCouponSelect,disabled:!!n.orderObject.orderNo},null),e("div",{class:y.paymentInfo,ref:"paymentButtom"},[this.orderPrice>0&&e("div",{class:[y.protocol,u.projectType==="tenant"&&y.protocolTenant]},[e(_e,{modelValue:this.agreeStatus,"onUpdate:modelValue":t=>this.agreeStatus=t,showHeader:!0,style:{paddingLeft:0,paddingRight:0}},null)]),e("div",{class:y.btnGroup},[e("div",{class:y.priceSection},[a("\u652F\u4ED8\u91D1\u989D\uFF1A"),e("div",{class:y.price},[e("span",{class:y.priceUnit},[a("\uFFE5")]),e("span",{class:y.priceNum},[z(this.orderPrice)])])]),e(W,{type:"primary",round:!0,class:[y.btn,u.projectType==="tenant"&&y.btnTenant],onClick:this.onSubmit},{default:()=>[a("\u7ACB\u5373\u652F\u4ED8")]})])])]),e(fe,{modelValue:this.popupShow,"onUpdate:modelValue":t=>this.popupShow=t},{default:()=>[e(ve,{exists:this.exists,onSuccess:this.onAuthSuccess},null)]}),e(H,{show:this.paymentStatus,closeOnClickOverlay:!1,position:"bottom",round:!0,closeOnPopstate:!0,safeAreaInsetBottom:!0,style:{minHeight:"30%"}},{default:()=>[this.paymentVersion==="V1"?e(Te,{modelValue:this.paymentStatus,"onUpdate:modelValue":t=>this.paymentStatus=t,orderInfo:n.orderObject,onBackOut:this.onBackOut},null):e(et,{paymentConfig:{...n.orderObject,orderNo:this.orderNo},paymentVendor:this.paymentVendor,paymentChannels:this.paymentChannels,onClose:()=>this.paymentStatus=!1,onBackOut:this.onBackOut,onConfirm:t=>this.onConfirm(t)},null)]}),e(H,{show:this.showQrcode,"onUpdate:show":t=>this.showQrcode=t,round:!0,class:y.qrcodePopup,onClose:()=>{clearInterval(this.orderTimer)}},{default:()=>[e(rs,{url:this.qrCodeUrl,pay_channel:this.pay_channel},null)]})])}});export{Bs as default};
|