(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["SignUpPayment"],{"1a6a":function(t,e,n){},3908:function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));n("433b");var a=n("d399");function i(t){t?a["a"].loading({duration:0,forbidClick:!0,message:"加载中..."}):a["a"].clear()}},4053:function(t,e,n){"use strict";n.r(e);var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"signUpPayment"},[n("m-step",{attrs:{number:4}}),n("van-cell-group",[t.orderInfo.subjectNameS?n("van-cell",{attrs:{title:"报考专业:",border:!1},scopedSlots:t._u([{key:"default",fn:function(){return[t._v(t._s(t.orderInfo.subjectName))]},proxy:!0}],null,!1,1709079630)}):t._e(),n("van-cell",{attrs:{title:"乐理知识:",border:!1},scopedSlots:t._u([{key:"default",fn:function(){return[t._v(t._s(t.orderInfo.examMusicTheoryLevel))]},proxy:!0}])}),n("van-cell",{attrs:{title:"预计考试日期:",border:!1},scopedSlots:t._u([{key:"default",fn:function(){return[t._v(t._s(t.orderInfo.examStartTime))]},proxy:!0}])}),n("van-cell",{attrs:{title:"报名费用:",border:!1},scopedSlots:t._u([{key:"default",fn:function(){return[t._v("¥"+t._s(t.orderInfo.fee))]},proxy:!0}])})],1),n("div",{staticClass:"notice"},[t._v("\n 请考生于考试两周前严格按照系统要求进行报名及缴费,确保所填信息准确无误,确认之后所有信息无法更改,如因填写内容有误而造成损失,责任由报考者本人承担;请考生在报名缴费前确认可在考试时间内参加考试,最终以准考证上的考试信息为准,请务必按照要求参加考试,否则视为弃考。考生如无法保证按照准考证信息参加考试请慎重报考,报名费用一旦支付后均不允许更改报考级别或退款。\n ")]),n("div",{staticClass:"pay-group"},[n("div",{staticClass:"pay-amount"},[n("span",[t._v("¥")]),t._v(t._s(t.orderInfo.fee)+"\n ")]),n("div",{staticClass:"pay-btn"},[n("van-button",{attrs:{color:"#2DC7AA",round:""},on:{click:t.onSubmit}},[t._v("确认并支付")])],1)]),n("m-payment",{attrs:{closeStatus:t.isStatus,amount:Number(t.payMoney),payment:t.payment},on:{onChangeStatus:t.onChangeStatus}})],1)},i=[],r=n("a34a"),s=n.n(r),o=n("ab6b"),u=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"mpayment"},[a("van-popup",{style:{minHeight:"30%"},attrs:{"close-on-click-overlay":!1,"close-icon-position":"top-left",position:"bottom",round:"",closeOnPopstate:!0,"safe-area-inset-bottom":!0},model:{value:t.isShow,callback:function(e){t.isShow=e},expression:"isShow"}},[a("i",{staticClass:"van-icon van-icon-cross van-popup__close-icon van-popup__close-icon--top-left",on:{click:t.onClose}}),a("div",{staticClass:"title van-hairline--bottom"},[t._v("选择支付方式")]),a("div",{staticClass:"payAmount"},[a("p",[t._v("应付金额")]),a("div",{staticClass:"amount"},[t._v(t._s(t.payAmount)),a("span",[t._v("元")])])]),a("van-radio-group",{model:{value:t.payType,callback:function(e){t.payType=e},expression:"payType"}},[a("div",{staticClass:"payment-item van-hairline--bottom",on:{click:function(e){t.payType="zfb"}}},[a("div",{staticClass:"logo-section"},[a("img",{staticClass:"logo",attrs:{src:n("9c08"),alt:""}})]),a("div",{staticClass:"title-section"},[t._v("支付宝支付")]),a("div",{staticClass:"value-section"},[a("van-radio",{attrs:{name:"zfb"}})],1)]),a("div",{staticClass:"payment-item",on:{click:function(e){t.payType="wx"}}},[a("div",{staticClass:"logo-section"},[a("img",{staticClass:"logo",attrs:{src:n("8f37"),alt:""}})]),a("div",{staticClass:"title-section"},[t._v("微信支付")]),a("div",{staticClass:"value-section"},[a("van-radio",{attrs:{name:"wx"}})],1)])]),a("div",{staticClass:"blank"}),a("van-button",{attrs:{type:"primary",block:""},on:{click:t.onSubmit}},[t._v("确认支付")])],1)],1)},c=[],d=n("cf45"),l={name:"mHeader",props:{closeStatus:{type:Boolean,default:!1},amount:{type:Number,default:0},payment:{type:Object}},data:function(){return{isShow:this.closeStatus,payAmount:this.amount,paymentObject:this.payment,payType:"zfb"}},methods:{onClose:function(){var t=this;this.$dialog.confirm({message:"是否放弃本次付款",confirmButtonText:"继续付款",cancelButtonText:"放弃"}).then((function(){})).catch((function(){t.isShow=!1,t.$emit("onChangeStatus",t.isShow)}))},onSubmit:function(){var t=this.payType,e=window.navigator.userAgent.toLowerCase();"micromessenger"==e.match(/MicroMessenger/i)?"zfb"==t?(this.pay_channel="alipay_qr",this.getCodePay("qrCode")):"wx"==t&&(this.pay_channel="wx_pub",this.getCodePay("pay")):"alipayclient"==e.match(/AlipayClient/i)?"zfb"==t?(this.pay_channel="alipay_wap",this.getCodePay("pay")):"wx"==t&&(this.pay_channel="wx_pub",this.getCodePay("qrCode")):("zfb"==t?this.pay_channel="alipay_qr":"wx"==t&&(this.pay_channel="wx_pub"),this.getCodePay("qrCode"))},getCodePay:function(t){var e="qrCode"==t?"/payQRCode":"/payResult";this.$router.push({path:e,query:{payType:this.pay_channel,payment:JSON.stringify(this.paymentObject)}})}},watch:{closeStatus:function(t){this.isShow=t},amount:function(t){this.payAmount=Object(d["b"])(t)},payment:function(t){this.paymentObject=t}}},f=l,h=(n("b175"),n("2877")),p=Object(h["a"])(f,u,c,!1,null,"204e6bcc",null),m=p.exports,y=n("5a0c"),A=n.n(y),v=n("6612"),g=n.n(v),S=n("8900"),b=n("3908");function x(t,e,n,a,i,r,s){try{var o=t[r](s),u=o.value}catch(c){return void n(c)}o.done?e(u):Promise.resolve(u).then(a,i)}function w(t){return function(){var e=this,n=arguments;return new Promise((function(a,i){var r=t.apply(e,n);function s(t){x(r,a,i,s,o,"next",t)}function o(t){x(r,a,i,s,o,"throw",t)}s(void 0)}))}}var C={1:"壹级",2:"贰级",3:"叁级",4:"肆级",5:"伍级",6:"陆级",7:"柒级",8:"捌级",9:"玖级",10:"拾级"},_={name:"signUpPayment",components:{MStep:o["a"],MPayment:m},data:function(){var t=this.$route.query,e=localStorage.getItem("examRegistrationParams")?JSON.parse(localStorage.getItem("examRegistrationParams")):null;return{orderNo:t.orderNo,examRegistrationId:t.examRegistrationId,payMoney:0,orderInfo:{fee:0},params:e,payMap:{},isStatus:!1,paymentResult:null,payment:{}}},mounted:function(){this.__init()},methods:{__init:function(){var t=w(s.a.mark((function t(){var e,n,a;return s.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(Object(b["a"])(!0),t.prev=1,this.examRegistrationId){t.next=6;break}return Object(b["a"])(!1),this.params?this.onParse(this.params):window.history.go(-1),t.abrupt("return");case 6:return t.next=8,Object(S["f"])({examRegistrationId:this.examRegistrationId});case 8:e=t.sent,Object(b["a"])(!1),n=e.data,200==n.code?(a=n.data,this.onParse(a)):this.$toast(n.msg),t.next=16;break;case 14:t.prev=14,t.t0=t["catch"](1);case 16:case"end":return t.stop()}}),t,this,[[1,14]])})));function e(){return t.apply(this,arguments)}return e}(),onParse:function(t){var e=g()(t.theoryLevelFee).add(t.levelFee),n=e.value(),a=t.examMusicTheoryLevel?C[t.examMusicTheoryLevel]+"/¥".concat(g()(t.theoryLevelFee).format("0,0.00")):"免考",i={studentName:t.studentName,subjectNameS:t.subjectName,subjectName:t.subjectName+"(".concat(C[t.level],"/¥").concat(g()(t.levelFee).format("0,0.00"),")"),examMusicTheoryLevel:a,examStartTime:A()(t.examStartTime).format("YYYY-MM-DD"),fee:g()(n).format("0,0.00")};this.payMoney=n,this.orderInfo=i},onChangeStatus:function(t){this.isStatus=t},onSubmit:function(){var t=w(s.a.mark((function t(){return s.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!this.orderNo){t.next=5;break}return this.onRePay(),t.abrupt("return");case 5:this.onExamRegistration();case 6:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),onExamRegistration:function(){var t=w(s.a.mark((function t(){var e,n,a,i,r;return s.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return Object(b["a"])(!0),t.prev=1,t.next=4,Object(S["b"])(this.params);case 4:e=t.sent,Object(b["a"])(!1),n=e.data,200==n.code?(this.payMap=n.data.payMap,this.paymentResult=n.data.payMap,a=n.data.payMap.orderNo,this.orderNo=a,i=n.data.examRegister.id,r=window.location.origin,history.replaceState("","Title","".concat(r,"/#/signUpPayment?orderNo=").concat(a,"&examRegistrationId=").concat(i)),this.onSubmitPay()):this.$toast(n.msg),t.next=12;break;case 10:t.prev=10,t.t0=t["catch"](1);case 12:case"end":return t.stop()}}),t,this,[[1,10]])})));function e(){return t.apply(this,arguments)}return e}(),onRePay:function(){var t=w(s.a.mark((function t(){var e,n,a,i,r;return s.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return Object(b["a"])(!0),t.prev=1,t.next=4,Object(S["n"])({orderNo:this.orderNo});case 4:e=t.sent,Object(b["a"])(!1),n=e.data,200==n.code?(this.payMap=n.data.payMap,this.paymentResult=n.data.payMap,a=n.data.payMap.orderNo,this.orderNo=a,i=n.data.examRegister.id,r=window.location.origin,history.replaceState("","Title","".concat(r,"/#/signUpPayment?orderNo=").concat(a,"&examRegistrationId=").concat(i)),this.onSubmitPay()):this.$toast(n.msg),t.next=12;break;case 10:t.prev=10,t.t0=t["catch"](1);case 12:case"end":return t.stop()}}),t,this,[[1,10]])})));function e(){return t.apply(this,arguments)}return e}(),onSubmitPay:function(){var t=this.payMap;if("YQPAY"==t.type){var e=t.payMap;document.querySelector("#onSubmit").action=e.host,document.querySelector("#apiContent").value=e.apiContent,document.querySelector("#merNo").value=e.merNo,document.querySelector("#notifyUrl").value=e.notifyUrl,document.querySelector("#sign").value=e.sign,document.querySelector("#signType").value=e.signType,document.querySelector("#timestamp").value=e.timestamp,document.querySelector("#version").value=e.version,document.querySelector("#onSubmit").submit()}else"ADAPAY"==t.type&&(this.payment=t,this.isStatus=!0)}},destroyed:function(){window.removeEventListener("popstate",(function(){}))}},M=_,$=(n("8098"),Object(h["a"])(M,a,i,!1,null,"967d335a",null));e["default"]=$.exports},5096:function(t,e,n){},"5a0c":function(t,e,n){!function(e,n){t.exports=n()}(0,(function(){"use strict";var t="millisecond",e="second",n="minute",a="hour",i="day",r="week",s="month",o="quarter",u="year",c=/^(\d{4})-?(\d{1,2})-?(\d{0,2})[^0-9]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?.?(\d{1,3})?$/,d=/\[([^\]]+)]|Y{2,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,l=function(t,e,n){var a=String(t);return!a||a.length>=e?t:""+Array(e+1-a.length).join(n)+t},f={s:l,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),a=Math.floor(n/60),i=n%60;return(e<=0?"+":"-")+l(a,2,"0")+":"+l(i,2,"0")},m:function(t,e){var n=12*(e.year()-t.year())+(e.month()-t.month()),a=t.clone().add(n,s),i=e-a<0,r=t.clone().add(n+(i?-1:1),s);return Number(-(n+(e-a)/(i?a-r:r-a))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(c){return{M:s,y:u,w:r,d:i,D:"date",h:a,m:n,s:e,ms:t,Q:o}[c]||String(c||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},h={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},p="en",m={};m[p]=h;var y=function(t){return t instanceof S},A=function(t,e,n){var a;if(!t)return p;if("string"==typeof t)m[t]&&(a=t),e&&(m[t]=e,a=t);else{var i=t.name;m[i]=t,a=i}return!n&&a&&(p=a),a||!n&&p},v=function(t,e){if(y(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new S(n)},g=f;g.l=A,g.i=y,g.w=function(t,e){return v(t,{locale:e.$L,utc:e.$u,$offset:e.$offset})};var S=function(){function l(t){this.$L=this.$L||A(t.locale,null,!0),this.parse(t)}var f=l.prototype;return f.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(g.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var a=e.match(c);if(a)return n?new Date(Date.UTC(a[1],a[2]-1,a[3]||1,a[4]||0,a[5]||0,a[6]||0,a[7]||0)):new Date(a[1],a[2]-1,a[3]||1,a[4]||0,a[5]||0,a[6]||0,a[7]||0)}return new Date(e)}(t),this.init()},f.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},f.$utils=function(){return g},f.isValid=function(){return!("Invalid Date"===this.$d.toString())},f.isSame=function(t,e){var n=v(t);return this.startOf(e)<=n&&n<=this.endOf(e)},f.isAfter=function(t,e){return v(t)=e.index?n("svg-icon",{key:"oneImg",attrs:{iconClass:e.active}}):n("svg-icon",{key:"oneImg",attrs:{iconClass:e.default}}),n("p",{class:[t.number>=e.index?e.activeClass:""]},[t._v(t._s(e.text))])],1)})),0)])},i=[],r=n("0032"),s={name:"mStep",components:{SvgIcon:r["a"]},props:{number:{type:Number,default:1}},data:function(){return{imgUrlList:[{index:1,default:"",active:"icon_account_active",activeClass:"active",text:"账号"},{index:1.5,default:"icon_right_arrow",active:"icon_right_arrow_active",activeClass:"active",text:""},{index:2,default:"icon_baseInfo",active:"icon_baseInfo_active",activeClass:"active",text:"基本信息"},{index:2.5,default:"icon_right_arrow",active:"icon_right_arrow_active",activeClass:"active",text:""},{index:3,default:"icon_level",active:"icon_level_active",activeClass:"active",text:"考级信息"},{index:3.5,default:"icon_right_arrow",active:"icon_right_arrow_active",activeClass:"active",text:""},{index:4,default:"icon_payment",active:"icon_payment_active",activeClass:"active",text:"支付"}]}},methods:{}},o=s,u=(n("a298"),n("2877")),c=Object(u["a"])(o,a,i,!1,null,"7eaaf7a9",null);e["a"]=c.exports},b175:function(t,e,n){"use strict";var a=n("1a6a"),i=n.n(a);i.a}}]);