1 |
- import{d as C,ag as k,y as L,c as e,q as n,a5 as A,F as E,r as O,ba as x,B as D,bd as W,f,m as y,P as G,aj as w,g as b,ah as K,R as $,$ as ee,bi as te,o as U}from"./index.5f7ffb46.js";import{C as g}from"./index.abd668f7.js";import{T as Q}from"./index.ab2541bb.js";import{O as z}from"./index.7790de2a.js";import{R as oe,a as M}from"./index.ba71b8ca.js";import{C as V}from"./index.052b3caa.js";import{c as ae}from"./icon-checkbox-check.b4753e7f.js";import{c as se}from"./icon-checkbox-default.a253b329.js";import{C as ne}from"./index.13900508.js";import{O as S}from"./index.59b9f984.js";import{F as re}from"./index.6a697dce.js";import{F as R}from"./index.6438a25f.js";import{M as le,G as ce}from"./index.43e64f6c.js";import{O as ue}from"./index.95a99ca5.js";import{b as ie}from"./index.b28db9f5.js";import{o as de}from"./orchestra-top_bg.d871f0f3.js";import{O as pe}from"./index.6369cc1e.js";import{I as X}from"./index.276a5d68.js";import"./Checker.40bdbb46.js";import"./function-call.aca3a7bc.js";import"./ImagePreview.289405c5.js";import"./index.99e0cf1f.js";const me="_cartConfirm_qc4lq_1",he="_cartConfirmBox_qc4lq_9",fe="_cartItem_qc4lq_15",ye="_mlr13_qc4lq_24",_e="_protocol_qc4lq_28",ge="_paymentContainer_qc4lq_36",Ce="_needPrice_qc4lq_48",qe="_allPrice_qc4lq_58",Te="_cellItem_qc4lq_66",be="_img_qc4lq_71",Ae="_cellPrice_qc4lq_79",Se="_numFont_qc4lq_85",ve="_numPrefix_qc4lq_88",we="_goodsContent_qc4lq_92",Be="_goodsNum_qc4lq_92",Pe="_goodsPrice_qc4lq_98",Fe="_free_qc4lq_104",Ie="_goodsNums_qc4lq_107",Ne="_brandName_qc4lq_121",Ee="_model_qc4lq_127",xe="_popupCode_qc4lq_133",ke="_codeContainer_qc4lq_137",Oe="_codeClose_qc4lq_140",De="_codeImg_qc4lq_150",Ve="_codeTitle_qc4lq_157",Ue="_codeName_qc4lq_165",Me="_codeQr_qc4lq_172",Re="_codeBtnText_qc4lq_185",He="_codeTips_qc4lq_196",Le="_tipsTitle_qc4lq_210",Ge="_close_qc4lq_216",Qe="_codeBottom_qc4lq_221",ze="_title_qc4lq_228",Xe="_shareImg_qc4lq_243",Ye="_shareText_qc4lq_247",Ze="_freight_qc4lq_253";var c={cartConfirm:me,cartConfirmBox:he,cartItem:fe,mlr13:ye,protocol:_e,paymentContainer:ge,needPrice:Ce,allPrice:qe,cellItem:Te,img:be,cellPrice:Ae,numFont:Se,numPrefix:ve,goodsContent:we,goodsNum:Be,goodsPrice:Pe,free:Fe,goodsNums:Ie,brandName:Ne,model:Ee,popupCode:xe,codeContainer:ke,codeClose:Oe,codeImg:De,codeTitle:Ve,codeName:Ue,codeQr:Me,codeBtnText:Re,codeTips:He,tipsTitle:Le,close:Ge,codeBottom:Qe,title:ze,shareImg:Xe,shareText:Ye,freight:Ze};const je="_cellEntry_1kuxn_1",Je="_cell_1kuxn_1",We="_userName_1kuxn_36",Ke="_phone_1kuxn_41",$e="_addressInfo_1kuxn_46",et="_emtry_1kuxn_51";var _={cellEntry:je,cell:Je,userName:We,phone:Ke,addressInfo:$e,emtry:et},tt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAA4CAYAAACohjseAAAAAXNSR0IArs4c6QAACZNJREFUaEPNm3twVPUVxz9nFwivwGiE8hDU0QZBO62M0MrDtraKSnciIFZGxFdrKio0gcoQQVEwjh1FUSEGilaESoGCTChqHV+AMGonrbVCsbWC8hAIMCHBEGD3dH5793n33t17N4H6+y97zz3nfM/rd87v/iK08tIVK4IU7hkIDEMj/UH6IdIH1UJECi1x2gDSgPIlsB1hG7CJhl61csMN4dZUSVqDmf61ui37jl6LMh7hSqBrfny1HpU3EJbyrU7r5dLSE/nxSb7VIoC6urKIdgWTgbuAs1yV0dgTf9LqgCqON8+T0RUH8wXqT2RMitZUd0QaK1Amg3bOV7hHgzQiOg/tUimh0q/9yvINUGvmhiD8DMo5foW1iF5kJwTulVB5jR8+ngHq+qcLON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OziQ24N5dYYVkxmqJfGmkqelcqViSfvBrefHOOajmf3TvhDkK8lbo/4PkUwPu7eXw0dux31oCyO51eUTKFmYe3UcBVt/ZkUbdCvEbFC654PFIJCHagLzqFrhoiFVA3lwG/zAdotvKAdhd/k46BwZI6ULnjy9RkHPvCBExn8+QVv08aDbrn06w5sSPN2SPb78GNNwkqnGJlC92/3wWl6qP3zEfTf0A6nGM8pCW/kh8hK7IApm6OPcH0KgXn763gGNHN4PHayP5WNwf0hzUUkv7TkNk0jMZd2dcC7E+dnsviLz3jbs+kllxd4AMlWnPO96ZybrT6BMTijkpG1G+mddIhP200eEyZYn/aySJfDQgT8jrqJ7Gi0Aeck9kB211RDZwVu3xsKLhquEaIpFTdJXLA6BUPQOBWiQYcgvLVFJPAK3Cc00BDUVzEXMZz5thPNjOH4nZCpQqCg+Wy6RXW+8yXqoWOufmEESeSTYD/nTMm9rcoFC5V2a8dGquU6aBnBXqSLBLBai57ZvfpQXvSM1gOI/wkUqZVXPqL8SmAa0cVUS4w2RUs19p9g4mhVLqEKoINs2TijV53yvxnIPZdFQzT37VeC2i40Gv9P21OM7cfJVF3iAgS+nWeb2Z5/KyTaqZWsrA/r6OHRvkO4GBiAwjgvVvBWhfK5TV+rcClQbQRuALRLYD2xDdxMeRWlm5MtdXU18q/w++EDK1lDBSBwAAAABJRU5ErkJggg==",ot=C({name:"cart-address",props:{item:{type:Object,default:()=>({})},isLink:{type:Boolean,default:!0},setAddress:{type:Function,default:a=>{}}},setup(a){const l=k(),t=L(()=>[a.item.provinceName,a.item.cityName,a.item.regionName,a.item.detailAddress].join("")),u=()=>{!a.isLink||l.push("/shopAddress")};return()=>e(E,null,[a.item&&a.item.phoneNumber?e(g,{class:_.cell,"is-link":a.isLink,onClick:()=>u(),titleStyle:{marginLeft:"0"}},{title:()=>e("div",null,[e("span",{class:_.userName},[a.item.name]),e("span",{class:_.phone},[a.item&&a.item.phoneNumber&&a.item.phoneNumber.replace(/^(\d{3})\d{4}(\d+)/,"$1****$2")]),a.item.defaultStatus&&e(Q,{type:"primary",round:!0,style:{"vertical-align":"text-top",marginLeft:"10px",padding:"1px 8px"}},{default:()=>[n("\u9ED8\u8BA4")]})]),label:()=>e("span",{class:_.addressInfo},[t.value])}):e(g,{class:_.cell,"is-link":a.isLink,onClick:()=>u()},{icon:()=>e(A,{name:tt,size:28},null),title:()=>e("div",{class:_.emtry},[n("\u53BB\u586B\u5199\u6536\u8D27\u5730\u5740")])})])}});const at="_payment_1ot0l_1",st="_title_1ot0l_13",nt="_payAmount_1ot0l_21",rt="_amount_1ot0l_31",lt="_blank_1ot0l_38",ct="_payTypeRe_1ot0l_41",ut="_recommend_1ot0l_45",it="_payBtn_1ot0l_54";var h={payment:at,title:st,payAmount:nt,amount:rt,blank:lt,payTypeRe:ct,recommend:ut,payBtn:it},dt=C({name:"payment",props:{paymentConfig:{type:Object,default:{}}},emits:["backOut","close","confirm"],setup(a,{slots:l,attrs:t,emit:u}){const r=O({payType:"wx",pay_channel:""}),B=()=>{W({message:"\u662F\u5426\u653E\u5F03\u672C\u6B21\u4ED8\u6B3E",confirmButtonText:"\u7EE7\u7EED\u4ED8\u6B3E",cancelButtonText:"\u653E\u5F03",showCancelButton:!0}).catch(async()=>{await q(),u("backOut"),u("close")})},q=async i=>{},P=async()=>{const i=r.payType;f().weixin?i=="zfb"?(r.pay_channel="alipay_qr",m("qrCode")):i=="wx"&&(r.pay_channel="wx_pub",m("pay")):f().alipay?i=="zfb"?(r.pay_channel="alipay_wap",m("pay")):i=="wx"&&(r.pay_channel="wx_pub",m("qrCode")):(i=="zfb"?r.pay_channel="alipay_qr":i=="wx"&&(r.pay_channel="wx_pub"),m("qrCode"))},m=i=>{const F=i=="qrCode"?"payCenter":"payResult";u("confirm",{payCode:F,pay_channel:r.pay_channel})};return()=>e("div",{class:h.payment},[e(A,{onClick:B,name:"cross",size:20},null),e("div",{class:[h.title]},[n("\u9009\u62E9\u652F\u4ED8\u65B9\u5F0F")]),e("div",{class:h.payAmount},[e("p",null,[n("\u5E94\u4ED8\u91D1\u989D")]),e("div",{class:h.amount},[e("span",null,[n("\uFFE5 ")]),x(a.paymentConfig.currentPrice)])]),e(oe,{modelValue:r.payType,"onUpdate:modelValue":i=>r.payType=i},{default:()=>[e(V,{border:!1},{default:()=>[e(g,{border:!0,center:!0,onClick:()=>{r.payType="wx"}},{icon:()=>e(A,{name:"wechat-pay",color:"#15c434",size:22},null),"right-icon":()=>e(M,{name:"wx"},null),title:()=>e("div",{class:h.payTypeRe},[n("\u5FAE\u4FE1\u652F\u4ED8 "),e("span",{class:h.recommend},[n("\u63A8\u8350")])])}),e(g,{title:"\u652F\u4ED8\u5B9D\u652F\u4ED8",border:!0,center:!0,onClick:()=>{r.payType="zfb"}},{icon:()=>e(A,{name:"alipay",color:"#009fe9",size:22},null),"right-icon":()=>e(M,{name:"zfb"},null)})]})]}),e("div",{class:h.blank},null),e(D,{type:"primary",class:h.payBtn,block:!0,round:!0,onClick:P},{default:()=>[n("\u786E\u8BA4\u652F\u4ED8")]})])}});const pt="_colProtocol_rqtsv_1",mt="_protocolText_rqtsv_6",ht="_boxStyle_rqtsv_10",ft="_protocolContent_rqtsv_30";var v={colProtocol:pt,protocolText:mt,boxStyle:ht,protocolContent:ft};const yt={BUY_ORDER:"\u300A\u7BA1\u4E50\u56E2\u5E73\u53F0\u670D\u52A1\u534F\u8BAE\u300B",REGISTER:"\u300A\u7BA1\u4E50\u56E2\u5E73\u53F0\u6CE8\u518C\u534F\u8BAE\u300B"};var _t=C({name:"o-protocol",props:{showHeader:{type:Boolean,default:!1},modelValue:{type:Boolean,default:!1},prototcolType:{type:String,default:"BUY_ORDER"}},data(){return{exists:!0,checked:this.modelValue,popupStatus:!1,protocolHTML:"",protocolPopup:null}},async mounted(){try{this.checked=this.checked||this.exists,this.$emit("update:modelValue",this.checked||this.exists)}catch{}this.checked=this.modelValue,window.addEventListener("hashchange",this.onHash,!1)},unmounted(){window.removeEventListener("hashchange",this.onHash,!1)},watch:{checked(a){this.$emit("update:modelValue",a)}},methods:{async getContractDetail(){try{if(!this.protocolHTML){const{data:a}=await y.get("/api-student/schoolContractTemplate/queryLatestContractTemplate",{params:{contractType:this.prototcolType}});this.protocolHTML=a.contractTemplateContent}this.onPopupClose()}catch{}},onHash(){this.popupStatus=!1},onPopupClose(){if(this.popupStatus=!this.popupStatus,this.popupStatus){const a=this.$route;let l=0;for(let r in a.query)l+=1;const t=window.location.href,u=l>0?"&pto="+ +new Date:"?pto="+ +new Date;history.pushState("","",`${t}${u}`)}else window.history.go(-1);this.protocolPopup&&(this.protocolPopup.scrollTop=0)}},render(){return e("div",{class:v.colProtocol},[e(ne,{modelValue:this.checked,"onUpdate:modelValue":a=>this.checked=a},{default:()=>[n("\u6211\u5DF2\u9605\u8BFB\u5E76\u540C\u610F")],icon:a=>e(A,{class:v.boxStyle,name:a.checked?ae:se,size:"15"},null)}),e("span",{onClick:this.getContractDetail,class:v.protocolText},[yt[this.prototcolType]]),e(G,{ref:this.protocolPopup,show:this.popupStatus,position:"bottom",style:{height:"100%"}},{default:()=>[this.showHeader&&e(w,{title:"\u7BA1\u4E50\u56E2\u5E73\u53F0\u670D\u52A1\u534F\u8BAE"},null),this.popupStatus&&e("div",{id:"mProtocol"},[e("div",{class:v.protocolContent,innerHTML:this.protocolHTML},null)])]})])}});const gt="_userAuth_1sper_1",Ct="_cellGroup_1sper_6",qt="_btnGroup_1sper_38";var H={userAuth:gt,cellGroup:Ct,btnGroup:qt},Tt=C({name:"UserAuth",props:{onSuccess:{type:Function,default:()=>{}},hideHeader:{type:Boolean,default:!1}},data(){return{form:{realName:"",idCardNo:""}}},mounted(){const a=b.user.data;this.form.realName=a==null?void 0:a.account.realName},methods:{async onSubmit(){try{const a=b.platformApi+"/sysAccount/realNameAuth";await y.post(a,{data:{...this.form,contract:!0,save:!0}}),b.user.data.account.realName=this.form.realName,b.user.data.account.idCardNo=this.form.idCardNo,this.onSuccess()}catch{}}},render(){return e(re,{class:H.userAuth,onSubmit:this.onSubmit},{default:()=>[!this.hideHeader&&e(w,{title:"\u5B9E\u540D\u8BA4\u8BC1"},null),e(V,{inset:!0,class:H.cellGroup},{default:()=>[e(R,{required:!0,label:"\u771F\u5B9E\u59D3\u540D",modelValue:this.form.realName,"onUpdate:modelValue":a=>this.form.realName=a,rules:[{required:!0,message:"\u8BF7\u586B\u5199\u771F\u5B9E\u59D3\u540D"}],name:"realName",placeholder:"\u8BF7\u586B\u5199\u771F\u5B9E\u59D3\u540D",maxlength:"50"},null),e(R,{required:!0,label:"\u8EAB\u4EFD\u8BC1\u53F7",modelValue:this.form.idCardNo,"onUpdate:modelValue":a=>this.form.idCardNo=a,maxlength:18,rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8EAB\u4EFD\u8BC1\u53F7"},{pattern:/^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/,message:"\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u8EAB\u4EFD\u8BC1\u53F7"}],placeholder:"\u8BF7\u8F93\u5165\u8EAB\u4EFD\u8BC1\u53F7"},null)]}),e("div",{class:["btnGroup"]},[e(D,{block:!0,round:!0,type:"primary","native-type":"submit"},{default:()=>[n("\u786E\u5B9A")]})])]})}});const bt="_saveShareImage_sn42f_1",At="_btnHeader_sn42f_16",St="_iconBack_sn42f_21",vt="_previewSection_sn42f_28",wt="_topImage_sn42f_35",Bt="_shareContaienr_sn42f_41",Pt="_orchestraContainer_sn42f_50",Ft="_schoolName_sn42f_54",It="_tips_sn42f_60",Nt="_tipsTitle_sn42f_66",Et="_tipsContent_sn42f_72",xt="_schoolLogo_sn42f_78",kt="_shareType_sn42f_98",Ot="_qrcodeSection_sn42f_107",Dt="_memo_sn42f_115",Vt="_endTime_sn42f_127";var d={saveShareImage:bt,btnHeader:At,iconBack:St,previewSection:vt,topImage:wt,shareContaienr:Bt,orchestraContainer:Pt,schoolName:Ft,tips:It,tipsTitle:Nt,tipsContent:Et,schoolLogo:xt,shareType:kt,qrcodeSection:Ot,memo:Dt,endTime:Vt},Ut=C({name:"qrcode-payment",props:{url:{type:String,default:""},pay_channel:{type:String,default:"wx_pub"},orderType:{type:String,default:""}},setup(a){k();const l=O({height:0});return()=>e("div",{class:[d.saveShareImage]},[f().isApp&&e(z,{position:"top",onGetHeight:t=>{l.height=t,console.log(t,"height")}},{default:()=>[e(w,{title:a.orderType==="VIP"?"\u4F1A\u5458\u8D2D\u4E70":"\u62A5\u540D\u7F34\u8D39"},null)]}),e(X,{src:de,class:d.topImage,style:{top:l.height+"px"}},null),e("div",{class:[d.shareContaienr,d.orchestraContainer]},[e("div",{class:d.schoolName},[a.orderType==="VIP"?"\u4F1A\u5458\u8D2D\u4E70":"\u62A5\u540D\u7F34\u8D39"]),e("div",{class:d.shareType},[n("\u8BF7\u622A\u56FE\u4E0B\u65B9\u4E8C\u7EF4\u7801"),e("span",null,[n("\u767B\u5F55"),a.pay_channel==="wx_pub"?"\u5FAE\u4FE1":"\u652F\u4ED8\u5B9D",n("\u626B\u7801\u652F\u4ED8")])]),e("div",{class:d.qrcodeSection},[e(pe,{text:a.url,logoSize:"small",size:"100%"},null)]),e("div",{class:d.memo},[n("\u8BF7\u572830\u5206\u949F\u5185\u626B\u7801\u652F\u4ED8")])]),e("div",{class:[d.shareContaienr,d.tips]},[e("div",{class:d.tipsTitle},[n("\u4F7F\u7528\u8BF4\u660E\uFF1A")]),e("div",{class:d.tipsContent},[n("1.\u6253\u5F00"),a.pay_channel==="wx_pub"?"\u5FAE\u4FE1":"\u652F\u4ED8\u5B9D",n("\u626B\u4E00\u626B"),e("br",null,null),n("2.\u9009\u62E9\u76F8\u518C\u4E2D\u7684\u4E8C\u7EF4\u7801"),e("br",null,null),n("3.\u8BF7\u572830\u5206\u949F\u5185\u626B\u7801\u652F\u4ED8")])])])}});const Mt=a=>{let l="qrCode";return f().weixin?a=="alipay_qr"||a=="alipay_wap"?l="qrCode":a=="wx_pub"&&(l="pay"):f().alipay&&a=="alipay_wap"?l="pay":l="qrCode",l=="qrCode"?"payDefine":"payResult"};var co=C({name:"order-detail",setup(){const a=K(),l=k(),t=O({paymentType:"adapay",orderTimer:null,paymentStatus:!1,showQrcode:!1,qrCodeUrl:"",pay_channel:"",orderNo:a.query.orderNo,orderInfo:{},goodsInfos:[],config:a.query.config?JSON.parse(a.query.config):{},hasFreight:!a.query.hf,freight:"",agreeStatus:!0,showHeader:!1,authShow:!1,memberBaoStatus:!1,goodsStatus:!1,selectGoodsId:null,currentPrice:0,dialogStatus:!1,dialogMessage:"",submitStatus:!1}),u=L(()=>t.orderInfo.orderType),r=$({}),B=async()=>{try{const{data:o}=await y.get("/api-student/userPaymentOrder/detail/"+t.orderNo),s=o.goodsInfos||[];t.orderInfo=o;let p=!1,N=!1;s.forEach(T=>{const J=T.goodsUrl?T.goodsUrl.split(",")[0]:"";T.goodsUrl=J,T.goodsType==="INSTRUMENTS"?p=!0:T.goodsType==="TEXTBOOK"&&(N=!0)}),t.goodsInfos=s,r.value.id||(r.value=o.addresses||{}),console.log(p,N),!p&&N?t.freight="\u5230\u4ED8":t.freight="\u514D\u8FD0\u8D39",o.status!=="WAIT_PAY"&&o.status!=="PAYING"&&(t.dialogStatus=!0,t.dialogMessage="\u8BA2\u5355"+ie[o.status])}catch{}},q=o=>{const s=t.config;t.pay_channel=o.pay_channel;const p=te.stringify({pay_channel:o.pay_channel,wxAppId:s.wxAppId,alipayAppId:s.alipayAppId,body:s.body,price:s.price,paymentType:s.paymentType,orderNo:s.merOrderNo,userId:s.userId});o.payCode==="payResult"?window.location.href=window.location.origin+"/orchestra-student/#/payResult?"+p:(t.qrCodeUrl=window.location.origin+"/orchestra-student/#/payDefine?"+p,t.showQrcode=!0,t.paymentStatus=!1,setTimeout(()=>{P()},300))},P=async()=>{const o=setInterval(async()=>{if(a.name!="orderDetail"){clearInterval(o);return}t.orderTimer=o;try{const{data:s}=await y.post("/api-student/open/userOrder/paymentStatus/"+t.orderNo,{hideLoading:!0});s.status!=="WAIT_PAY"&&s.status!=="PAYING"&&(t.showQrcode=!1,clearInterval(t.orderTimer),setTimeout(()=>{I()},100))}catch{clearInterval(t.orderTimer)}},5e3)},m=async()=>{clearInterval(t.orderTimer),u.value==="VIP"?F(i):Y(i)},i=()=>{const o=t.pay_channel;if(o){const s=Mt(t.pay_channel);q({payCode:s,pay_channel:o})}else u.value==="VIP"?t.paymentStatus=!0:q({payCode:"payResult",pay_channel:"wx_pub"})},F=async o=>{try{t.submitStatus=!0;const{data:s}=await y.get("/api-student/userPaymentOrder/detail/"+t.orderNo,{hideLoading:!1});t.pay_channel=s.paymentChannel,t.submitStatus=!1,s.status!=="WAIT_PAY"&&s.status!=="PAYING"?l.replace({path:"/payment-result",query:{orderNo:t.orderNo}}):o&&o()}catch{t.submitStatus=!1}},Y=async o=>{if(!r.value.id){U("\u8BF7\u9009\u62E9\u6536\u8D27\u5730\u5740");return}if(!t.agreeStatus){U("\u8BF7\u5148\u9605\u8BFB\u5E76\u540C\u610F\u300A\u7BA1\u4E50\u56E2\u5E73\u53F0\u670D\u52A1\u534F\u8BAE\u300B");return}const s=b.user.data;if(!(s!=null&&s.account.realName)||!(s!=null&&s.account.idCardNo)){t.authShow=!0;return}t.submitStatus=!0;try{const{data:p}=await y.post("/api-student/userPaymentOrder/updateReceiveAddress",{hideLoading:!1,data:{orderNo:t.orderNo,orderType:"ORCHESTRA",receiveAddress:r.value.id}});t.pay_channel=p.paymentChannel,p.status!=="WAIT_PAY"&&p.status!=="PAYING"?I():o&&o()}catch{}finally{t.submitStatus=!1}},I=()=>{u.value==="ORCHESTRA"?window.location.replace("https://mp.weixin.qq.com/s?__biz=MzkxMDMwOTI5Nw==&mid=2247485362&idx=3&sn=9b265d36b5dabe7f9393fc679c367540&chksm=c12c256cf65bac7ae2a865435b950f6e1285afd226356db0ffde815b1ee345f29cfcdb798cc9#rd"):l.replace({path:"/payment-result",query:{orderNo:t.orderNo}})},Z=async()=>{try{await y.post("/api-student/userPaymentOrder/cancelPayment/"+t.orderNo),l.back()}catch{}},j=()=>{t.authShow=!1,m()};return ee(()=>{f().isApp?t.showHeader=!0:t.showHeader=!1;let o=sessionStorage.getItem("addressDetails");o=o?JSON.parse(o):{},r.value=o,sessionStorage.removeItem("addressDetails"),B()}),()=>e(E,null,[f().isApp&&e(w,{border:!1},null),e("div",{class:c.cartConfirm},[u.value==="ORCHESTRA"&&e("div",{class:c.cartConfirmBox},[e(ot,{item:r.value},null)]),e(V,{style:{margin:0}},{default:()=>[t.goodsInfos&&t.goodsInfos.map(o=>e(g,{class:c.cellItem,onClick:()=>{o.goodsType==="INSTRUMENTS"||o.goodsType==="TEXTBOOK"?(t.selectGoodsId=o.goodsId,t.currentPrice=o.currentPrice,t.goodsStatus=!0):o.goodsType==="VIP"&&(t.memberBaoStatus=!0)}},{icon:()=>e(X,{class:c.img,src:o.goodsUrl},null),title:()=>e("div",{class:c.goodsContent},[e("h2",null,[e("span",null,[o.goodsName]),e("span",{class:c.goodsNum},[o.goodsType==="VIP"||o.goodsType==="DEPOSIT"?"6\u4E2A\u6708":"x 1"])]),e("div",{class:c.goodsPrice},[e(Q,{color:"linear-gradient(135deg, #FF8C4A 0%, #FF531C 100%)",textColor:"#fff",class:c.brandName},{default:()=>[o.brandName]}),e("span",{class:[c.goodsNums,o.paymentCashAmount>0?c.numFont:c.free]},[o.paymentCashAmount>0?e(E,null,[e("span",{class:c.numPrefix},[n("\xA5 ")]),x(o.paymentCashAmount)]):"\u514D\u8D39"])]),e("p",{class:c.model},[o.description])])}))]}),u.value==="ORCHESTRA"&&e(g,{class:c.freight,title:"\u8FD0\u8D39",value:t.freight},null)]),e(z,{position:"bottom"},{default:()=>[e("div",{class:c.protocol},[e(_t,{modelValue:t.agreeStatus,"onUpdate:modelValue":o=>t.agreeStatus=o,showHeader:t.showHeader,style:{paddingTop:0,paddingBottom:0}},null)]),e("div",{class:c.paymentContainer},[e("div",{class:c.payemntPrice},[e("p",{class:c.needPrice},[n("\u652F\u4ED8\u91D1\u989D\uFF1A"),e("span",null,[n("\xA5 "),x(t.orderInfo.currentPrice)])])]),e("div",{class:c.paymentBtn},[e(D,{color:"linear-gradient(135deg, #FF8C4A 0%, #FF531C 100%)",round:!0,onClick:m,loading:t.submitStatus,disabled:t.submitStatus},{default:()=>[n("\u7ACB\u5373\u8D2D\u4E70")]})])])]}),e(G,{show:t.paymentStatus,closeOnClickOverlay:!1,position:"bottom",round:!0,closeOnPopstate:!0,safeAreaInsetBottom:!0,style:{minHeight:"30%"}},{default:()=>[e(dt,{paymentConfig:t.orderInfo,onClose:()=>t.paymentStatus=!1,onBackOut:Z,onConfirm:o=>q(o)},null)]}),e(S,{modelValue:t.showQrcode,"onUpdate:modelValue":o=>t.showQrcode=o,onClose:()=>{clearInterval(t.orderTimer)}},{default:()=>[e(Ut,{url:t.qrCodeUrl,pay_channel:t.pay_channel,orderType:u.value},null)]}),e(S,{modelValue:t.authShow,"onUpdate:modelValue":o=>t.authShow=o},{default:()=>[e(Tt,{onSuccess:j,hideHeader:!f().isApp},null)]}),e(S,{modelValue:t.memberBaoStatus,"onUpdate:modelValue":o=>t.memberBaoStatus=o,position:"right"},{default:()=>[e(le,null,null)]}),e(S,{modelValue:t.goodsStatus,"onUpdate:modelValue":o=>t.goodsStatus=o,position:"right",destroy:!0},{default:()=>[t.goodsStatus&&e(ce,{id:t.selectGoodsId,groupPrice:t.currentPrice},null)]}),e(ue,{title:"\u63D0\u793A",show:t.dialogStatus,"onUpdate:show":o=>t.dialogStatus=o,message:t.dialogMessage,confirmButtonText:"\u786E\u5B9A",onConfirm:()=>{I()}},null)])}});export{co as default};
|