SignUpAccount.58c3b622.js 6.5 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["SignUpAccount"],{"04cf":function(t,e,a){"use strict";var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"mbutton"},[a("van-button",{attrs:{type:"primary",round:"",block:""},on:{click:t.onClick}},[t._v(t._s(t.text))])],1)},i=[],o={name:"mbutton",props:{text:String},data:function(){return{}},methods:{onClick:function(){this.$emit("click")}}},s=o,c=(a("3040"),a("2877")),r=Object(c["a"])(s,n,i,!1,null,"a93b9764",null);e["a"]=r.exports},2558:function(t,e,a){"use strict";var n=a("f0da"),i=a.n(n);i.a},"2a52":function(t,e,a){},3040:function(t,e,a){"use strict";var n=a("5b7d"),i=a.n(n);i.a},"3e40":function(t,e,a){"use strict";var n=a("2a52"),i=a.n(n);i.a},"4d65":function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"signUpAccount"},[a("m-header"),a("m-step"),a("div",{staticClass:"title"},[t._v("基本信息")]),a("van-field",{attrs:{required:"",name:"phone",label:"手机号",placeholder:"请输入手机号"},model:{value:t.form.phone,callback:function(e){t.$set(t.form,"phone",e)},expression:"form.phone"}}),a("van-field",{attrs:{required:"",clearable:"",name:"code",label:"验证码",placeholder:"请输入验证码"},scopedSlots:t._u([{key:"button",fn:function(){return[a("span",{directives:[{name:"show",rawName:"v-show",value:t.countDownStatus,expression:"countDownStatus"}],staticClass:"codeText",on:{click:t.onGetCode}},[t._v("获取验证码")]),a("span",{directives:[{name:"show",rawName:"v-show",value:!t.countDownStatus,expression:"!countDownStatus"}],staticClass:"code-text"},[a("van-count-down",{ref:"countdown",attrs:{"auto-start":!1,time:t.countDownTime,format:"ss秒"},on:{finish:t.onCountDownFinished}})],1)]},proxy:!0}]),model:{value:t.form.code,callback:function(e){t.$set(t.form,"code",e)},expression:"form.code"}}),a("m-button",{staticClass:"stepBtn",attrs:{text:"下一步","native-type":"submit"},on:{click:t.onSubmit}})],1)},i=[],o=a("a34a"),s=a.n(o),c=a("6e6e"),r=a("ab6b"),u=a("04cf"),l=/^(?:(?:\+|00)86)?1[3-9]\d{9}$/,d=(a("433b"),a("d399"));function v(t){t?d["a"].loading({duration:0,forbidClick:!0,message:"加载中..."}):d["a"].clear()}var f=a("20bf");function h(t,e,a,n,i,o,s){try{var c=t[o](s),r=c.value}catch(u){return void a(u)}c.done?e(r):Promise.resolve(r).then(n,i)}function m(t){return function(){var e=this,a=arguments;return new Promise((function(n,i){var o=t.apply(e,a);function s(t){h(o,n,i,s,c,"next",t)}function c(t){h(o,n,i,s,c,"throw",t)}s(void 0)}))}}var p={name:"signUpAccount",components:{MHeader:c["a"],MStep:r["a"],MButton:u["a"]},data:function(){return{patternPhone:l,form:{phone:null,code:null},countDownStatus:!0,countDownTime:1e4}},mounted:function(){},methods:{onGetCode:function(){var t=m(s.a.mark((function t(){var e,a;return s.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(v(!0),this.checkPhone(this.form.phone)){t.next=3;break}return t.abrupt("return");case 3:return t.prev=3,t.next=6,Object(f["sendSms"])({mobile:this.phoneNumber});case 6:e=t.sent,a=e.data,200===a.code?(this.countDownStatus=!1,this.$refs.countdown.start()):this.$toast(a.msg),t.next=13;break;case 11:t.prev=11,t.t0=t["catch"](3);case 13:v(!1);case 14:case"end":return t.stop()}}),t,this,[[3,11]])})));function e(){return t.apply(this,arguments)}return e}(),onCountDownFinished:function(){this.countDownStatus=!0,this.$refs.countdown.reset()},onSubmit:function(){var t=this.form;this.checkPhone(t.phone)&&(t.code?this.$router.push({path:"/signUpBaseInfo"}):this.$toast("请输入验证码"))},checkPhone:function(t){var e=!0;return this.patternPhone.test(t)||(this.$toast("手机号输入有误"),e=!1),e}},destroyed:function(){this.$toast.clear()}},b=p,_=(a("564c"),a("2877")),w=Object(_["a"])(b,n,i,!1,null,"b97c5ea6",null);e["default"]=w.exports},"564c":function(t,e,a){"use strict";var n=a("9c6d"),i=a.n(n);i.a},"5b7d":function(t,e,a){},"6e6e":function(t,e,a){"use strict";var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"mheader"},[a("header",{staticClass:"m-nav-header",class:[{fixed:t.isFixed},{headerColor:t.isColor}]},[a("div",{directives:[{name:"show",rawName:"v-show",value:t.isBack,expression:"isBack"}],staticClass:"m-nav-bar__left",on:{click:t.goBack}},[a("van-icon",{staticClass:"arrow-left",attrs:{name:"arrow-left"}})],1),a("div",{staticClass:"m-nav-bar__title"},[t._t("default",[t._v(t._s(t.name?t.name:t.$route.meta.description))])],2),a("div",{staticClass:"m-nav-bar__right"},[t._t("right")],2)])])},i=[],o={name:"mheader",props:{name:String,isBack:{type:Boolean,default:!0},isFixed:{type:Boolean,default:!0},isColor:{type:Boolean,default:!1},backUrl:{type:Object,default:function(){return{callBack:null,status:!1,path:"",params:{}}}}},data:function(){return{title:this.name,backUrlParams:this.backUrl}},methods:{goBack:function(){var t=this.backUrlParams;"function"==typeof t.callBack?t.callBack():t.status?this.$router.push({path:t.path,query:t.params}):history.go(-1)}}},s=o,c=(a("2558"),a("2877")),r=Object(c["a"])(s,n,i,!1,null,"9865a7b0",null);e["a"]=r.exports},"9c6d":function(t,e,a){},a34a:function(t,e,a){t.exports=a("96cf")},ab6b:function(t,e,a){"use strict";var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"mStep"},[a("div",{staticClass:"step"},t._l(t.imgUrlList,(function(e,n){return a("div",{key:n,staticClass:"step-item"},[t.number>=e.index?a("svg-icon",{key:"oneImg",attrs:{iconClass:e.active}}):a("svg-icon",{key:"oneImg",attrs:{iconClass:e.default}}),a("p",{class:[t.number>=e.index?e.activeClass:""]},[t._v(t._s(e.text))])],1)})),0)])},i=[],o=a("0032"),s={name:"mStep",components:{SvgIcon:o["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:{}},c=s,r=(a("3e40"),a("2877")),u=Object(r["a"])(c,n,i,!1,null,"406ae98f",null);e["a"]=u.exports},f0da:function(t,e,a){}}]);