1 |
- import{d as C,ag as R,y as L,c as e,q as n,a5 as b,F,r as H,b3 as x,B as k,b6 as W,e as f,m as y,P as G,f as T,aV as K,R as $,$ as ee,o as U}from"./index.ffe80dbe.js";import{O as E}from"./index.a0ef77e4.js";import{C as g}from"./index.ea031708.js";import{T as Q}from"./index.55ba7429.js";import{O as te}from"./index.4ddd16f0.js";import{R as oe,a as D}from"./index.99ef7500.js";import{C as O}from"./index.914765a1.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.34fb3ef2.js";import{O as A}from"./index.1829b1b7.js";import{F as re}from"./index.95ac53ca.js";import{F as V}from"./index.92ec0bf4.js";import{q as le}from"./index.339fc024.js";import{M as ce,G as ie}from"./index.e039156c.js";import{O as ue}from"./index.d745568a.js";import{a as de}from"./index.931cf0b8.js";import{o as pe,O as me}from"./index.a0fac207.js";import{I as z}from"./index.7e972106.js";import"./index.1d5c6f70.js";import"./Checker.7cede1aa.js";import"./function-call.4b573eb9.js";import"./ImagePreview.fb0145e9.js";import"./index.b4b77b5a.js";const he="_cartConfirm_qc4lq_1",fe="_cartConfirmBox_qc4lq_9",ye="_cartItem_qc4lq_15",_e="_mlr13_qc4lq_24",ge="_protocol_qc4lq_28",Ce="_paymentContainer_qc4lq_36",qe="_needPrice_qc4lq_48",Te="_allPrice_qc4lq_58",be="_cellItem_qc4lq_66",Se="_img_qc4lq_71",ve="_cellPrice_qc4lq_79",Ae="_numFont_qc4lq_85",we="_numPrefix_qc4lq_88",Ne="_goodsContent_qc4lq_92",Ie="_goodsNum_qc4lq_92",Pe="_goodsPrice_qc4lq_98",Be="_free_qc4lq_104",Fe="_goodsNums_qc4lq_107",xe="_brandName_qc4lq_121",ke="_model_qc4lq_127",Ee="_popupCode_qc4lq_133",Oe="_codeContainer_qc4lq_137",Ue="_codeClose_qc4lq_140",De="_codeImg_qc4lq_150",Ve="_codeTitle_qc4lq_157",Me="_codeName_qc4lq_165",Re="_codeQr_qc4lq_172",Le="_codeBtnText_qc4lq_185",He="_codeTips_qc4lq_196",Ge="_tipsTitle_qc4lq_210",Qe="_close_qc4lq_216",ze="_codeBottom_qc4lq_221",Xe="_title_qc4lq_228",Ye="_shareImg_qc4lq_243",Ze="_shareText_qc4lq_247",je="_freight_qc4lq_253";var l={cartConfirm:he,cartConfirmBox:fe,cartItem:ye,mlr13:_e,protocol:ge,paymentContainer:Ce,needPrice:qe,allPrice:Te,cellItem:be,img:Se,cellPrice:ve,numFont:Ae,numPrefix:we,goodsContent:Ne,goodsNum:Ie,goodsPrice:Pe,free:Be,goodsNums:Fe,brandName:xe,model:ke,popupCode:Ee,codeContainer:Oe,codeClose:Ue,codeImg:De,codeTitle:Ve,codeName:Me,codeQr:Re,codeBtnText:Le,codeTips:He,tipsTitle:Ge,close:Qe,codeBottom:ze,title:Xe,shareImg:Ye,shareText:Ze,freight:je};const Je="_cellEntry_1kuxn_1",We="_cell_1kuxn_1",Ke="_userName_1kuxn_36",$e="_phone_1kuxn_41",et="_addressInfo_1kuxn_46",tt="_emtry_1kuxn_51";var _={cellEntry:Je,cell:We,userName:Ke,phone:$e,addressInfo:et,emtry:tt},ot="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAA4CAYAAACohjseAAAAAXNSR0IArs4c6QAACZNJREFUaEPNm3twVPUVxz9nFwivwGiE8hDU0QZBO62M0MrDtraKSnciIFZGxFdrKio0gcoQQVEwjh1FUSEGilaESoGCTChqHV+AMGonrbVCsbWC8hAIMCHBEGD3dH5793n33t17N4H6+y97zz3nfM/rd87v/iK08tIVK4IU7hkIDEMj/UH6IdIH1UJECi1x2gDSgPIlsB1hG7CJhl61csMN4dZUSVqDmf61ui37jl6LMh7hSqBrfny1HpU3EJbyrU7r5dLSE/nxSb7VIoC6urKIdgWTgbuAs1yV0dgTf9LqgCqON8+T0RUH8wXqT2RMitZUd0QaK1Amg3bOV7hHgzQiOg/tUimh0q/9yvINUGvmhiD8DMo5foW1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glFdOiww7pU4GUg9IDWnNsYkBcOziQ24N5dYYVkxmqJfGmkqelcqViSfvBrefHOOajmf3TvhDkK8lbo/4PkUwPu7eXw0dux31oCyO51eUTKFmYe3UcBVt/ZkUbdCvEbFC654PFIJCHagLzqFrhoiFVA3lwG/zAdotvKAdhd/k46BwZI6ULnjy9RkHPvCBExn8+QVv08aDbrn06w5sSPN2SPb78GNNwkqnGJlC92/3wWl6qP3zEfTf0A6nGM8pCW/kh8hK7IApm6OPcH0KgXn763gGNHN4PHayP5WNwf0hzUUkv7TkNk0jMZd2dcC7E+dnsviLz3jbs+kllxd4AMlWnPO96ZybrT6BMTijkpG1G+mddIhP200eEyZYn/aySJfDQgT8jrqJ7Gi0Aeck9kB211RDZwVu3xsKLhquEaIpFTdJXLA6BUPQOBWiQYcgvLVFJPAK3Cc00BDUVzEXMZz5thPNjOH4nZCpQqCg+Wy6RXW+8yXqoWOufmEESeSTYD/nTMm9rcoFC5V2a8dGquU6aBnBXqSLBLBai57ZvfpQXvSM1gOI/wkUqZVXPqL8SmAa0cVUS4w2RUs19p9g4mhVLqEKoINs2TijV53yvxnIPZdFQzT37VeC2i40Gv9P21OM7cfJVF3iAgS+nWeb2Z5/KyTaqZWsrA/r6OHRvkO4GBiAwjgvVvBWhfK5TV+rcClQbQRuALRLYD2xDdxMeRWlm5MtdXU18q/w++EDK1lDBSBwAAAABJRU5ErkJggg==",at=C({name:"cart-address",props:{item:{type:Object,default:()=>({})},isLink:{type:Boolean,default:!0},setAddress:{type:Function,default:a=>{}}},setup(a){const d=R(),t=L(()=>[a.item.provinceName,a.item.cityName,a.item.regionName,a.item.detailAddress].join("")),c=()=>{!a.isLink||d.push("/shopAddress")};return()=>e(F,null,[a.item&&a.item.phoneNumber?e(g,{class:_.cell,"is-link":a.isLink,onClick:()=>c(),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:()=>c()},{icon:()=>e(b,{name:ot,size:28},null),title:()=>e("div",{class:_.emtry},[n("\u53BB\u586B\u5199\u6536\u8D27\u5730\u5740")])})])}});const st="_payment_1ot0l_1",nt="_title_1ot0l_13",rt="_payAmount_1ot0l_21",lt="_amount_1ot0l_31",ct="_blank_1ot0l_38",it="_payTypeRe_1ot0l_41",ut="_recommend_1ot0l_45",dt="_payBtn_1ot0l_54";var m={payment:st,title:nt,payAmount:rt,amount:lt,blank:ct,payTypeRe:it,recommend:ut,payBtn:dt},pt=C({name:"payment",props:{paymentConfig:{type:Object,default:{}}},emits:["backOut","close","confirm"],setup(a,{slots:d,attrs:t,emit:c}){const r=H({payType:"wx",pay_channel:""}),N=()=>{W({message:"\u662F\u5426\u653E\u5F03\u672C\u6B21\u4ED8\u6B3E",confirmButtonText:"\u7EE7\u7EED\u4ED8\u6B3E",cancelButtonText:"\u653E\u5F03",showCancelButton:!0}).catch(async()=>{await S(),c("backOut"),c("close")})},S=async i=>{},I=async()=>{const i=r.payType;f().weixin?i=="zfb"?(r.pay_channel="alipay_qr",h("qrCode")):i=="wx"&&(r.pay_channel="wx_pub",h("pay")):f().alipay?i=="zfb"?(r.pay_channel="alipay_wap",h("pay")):i=="wx"&&(r.pay_channel="wx_pub",h("qrCode")):(i=="zfb"?r.pay_channel="alipay_qr":i=="wx"&&(r.pay_channel="wx_pub"),h("qrCode"))},h=i=>{const v=i=="qrCode"?"payCenter":"payResult";c("confirm",{payCode:v,pay_channel:r.pay_channel})};return()=>e("div",{class:m.payment},[e(b,{onClick:N,name:"cross",size:20},null),e("div",{class:[m.title]},[n("\u9009\u62E9\u652F\u4ED8\u65B9\u5F0F")]),e("div",{class:m.payAmount},[e("p",null,[n("\u5E94\u4ED8\u91D1\u989D")]),e("div",{class:m.amount},[e("span",null,[n("\uFFE5 ")]),x(a.paymentConfig.currentPrice)])]),e(oe,{modelValue:r.payType,"onUpdate:modelValue":i=>r.payType=i},{default:()=>[e(O,{border:!1},{default:()=>[e(g,{border:!0,center:!0,onClick:()=>{r.payType="wx"}},{icon:()=>e(b,{name:"wechat-pay",color:"#15c434",size:22},null),"right-icon":()=>e(D,{name:"wx"},null),title:()=>e("div",{class:m.payTypeRe},[n("\u5FAE\u4FE1\u652F\u4ED8 "),e("span",{class:m.recommend},[n("\u63A8\u8350")])])}),e(g,{title:"\u652F\u4ED8\u5B9D\u652F\u4ED8",border:!0,center:!0,onClick:()=>{r.payType="zfb"}},{icon:()=>e(b,{name:"alipay",color:"#009fe9",size:22},null),"right-icon":()=>e(D,{name:"zfb"},null)})]})]}),e("div",{class:m.blank},null),e(k,{type:"primary",class:m.payBtn,block:!0,round:!0,onClick:I},{default:()=>[n("\u786E\u8BA4\u652F\u4ED8")]})])}});const mt="_colProtocol_rqtsv_1",ht="_protocolText_rqtsv_6",ft="_boxStyle_rqtsv_10",yt="_protocolContent_rqtsv_30";var w={colProtocol:mt,protocolText:ht,boxStyle:ft,protocolContent:yt};const _t={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 gt=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 d=0;for(let r in a.query)d+=1;const t=window.location.href,c=d>0?"&pto="+ +new Date:"?pto="+ +new Date;history.pushState("","",`${t}${c}`)}else window.history.go(-1);this.protocolPopup&&(this.protocolPopup.scrollTop=0)}},render(){return e("div",{class:w.colProtocol},[e(ne,{modelValue:this.checked,"onUpdate:modelValue":a=>this.checked=a},{default:()=>[n("\u6211\u5DF2\u9605\u8BFB\u5E76\u540C\u610F")],icon:a=>e(b,{class:w.boxStyle,name:a.checked?ae:se,size:"15"},null)}),e("span",{onClick:this.getContractDetail,class:w.protocolText},[_t[this.prototcolType]]),e(G,{ref:this.protocolPopup,show:this.popupStatus,position:"bottom",style:{height:"100%"}},{default:()=>[this.showHeader&&e(E,{title:"\u7BA1\u4E50\u56E2\u5E73\u53F0\u670D\u52A1\u534F\u8BAE"},null),this.popupStatus&&e("div",{id:"mProtocol"},[e("div",{class:w.protocolContent,innerHTML:this.protocolHTML},null)])]})])}});const Ct="_userAuth_1sper_1",qt="_cellGroup_1sper_6",Tt="_btnGroup_1sper_38";var M={userAuth:Ct,cellGroup:qt,btnGroup:Tt},bt=C({name:"UserAuth",props:{onSuccess:{type:Function,default:()=>{}},hideHeader:{type:Boolean,default:!1}},data(){return{form:{realName:"",idCardNo:""}}},mounted(){const a=T.user.data;this.form.realName=a==null?void 0:a.account.realName},methods:{async onSubmit(){try{const a=T.platformApi+"/sysAccount/realNameAuth";await y.post(a,{data:{...this.form,contract:!0,save:!0}}),T.user.data.account.realName=this.form.realName,T.user.data.account.idCardNo=this.form.idCardNo,this.onSuccess()}catch{}}},render(){return e(re,{class:M.userAuth,onSubmit:this.onSubmit},{default:()=>[!this.hideHeader&&e(E,{title:"\u5B9E\u540D\u8BA4\u8BC1"},null),e(O,{inset:!0,class:M.cellGroup},{default:()=>[e(V,{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(V,{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(k,{block:!0,round:!0,type:"primary","native-type":"submit"},{default:()=>[n("\u786E\u5B9A")]})])]})}});const St="_saveShareImage_hccn0_1",vt="_previewSection_hccn0_16",At="_topImage_hccn0_23",wt="_shareContaienr_hccn0_29",Nt="_orchestraContainer_hccn0_38",It="_schoolName_hccn0_42",Pt="_tips_hccn0_48",Bt="_tipsTitle_hccn0_54",Ft="_tipsContent_hccn0_60",xt="_schoolLogo_hccn0_66",kt="_shareType_hccn0_86",Et="_qrcodeSection_hccn0_95",Ot="_memo_hccn0_103",Ut="_endTime_hccn0_115";var u={saveShareImage:St,previewSection:vt,topImage:At,shareContaienr:wt,orchestraContainer:Nt,schoolName:It,tips:Pt,tipsTitle:Bt,tipsContent:Ft,schoolLogo:xt,shareType:kt,qrcodeSection:Et,memo:Ot,endTime:Ut},Dt=C({name:"qrcode-payment",props:{url:{type:String,default:""},pay_channel:{type:String,default:"wx_pub"},orderType:{type:String,default:""}},setup(a){return()=>e("div",{class:[u.saveShareImage]},[e(z,{src:pe,class:u.topImage},null),e("div",{class:[u.shareContaienr,u.orchestraContainer]},[e("div",{class:u.schoolName},[a.orderType==="VIP"?"\u4F1A\u5458\u8D2D\u4E70":"\u62A5\u540D\u7F34\u8D39"]),e("div",{class:u.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:u.qrcodeSection},[e(me,{text:a.url,logoSize:"small",size:"100%"},null)]),e("div",{class:u.memo},[n("\u8BF7\u572830\u5206\u949F\u5185\u626B\u7801\u652F\u4ED8")])]),e("div",{class:[u.shareContaienr,u.tips]},[e("div",{class:u.tipsTitle},[n("\u4F7F\u7528\u8BF4\u660E\uFF1A")]),e("div",{class:u.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")])])])}}),co=C({name:"order-detail",setup(){const a=K(),d=R(),t=H({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}),c=L(()=>t.orderInfo.orderType),r=$({}),N=async()=>{try{const{data:o}=await y.get("/api-student/userPaymentOrder/detail/"+t.orderNo),s=o.goodsInfos||[];t.orderInfo=o;let p=!1,B=!1;s.forEach(q=>{const J=q.goodsUrl?q.goodsUrl.split(",")[0]:"";q.goodsUrl=J,q.goodsType==="INSTRUMENTS"?p=!0:q.goodsType==="TEXTBOOK"&&(B=!0)}),t.goodsInfos=s,r.value.id||(r.value=o.addresses||{}),console.log(p,B),!p&&B?t.freight="\u5230\u4ED8":t.freight="\u514D\u8FD0\u8D39",o.status!=="WAIT_PAY"&&o.status!=="PAYING"&&(t.dialogStatus=!0,t.dialogMessage="\u8BA2\u5355"+de[o.status])}catch{}},S=o=>{const s=t.config;t.pay_channel=o.pay_channel,o.payCode==="payResult"?window.location.href=window.location.origin+"/orchestra-student/#/payResult?"+le.stringify({pay_channel:o.pay_channel,wxAppId:s.wxAppId,body:s.body,price:s.price,orderNo:s.merOrderNo,userId:s.userId}):(t.qrCodeUrl=window.location.origin+"/orchestra-student/#/payDefine?pay_channel="+o.pay_channel+"&wxAppId="+s.wxAppId+"&body="+s.body+"&price="+s.price+"&orderNo="+s.merOrderNo+"&userId="+s.userId,console.log(t.qrCodeUrl,"qrCodeUrl"),t.showQrcode=!0,t.paymentStatus=!1,setTimeout(()=>{I()},300))},I=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"&&(clearInterval(o),setTimeout(()=>{P()},100))}catch{clearInterval(o)}},5e3)},h=()=>{const o=t.pay_channel;let s="qrCode";f().weixin?o=="alipay_qr"||o=="alipay_wap"?s="qrCode":o=="wx_pub"&&(s="pay"):f().alipay&&o=="alipay_wap"?s="pay":s="qrCode",S({payCode:s=="qrCode"?"payDefine":"payResult",pay_channel:o})},i=async()=>{clearInterval(t.orderTimer),c.value==="VIP"?X(v):Y(v)},v=()=>{t.pay_channel?h():t.paymentStatus=!0},X=async o=>{try{t.submitStatus=!0;const{data:s}=await y.get("/api-student/userPaymentOrder/detail/"+t.orderNo,{hideLoading:!1});console.log(s),t.pay_channel=s.paymentChannel,t.submitStatus=!1,s.status!=="WAIT_PAY"&&s.status!=="PAYING"?d.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=T.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}});console.log(p),t.pay_channel=p.paymentChannel,t.submitStatus=!1,p.status!=="WAIT_PAY"&&p.status!=="PAYING"?P():o&&o()}catch{t.submitStatus=!1}},P=()=>{c.value==="ORCHESTRA"?window.location.replace("https://mp.weixin.qq.com/s?__biz=MzkxMDMwOTI5Nw==&mid=2247485362&idx=3&sn=9b265d36b5dabe7f9393fc679c367540&chksm=c12c256cf65bac7ae2a865435b950f6e1285afd226356db0ffde815b1ee345f29cfcdb798cc9#rd"):d.replace({path:"/payment-result",query:{orderNo:t.orderNo}})},Z=async()=>{try{await y.post("/api-student/userPaymentOrder/cancelPayment/"+t.orderNo),d.back()}catch{}},j=()=>{t.authShow=!1,i()};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"),N()}),()=>e(F,null,[f().isApp&&e(E,{border:!1},null),e("div",{class:l.cartConfirm},[c.value==="ORCHESTRA"&&e("div",{class:l.cartConfirmBox},[e(at,{item:r.value},null)]),e(O,{style:{margin:0}},{default:()=>[t.goodsInfos&&t.goodsInfos.map(o=>e(g,{class:l.cellItem,onClick:()=>{o.goodsType==="INSTRUMENTS"||o.goodsType==="TEXTBOOK"?(console.log(o),t.selectGoodsId=o.goodsId,t.currentPrice=o.currentPrice,t.goodsStatus=!0):o.goodsType==="VIP"&&(t.memberBaoStatus=!0)}},{icon:()=>e(z,{class:l.img,src:o.goodsUrl},null),title:()=>e("div",{class:l.goodsContent},[e("h2",null,[e("span",null,[o.goodsName]),e("span",{class:l.goodsNum},[o.goodsType==="VIP"?"6\u4E2A\u6708":"x 1"])]),e("div",{class:l.goodsPrice},[e(Q,{color:"linear-gradient(135deg, #FF8C4A 0%, #FF531C 100%)",textColor:"#fff",class:l.brandName},{default:()=>[o.brandName]}),e("span",{class:[l.goodsNums,o.paymentCashAmount>0?l.numFont:l.free]},[o.paymentCashAmount>0?e(F,null,[e("span",{class:l.numPrefix},[n("\xA5 ")]),x(o.paymentCashAmount)]):"\u514D\u8D39"])]),e("p",{class:l.model},[o.description])])}))]}),c.value==="ORCHESTRA"&&e(g,{class:l.freight,title:"\u8FD0\u8D39",value:t.freight},null)]),e(te,{position:"bottom"},{default:()=>[e("div",{class:l.protocol},[e(gt,{modelValue:t.agreeStatus,"onUpdate:modelValue":o=>t.agreeStatus=o,showHeader:t.showHeader,style:{paddingTop:0,paddingBottom:0}},null)]),e("div",{class:l.paymentContainer},[e("div",{class:l.payemntPrice},[e("p",{class:l.needPrice},[n("\u652F\u4ED8\u91D1\u989D\uFF1A"),e("span",null,[n("\xA5 "),x(t.orderInfo.currentPrice)])])]),e("div",{class:l.paymentBtn},[e(k,{color:"linear-gradient(135deg, #FF8C4A 0%, #FF531C 100%)",round:!0,onClick:i,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(pt,{paymentConfig:t.orderInfo,onClose:()=>t.paymentStatus=!1,onBackOut:Z,onConfirm:o=>S(o)},null)]}),e(A,{modelValue:t.showQrcode,"onUpdate:modelValue":o=>t.showQrcode=o,onClose:()=>{clearInterval(t.orderTimer)}},{default:()=>[e(Dt,{url:t.qrCodeUrl,pay_channel:t.pay_channel,orderType:c.value},null)]}),e(A,{modelValue:t.authShow,"onUpdate:modelValue":o=>t.authShow=o},{default:()=>[e(bt,{onSuccess:j,hideHeader:!f().isApp},null)]}),e(A,{modelValue:t.memberBaoStatus,"onUpdate:modelValue":o=>t.memberBaoStatus=o,position:"right"},{default:()=>[e(ce,null,null)]}),e(A,{modelValue:t.goodsStatus,"onUpdate:modelValue":o=>t.goodsStatus=o,position:"right",destroy:!0},{default:()=>[t.goodsStatus&&e(ie,{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:()=>{P()}},null)])}});export{co as default};
|