(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["SignUpBaseInfo"],{"04cf":function(t,e,n){"use strict";var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"mbutton"},[n("van-button",{attrs:{type:"primary",round:"",block:""},on:{click:t.onClick}},[t._v(t._s(t.text))])],1)},a=[],i={name:"mbutton",props:{text:String,disabled:Boolean},data:function(){return{}},methods:{onClick:function(){this.$emit("click")}}},o=i,s=(n("44b1"),n("2877")),c=Object(s["a"])(o,r,a,!1,null,"78910192",null);e["a"]=c.exports},2326:function(t,e,n){},"44b1":function(t,e,n){"use strict";var r=n("8d52"),a=n.n(r);a.a},"5a0c":function(t,e,n){!function(e,n){t.exports=n()}(0,(function(){"use strict";var t="millisecond",e="second",n="minute",r="hour",a="day",i="week",o="month",s="quarter",c="year",u=/^(\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 r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},f={s:l,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),a=n%60;return(e<=0?"+":"-")+l(r,2,"0")+":"+l(a,2,"0")},m:function(t,e){var n=12*(e.year()-t.year())+(e.month()-t.month()),r=t.clone().add(n,o),a=e-r<0,i=t.clone().add(n+(a?-1:1),o);return Number(-(n+(e-r)/(a?r-i:i-r))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(u){return{M:o,y:c,w:i,d:a,D:"date",h:r,m:n,s:e,ms:t,Q:s}[u]||String(u||"").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("_")},m="en",p={};p[m]=h;var v=function(t){return t instanceof w},b=function(t,e,n){var r;if(!t)return m;if("string"==typeof t)p[t]&&(r=t),e&&(p[t]=e,r=t);else{var a=t.name;p[a]=t,r=a}return!n&&r&&(m=r),r||!n&&m},$=function(t,e){if(v(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new w(n)},g=f;g.l=b,g.i=v,g.w=function(t,e){return $(t,{locale:e.$L,utc:e.$u,$offset:e.$offset})};var w=function(){function l(t){this.$L=this.$L||b(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 r=e.match(u);if(r)return n?new Date(Date.UTC(r[1],r[2]-1,r[3]||1,r[4]||0,r[5]||0,r[6]||0,r[7]||0)):new Date(r[1],r[2]-1,r[3]||1,r[4]||0,r[5]||0,r[6]||0,r[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=$(t);return this.startOf(e)<=n&&n<=this.endOf(e)},f.isAfter=function(t,e){return $(t)=15){if(!Object(h["b"])(t.idCardNo))return void this.$toast("输入身份证号有误");var e=this.getBirth(t.idCardNo),n=this.getSex(t.idCardNo);t.gender=n,t.birthdate=e}},getBirth:function(t){var e="";return null!=t&&""!=t&&(15==t.length?e="19"+t.slice(6,12):18==t.length&&(e=t.slice(6,14)),e=e.replace(/(.{4})(.{2})/,"$1-$2-")),e},getSex:function(t){var e=null;return e=parseInt(t.slice(-2,-1))%2==1?1:0,e},onConfirm:function(t){this.form.birthdate=p()(t).format("YYYY-MM-DD"),this.birthdateShow=!1},onConfirmNation:function(t){this.form.nation=t,this.nationStatus=!1},onChangeDate:function(){this.birthdateShow=!0,this.form.birthdate&&(this.currentDate=new Date(p()(this.form.birthdate)))},getFile:function(){var t=b(o.a.mark((function t(e){var n,r,a;return o.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return Object(u["a"])(!0),t.prev=1,n=new FormData,n.append("file",e),n.append("idCardSide","front"),t.next=7,Object(f["l"])(n);case 7:if(r=t.sent,a=r.data,Object(u["a"])(!1),200!=a.code){t.next=14;break}this.idCardParse(a.data),t.next=16;break;case 14:return this.$toast(a.msg),t.abrupt("return",!1);case 16:t.next=22;break;case 18:return t.prev=18,t.t0=t["catch"](1),Object(u["a"])(!1),t.abrupt("return",!1);case 22:case"end":return t.stop()}}),t,this,[[1,18]])})));function e(e){return t.apply(this,arguments)}return e}(),getFilePhoto:function(){var t=b(o.a.mark((function t(e){var n,r,a;return o.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return Object(u["a"])(!0),t.prev=1,n=new FormData,n.append("file",e),n.append("idCardSide","front"),t.next=7,Object(f["r"])(n);case 7:if(r=t.sent,a=r.data,Object(u["a"])(!1),200!=a.code){t.next=14;break}this.form.certificatePhoto=a.data.url,t.next=16;break;case 14:return this.$toast(a.msg),t.abrupt("return",!1);case 16:t.next=22;break;case 18:return t.prev=18,t.t0=t["catch"](1),Object(u["a"])(!1),t.abrupt("return",!1);case 22:case"end":return t.stop()}}),t,this,[[1,18]])})));function e(e){return t.apply(this,arguments)}return e}(),__init:function(){var t=b(o.a.mark((function t(){var e,n,r,a,i=this;return o.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return Object(u["a"])(!0),t.prev=1,t.next=4,Object(f["j"])();case 4:return e=t.sent,200==e.data.code&&(n=e.data.data,this.form={idCardNo:n.idCardNo,realName:n.realName==n.phone?null:n.realName,gender:n.gender,birthdate:n.birthdate?p()(n.birthdate).format("YYYY-MM-DD"):null,nation:n.nation,certificatePhoto:n.certificatePhoto},n.certificatePhoto&&(this.certificatePhoto=[{url:n.certificatePhoto}])),t.next=8,Object(f["e"])({examinationBasicId:this.examId});case 8:r=t.sent,a=r.data,200==a.code&&a.data&&this.$dialog.confirm({title:"提示",message:"您当前有待支付订单",confirmButtonColor:"#269a93",cancelButtonText:"取消订单",confirmButtonText:"去支付"}).then((function(){i.$router.push({path:"/signUpPayment",query:{orderNo:a.data.orderNo,examRegistrationId:a.data.examRegistrationId}})})).catch((function(){var t=a.data.orderNo;i.$dialog.close(),t&&i.onCloseOrder(t)})),t.next=15;break;case 13:t.prev=13,t.t0=t["catch"](1);case 15:Object(u["a"])(!1);case 16:case"end":return t.stop()}}),t,this,[[1,13]])})));function e(){return t.apply(this,arguments)}return e}(),onCloseOrder:function(){var t=b(o.a.mark((function t(e){return o.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return Object(u["a"])(!0),t.next=3,Object(f["a"])({orderNo:e});case 3:Object(u["a"])(!1);case 4:case"end":return t.stop()}}),t)})));function e(e){return t.apply(this,arguments)}return e}(),onSubmit:function(){var t=b(o.a.mark((function t(){var e,n;return o.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(this.onCheckFields()){t.next=2;break}return t.abrupt("return");case 2:return Object(u["a"])(!0),t.prev=3,t.next=6,Object(f["q"])(this.form);case 6:e=t.sent,Object(u["a"])(!1),n=e.data,200==n.code?this.$router.push({path:"/signUpLevel"}):this.$toast(n.msg),t.next=14;break;case 12:t.prev=12,t.t0=t["catch"](3);case 14:case"end":return t.stop()}}),t,this,[[3,12]])})));function e(){return t.apply(this,arguments)}return e}(),onCheckFields:function(){var t=this.form;return t.idCardNo?t.idCardNo.length>=15&&!Object(h["b"])(t.idCardNo)?(this.$toast("输入身份证号有误"),!1):t.realName?t.birthdate?t.nation?!!t.certificatePhoto||(this.$toast("请上传证件照片"),!1):(this.$toast("请输入民族"),!1):(this.$toast("请选择生日"),!1):(this.$toast("请输入姓名"),!1):(this.$toast("请输入身份证号"),!1)},idCardParse:function(t){var e,n=t.words_result;switch(t.image_status){case"normal":this.form={idCardNo:n["公民身份号码"].words,realName:n["姓名"].words,gender:"男"==n["性别"].words?1:0,birthdate:p()(n["出生"].words).format("YYYY-MM-DD"),nation:n["民族"].words,certificatePhoto:this.form.certificatePhoto};break;case"reversed_side":e="身份证正反面颠倒";break;case"non_idcard":e="上传的图片中不包含身份证";break;case"blurred":e="身份证模糊";break;case"other_type_card":e="身份证关键字段反光或过曝";break;case"over_dark":e="身份证欠曝(亮度过低)";break;default:e="上传身份证有误";break}e&&this.$toast(e)}},destroyed:function(){this.$toast.clear(),this.$dialog.close()}},w=g,y=(n("f14f"),n("2877")),x=Object(y["a"])(w,r,a,!1,null,"426b44bd",null);e["default"]=x.exports},f14f:function(t,e,n){"use strict";var r=n("2326"),a=n.n(r);a.a}}]);