!function(){function e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function n(n){for(var r=1;r0?"&pto="+ +new Date:"?pto="+ +new Date;history.pushState("","","".concat(r).concat(o))}else window.history.go(-1);this.protocolPopup&&(this.protocolPopup.scrollTop=0)}},render:function(){var e=this;return c("div",{class:ae},[c(R,{modelValue:this.checked,"onUpdate:modelValue":function(n){return e.checked=n}},{default:function(){return[l("我已阅读并同意")]},icon:function(e){return c(s,{class:ce,name:e.checked?I:N,size:"15"},null)}}),c("span",{onClick:this.getContractDetail,class:ie},[se[this.prototcolType]]),c(g,{ref:this.protocolPopup,show:this.popupStatus,position:"bottom",style:{height:"100%"}},{default:function(){return[e.showHeader&&c(t,{title:"管乐团平台服务协议"},null),e.popupStatus&&c("div",{id:"mProtocol"},[c("div",{class:le,innerHTML:e.protocolHTML},null)])]}})])}}),me="_userAuth_1sper_1",de="_cellGroup_1sper_6",_e=r({name:"UserAuth",props:{onSuccess:{type:Function,default:function(){}},hideHeader:{type:Boolean,default:!1}},data:function(){return{form:{realName:"",idCardNo:""}}},mounted:function(){var e=h.user.data;this.form.realName=null==e?void 0:e.account.realName},methods:{onSubmit:function(){var e=this;return o(regeneratorRuntime.mark((function t(){var r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,r=h.platformApi+"/sysAccount/realNameAuth",t.next=4,v.post(r,{data:n(n({},e.form),{},{contract:!0,save:!0})});case 4:h.user.data.account.realName=e.form.realName,h.user.data.account.idCardNo=e.form.idCardNo,e.onSuccess(),t.next=11;break;case 9:t.prev=9,t.t0=t.catch(0);case 11:case"end":return t.stop()}}),t,null,[[0,9]])})))()}},render:function(){var e=this;return c(z,{class:me,onSubmit:this.onSubmit},{default:function(){return[!e.hideHeader&&c(t,{title:"实名认证"},null),c(P,{inset:!0,class:de},{default:function(){return[c(V,{required:!0,label:"真实姓名",modelValue:e.form.realName,"onUpdate:modelValue":function(n){return e.form.realName=n},rules:[{required:!0,message:"请填写真实姓名"}],name:"realName",placeholder:"请填写真实姓名",maxlength:"50"},null),c(V,{required:!0,label:"身份证号",modelValue:e.form.idCardNo,"onUpdate:modelValue":function(n){return e.form.idCardNo=n},maxlength:18,rules:[{required:!0,message:"请输入身份证号"},{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:"请输入正确的身份证号"}],placeholder:"请输入身份证号"},null)]}}),c("div",{class:["btnGroup"]},[c(_,{block:!0,round:!0,type:"primary","native-type":"submit"},{default:function(){return[l("确定")]}})])]}})}}),pe="_saveShareImage_hccn0_1",fe="_topImage_hccn0_23",ve="_shareContaienr_hccn0_29",ge="_orchestraContainer_hccn0_38",he="_schoolName_hccn0_42",be="_tips_hccn0_48",Ae="_tipsTitle_hccn0_54",ye="_tipsContent_hccn0_60",we="_shareType_hccn0_86",Ce="_qrcodeSection_hccn0_95",ke="_memo_hccn0_103",xe=r({name:"qrcode-payment",props:{url:{type:String,default:""},pay_channel:{type:String,default:"wx_pub"},orderType:{type:String,default:""}},setup:function(e){return function(){return c("div",{class:[pe]},[c(U,{src:D,class:fe},null),c("div",{class:[ve,ge]},[c("div",{class:he},["VIP"===e.orderType?"会员购买":"报名缴费"]),c("div",{class:we},[l("请截图下方二维码"),c("span",null,[l("登录"),"wx_pub"===e.pay_channel?"微信":"支付宝",l("扫码支付")])]),c("div",{class:Ce},[c(j,{text:e.url,logoSize:"small",size:"100%"},null)]),c("div",{class:ke},[l("请在30分钟内扫码支付")])]),c("div",{class:[ve,be]},[c("div",{class:Ae},[l("使用说明:")]),c("div",{class:ye},[l("1.打开"),"wx_pub"===e.pay_channel?"微信":"支付宝",l("扫一扫"),c("br",null,null),l("2.选择相册中的二维码"),c("br",null,null),l("3.请在30分钟内扫码支付")])])])}}});e("default",r({name:"order-detail",setup:function(){var e=b(),n=a(),r=m({orderTimer:null,paymentStatus:!1,showQrcode:!1,qrCodeUrl:"",pay_channel:"",orderNo:e.query.orderNo,orderInfo:{},goodsInfos:[],config:e.query.config?JSON.parse(e.query.config):{},hasFreight:!e.query.hf,freight:"",agreeStatus:!0,showHeader:!1,authShow:!1,memberBaoStatus:!1,goodsStatus:!1,selectGoodsId:null,currentPrice:0,dialogStatus:!1,dialogMessage:"",submitStatus:!1}),s=i((function(){return r.orderInfo.orderType})),p=A({}),S=function(){var e=o(regeneratorRuntime.mark((function e(){var n,t,o,a,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,v.get("/api-student/userPaymentOrder/detail/"+r.orderNo);case 3:n=e.sent,t=n.data,o=t.goodsInfos||[],r.orderInfo=t,a=!1,i=!1,o.forEach((function(e){var n=e.goodsUrl?e.goodsUrl.split(",")[0]:"";e.goodsUrl=n,"INSTRUMENTS"===e.goodsType?a=!0:"TEXTBOOK"===e.goodsType&&(i=!0)})),r.goodsInfos=o,p.value.id||(p.value=t.addresses||{}),console.log(a,i),r.freight=!a&&i?"到付":"免运费","WAIT_PAY"!==t.status&&"PAYING"!==t.status&&(r.dialogStatus=!0,r.dialogMessage="订单"+M[t.status]),e.next=19;break;case 17:e.prev=17,e.t0=e.catch(0);case 19:case"end":return e.stop()}}),e,null,[[0,17]])})));return function(){return e.apply(this,arguments)}}(),T=function(e){var n=r.config;r.pay_channel=e.pay_channel,"payResult"===e.payCode?window.location.href=window.location.origin+"/orchestra-student/#/payResult?"+E.stringify({pay_channel:e.pay_channel,wxAppId:n.wxAppId,body:n.body,price:n.price,orderNo:n.merOrderNo,userId:n.userId}):(r.qrCodeUrl=window.location.origin+"/orchestra-student/#/payDefine?pay_channel="+e.pay_channel+"&wxAppId="+n.wxAppId+"&body="+n.body+"&price="+n.price+"&orderNo="+n.merOrderNo+"&userId="+n.userId,console.log(r.qrCodeUrl,"qrCodeUrl"),r.showQrcode=!0,r.paymentStatus=!1,setTimeout((function(){I()}),300))},I=function(){var n=o(regeneratorRuntime.mark((function n(){var t;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:t=setInterval(o(regeneratorRuntime.mark((function n(){var o,a;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if("orderDetail"==e.name){n.next=3;break}return clearInterval(t),n.abrupt("return");case 3:return r.orderTimer=t,n.prev=4,n.next=7,v.post("/api-student/open/userOrder/paymentStatus/"+r.orderNo,{hideLoading:!0});case 7:o=n.sent,"WAIT_PAY"!==(a=o.data).status&&"PAYING"!==a.status&&(clearInterval(t),setTimeout((function(){D()}),100)),n.next=15;break;case 12:n.prev=12,n.t0=n.catch(4),clearInterval(t);case 15:case"end":return n.stop()}}),n,null,[[4,12]])}))),5e3);case 1:case"end":return n.stop()}}),n)})));return function(){return n.apply(this,arguments)}}(),N=function(){var e=o(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:clearInterval(r.orderTimer),"VIP"===s.value?z(R):V(R);case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),R=function(){r.pay_channel?function(){var e=r.pay_channel,n="qrCode";f().weixin?"alipay_qr"==e||"alipay_wap"==e?n="qrCode":"wx_pub"==e&&(n="pay"):n=f().alipay&&"alipay_wap"==e?"pay":"qrCode",T({payCode:"qrCode"==n?"payDefine":"payResult",pay_channel:e})}():r.paymentStatus=!0},z=function(){var e=o(regeneratorRuntime.mark((function e(t){var o,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,r.submitStatus=!0,e.next=4,v.get("/api-student/userPaymentOrder/detail/"+r.orderNo,{hideLoading:!1});case 4:o=e.sent,a=o.data,console.log(a),r.pay_channel=a.paymentChannel,r.submitStatus=!1,"WAIT_PAY"!==a.status&&"PAYING"!==a.status?n.replace({path:"/payment-result",query:{orderNo:r.orderNo}}):t&&t(),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(0),r.submitStatus=!1;case 15:case"end":return e.stop()}}),e,null,[[0,12]])})));return function(n){return e.apply(this,arguments)}}(),V=function(){var e=o(regeneratorRuntime.mark((function e(n){var t,o,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(p.value.id){e.next=3;break}return w("请选择收货地址"),e.abrupt("return");case 3:if(r.agreeStatus){e.next=6;break}return w("请先阅读并同意《管乐团平台服务协议》"),e.abrupt("return");case 6:if(null!=(t=h.user.data)&&t.account.realName&&null!=t&&t.account.idCardNo){e.next=10;break}return r.authShow=!0,e.abrupt("return");case 10:return r.submitStatus=!0,e.prev=11,e.next=14,v.post("/api-student/userPaymentOrder/updateReceiveAddress",{hideLoading:!1,data:{orderNo:r.orderNo,orderType:"ORCHESTRA",receiveAddress:p.value.id}});case 14:o=e.sent,a=o.data,console.log(a),r.pay_channel=a.paymentChannel,r.submitStatus=!1,"WAIT_PAY"!==a.status&&"PAYING"!==a.status?D():n&&n(),e.next=25;break;case 22:e.prev=22,e.t0=e.catch(11),r.submitStatus=!1;case 25:case"end":return e.stop()}}),e,null,[[11,22]])})));return function(n){return e.apply(this,arguments)}}(),D=function(){"ORCHESTRA"===s.value?window.location.replace("https://mp.weixin.qq.com/s?__biz=MzkxMDMwOTI5Nw==&mid=2247485329&idx=3&sn=bc4012d392c12a6b7957390e88ee3ee5&chksm=c12c254ff65bac59e0a3bcd99e97601fab57ebe561b9bf3209376ed3b0b7491ca38381d21a65#rd"):n.replace({path:"/payment-result",query:{orderNo:r.orderNo}})},j=function(){var e=o(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,v.post("/api-student/userPaymentOrder/cancelPayment/"+r.orderNo);case 3:n.back(),e.next=8;break;case 6:e.prev=6,e.t0=e.catch(0);case 8:case"end":return e.stop()}}),e,null,[[0,6]])})));return function(){return e.apply(this,arguments)}}(),L=function(){r.authShow=!1,N()};return y((function(){f().isApp?r.showHeader=!0:r.showHeader=!1;var e=sessionStorage.getItem("addressDetails");e=e?JSON.parse(e):{},p.value=e,sessionStorage.removeItem("addressDetails"),S()})),function(){return c(u,null,[f().isApp&&c(t,{border:!1},null),c("div",{class:Y.cartConfirm},["ORCHESTRA"===s.value&&c("div",{class:Y.cartConfirmBox},[c(Z,{item:p.value},null)]),c(P,{style:{margin:0}},{default:function(){return[r.goodsInfos&&r.goodsInfos.map((function(e){return c(C,{class:Y.cellItem,onClick:function(){"INSTRUMENTS"===e.goodsType||"TEXTBOOK"===e.goodsType?(console.log(e),r.selectGoodsId=e.goodsId,r.currentPrice=e.currentPrice,r.goodsStatus=!0):"VIP"===e.goodsType&&(r.memberBaoStatus=!0)}},{icon:function(){return c(U,{class:Y.img,src:e.goodsUrl},null)},title:function(){return c("div",{class:Y.goodsContent},[c("h2",null,[c("span",null,[e.goodsName]),c("span",{class:Y.goodsNum},["VIP"===e.goodsType?"6个月":"x 1"])]),c("div",{class:Y.goodsPrice},[c(k,{color:"linear-gradient(135deg, #FF8C4A 0%, #FF531C 100%)",textColor:"#fff",class:Y.brandName},{default:function(){return[e.brandName]}}),c("span",{class:[Y.goodsNums,e.paymentCashAmount>0?Y.numFont:Y.free]},[e.paymentCashAmount>0?c(u,null,[c("span",{class:Y.numPrefix},[l("¥ ")]),d(e.paymentCashAmount)]):"免费"])]),c("p",{class:Y.model},[e.description])])}})}))]}}),"ORCHESTRA"===s.value&&c(C,{class:Y.freight,title:"运费",value:r.freight},null)]),c(x,{position:"bottom",background:"white"},{default:function(){return[c("div",{class:Y.protocol},[c(ue,{modelValue:r.agreeStatus,"onUpdate:modelValue":function(e){return r.agreeStatus=e},showHeader:r.showHeader,style:{paddingTop:0,paddingBottom:0}},null)]),c("div",{class:Y.paymentContainer},[c("div",{class:Y.payemntPrice},[c("p",{class:Y.needPrice},[l("支付金额:"),c("span",null,[l("¥ "),d(r.orderInfo.currentPrice)])])]),c("div",{class:Y.paymentBtn},[c(_,{color:"linear-gradient(135deg, #FF8C4A 0%, #FF531C 100%)",round:!0,onClick:N,loading:r.submitStatus,disabled:r.submitStatus},{default:function(){return[l("立即购买")]}})])])]}}),c(g,{show:r.paymentStatus,closeOnClickOverlay:!1,position:"bottom",round:!0,closeOnPopstate:!0,safeAreaInsetBottom:!0,style:{minHeight:"30%"}},{default:function(){return[c(oe,{paymentConfig:r.orderInfo,onClose:function(){return r.paymentStatus=!1},onBackOut:j,onConfirm:function(e){return T(e)}},null)]}}),c(O,{modelValue:r.showQrcode,"onUpdate:modelValue":function(e){return r.showQrcode=e},onClose:function(){clearInterval(r.orderTimer)}},{default:function(){return[c(xe,{url:r.qrCodeUrl,pay_channel:r.pay_channel,orderType:s.value},null)]}}),c(O,{modelValue:r.authShow,"onUpdate:modelValue":function(e){return r.authShow=e}},{default:function(){return[c(_e,{onSuccess:L,hideHeader:!f().isApp},null)]}}),c(O,{modelValue:r.memberBaoStatus,"onUpdate:modelValue":function(e){return r.memberBaoStatus=e},position:"right"},{default:function(){return[c(q,null,null)]}}),c(O,{modelValue:r.goodsStatus,"onUpdate:modelValue":function(e){return r.goodsStatus=e},position:"right",destroy:!0},{default:function(){return[r.goodsStatus&&c(B,{id:r.selectGoodsId,groupPrice:r.currentPrice},null)]}}),c(G,{title:"提示",show:r.dialogStatus,"onUpdate:show":function(e){return r.dialogStatus=e},message:r.dialogMessage,confirmButtonText:"确定",onConfirm:function(){D()}},null)])}}}))}}}))}();