SignUpAccount.4e05396d.js 10 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["SignUpAccount"],{2558:function(t,e,n){"use strict";var a=n("f0da"),r=n.n(a);r.a},"2bff":function(t,e,n){},3908:function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));n("433b");var a=n("d399");function r(t){t?a["a"].loading({duration:0,forbidClick:!0,message:"加载中..."}):a["a"].clear()}},"4d65":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:"signUpAccount"},[n("m-header"),n("m-step"),n("div",{staticClass:"title"},[t._v("基本信息")]),n("van-field",{attrs:{type:"tel",required:"",name:"phone",label:"手机号",placeholder:"请输入手机号"},model:{value:t.form.phone,callback:function(e){t.$set(t.form,"phone",e)},expression:"form.phone"}}),n("van-field",{attrs:{type:"number",required:"",clearable:"",name:"code",label:"验证码",placeholder:"请输入验证码"},scopedSlots:t._u([{key:"button",fn:function(){return[n("span",{directives:[{name:"show",rawName:"v-show",value:t.countDownStatus,expression:"countDownStatus"}],staticClass:"codeText",on:{click:t.onGetCode}},[t._v("获取验证码")]),n("span",{directives:[{name:"show",rawName:"v-show",value:!t.countDownStatus,expression:"!countDownStatus"}],staticClass:"code-text"},[n("van-count-down",{ref:"countdown",staticStyle:{color:"#c4c4c4"},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"}}),n("div",{staticClass:"agreeProtocol"},[n("van-checkbox",{model:{value:t.agreeStatus,callback:function(e){t.agreeStatus=e},expression:"agreeStatus"}}),n("i",{staticStyle:{"font-style":"normal"},on:{click:function(e){t.agreeStatus=!t.agreeStatus}}},[t._v("已阅读并同意")]),n("span",{on:{click:t.onToProtocol}},[t._v("《酷乐秀用户注册服务协议》")])],1),n("van-button",{attrs:{type:"primary",disabled:!t.agreeStatus,round:"",block:""},on:{click:t.onSubmit}},[t._v("下一步")])],1)},r=[],o=n("a34a"),i=n.n(o),s=n("6e6e"),c=n("ab6b"),u=n("b48b"),d=n("3908"),l=n("8900");function f(t,e,n,a,r,o,i){try{var s=t[o](i),c=s.value}catch(u){return void n(u)}s.done?e(c):Promise.resolve(c).then(a,r)}function h(t){return function(){var e=this,n=arguments;return new Promise((function(a,r){var o=t.apply(e,n);function i(t){f(o,a,r,i,s,"next",t)}function s(t){f(o,a,r,i,s,"throw",t)}i(void 0)}))}}var m={name:"signUpAccount",components:{MHeader:s["a"],MStep:c["a"]},data:function(){localStorage.removeItem("Authorization");var t=this.$route.query;return{examId:t.examId,organId:t.organId,patternPhone:u["a"],agreeStatus:!1,form:{phone:null,code:null},countDownStatus:!0,countDownTime:12e4}},mounted:function(){},methods:{onGetCode:function(){var t=h(i.a.mark((function t(){var e,n;return i.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(Object(d["a"])(!0),this.checkPhone(this.form.phone)){t.next=3;break}return t.abrupt("return");case 3:return t.prev=3,t.next=6,Object(l["o"])({mobile:this.form.phone});case 6:e=t.sent,n=e.data,200===n.code?(this.countDownStatus=!1,this.$refs.countdown.start(),Object(d["a"])(!1)):this.$toast(n.msg),t.next=14;break;case 11:t.prev=11,t.t0=t["catch"](3),Object(d["a"])(!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()},onCheckPhone:function(){var t=h(i.a.mark((function t(){var e,n,a,r;return i.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return Object(d["a"])(!0),t.prev=1,e=this.form,n={mobile:e.phone,clientId:"student"},t.next=6,Object(l["m"])(n);case 6:a=t.sent,r=a.data,200===r.code?this.onLogin(r.data):this.$toast(r.msg),t.next=14;break;case 11:t.prev=11,t.t0=t["catch"](1),Object(d["a"])(!1);case 14:case"end":return t.stop()}}),t,this,[[1,11]])})));function e(){return t.apply(this,arguments)}return e}(),onLogin:function(){var t=h(i.a.mark((function t(e){var n,a,r,o,s;return i.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return n=this.form,a={clientId:"student",clientSecret:"student",phone:n.phone,smsCode:n.code,organId:this.organId},0===e&&(a.registerFlag="true"),t.next=5,Object(l["p"])(a);case 5:r=t.sent,o=r.data,200===o.code?(s=o.data.authentication,localStorage.setItem("Authorization",s.token_type+" "+s.access_token),this.$router.push({path:"/signUpBaseInfo",query:{organId:this.organId}})):this.$toast(o.msg);case 8:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}(),onSubmit:function(){var t=this.form;this.checkPhone(t.phone)&&(t.code?this.agreeStatus?this.onCheckPhone():this.$toast("请先阅读并同意酷乐秀用户注册服务协议"):this.$toast("请输入验证码"))},onToProtocol:function(){this.$router.push({path:"/smallProtocol"})},checkPhone:function(t){var e=!0;return this.patternPhone.test(t)||(this.$toast("手机号输入有误"),e=!1),e}},destroyed:function(){this.$toast.clear()}},p=m,v=(n("d5c0"),n("2877")),g=Object(v["a"])(p,a,r,!1,null,"04aba392",null);e["default"]=g.exports},6746:function(t,e,n){},"6e6e":function(t,e,n){"use strict";var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"mheader"},[n("header",{staticClass:"m-nav-header",class:[{fixed:t.isFixed},{headerColor:t.isColor}]},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.isBack,expression:"isBack"}],staticClass:"m-nav-bar__left",on:{click:t.goBack}},[n("van-icon",{staticClass:"arrow-left",attrs:{name:"arrow-left"}})],1),n("div",{staticClass:"m-nav-bar__title"},[t._t("default",[t._v(t._s(t.name?t.name:t.$route.meta.description))])],2),n("div",{staticClass:"m-nav-bar__right"},[t._t("right")],2)])])},r=[],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)}}},i=o,s=(n("2558"),n("2877")),c=Object(s["a"])(i,a,r,!1,null,"9865a7b0",null);e["a"]=c.exports},8900:function(t,e,n){"use strict";n.d(e,"o",(function(){return i})),n.d(e,"p",(function(){return s})),n.d(e,"m",(function(){return c})),n.d(e,"d",(function(){return u})),n.d(e,"j",(function(){return d})),n.d(e,"q",(function(){return l})),n.d(e,"l",(function(){return f})),n.d(e,"r",(function(){return h})),n.d(e,"i",(function(){return m})),n.d(e,"g",(function(){return p})),n.d(e,"h",(function(){return v})),n.d(e,"b",(function(){return g})),n.d(e,"c",(function(){return b})),n.d(e,"k",(function(){return x})),n.d(e,"e",(function(){return _})),n.d(e,"f",(function(){return w})),n.d(e,"n",(function(){return k})),n.d(e,"a",(function(){return y}));var a=n("4328"),r=n.n(a),o=n("981f").default;function i(t){return o({url:"/api-auth/code/sendSms",method:"post",data:r.a.stringify(t)})}function s(t){return o({url:"/api-auth/smsLogin",method:"post",data:r.a.stringify(t)})}function c(t){return o({url:"/api-auth/user/noAuth/queryUserByPhone",method:"get",params:t})}function u(t){return o({url:"/api-user/examinationBasic/getInfo",method:"post",data:r.a.stringify(t)})}function d(t){return o({url:"/api-user/student/getStudent",method:"get",params:t})}function l(t){return o({url:"/api-user/student/updateInfo",method:"post",data:r.a.stringify(t)})}function f(t){return o({url:"/api-user/examRegistration/ocr",method:"post",data:t})}function h(t){return o({url:"/api-user/uploadFile",method:"post",data:t})}function m(t){return o({url:"/api-user/examSubject/getExamSubjects",method:"get",params:t})}function p(t){return o({url:"/api-user/examSubjectSong/getExamSubjectLevel",method:"get",params:t})}function v(t){return o({url:"/api-user/examSubjectSong/getExamSubjectSong",method:"get",params:t})}function g(t){return o({url:"/api-user/examRegistration/add",method:"post",data:t})}function b(t){return o({url:"/api-user/examRegistration/update",method:"post",data:t})}function x(t){return o({url:"/api-user/examMusicTheory/getTheoryLevelList",method:"get",params:t})}function _(t){return o({url:"/api-user/examOrder/getExamIngOrder",method:"get",params:t})}function w(t){return o({url:"/api-user/examRegistration/getExamRegistration",method:"get",params:t})}function k(t){return o({url:"/api-user/examRegistration/repay",method:"post",data:r.a.stringify(t)})}function y(t){return o({url:"/api-user/examOrder/closeOrder",method:"post",data:r.a.stringify(t)})}},a298:function(t,e,n){"use strict";var a=n("6746"),r=n.n(a);r.a},a34a:function(t,e,n){t.exports=n("96cf")},ab6b:function(t,e,n){"use strict";var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"mStep"},[n("div",{staticClass:"step"},t._l(t.imgUrlList,(function(e,a){return n("div",{key:a,staticClass:"step-item"},[t.number>=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)])},r=[],o=n("0032"),i={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:{}},s=i,c=(n("a298"),n("2877")),u=Object(c["a"])(s,a,r,!1,null,"7eaaf7a9",null);e["a"]=u.exports},b48b:function(t,e,n){"use strict";n.d(e,"a",(function(){return a})),n.d(e,"b",(function(){return o}));var a=/^(?:(?:\+|00)86)?1[3-9]\d{9}$/,r=/(^\d{8}(0\d|10|11|12)([0-2]\d|30|31)\d{3}$)|(^\d{6}(18|19|20)\d{2}(0[1-9]|10|11|12)([0-2]\d|30|31)\d{3}(\d|X|x)$)/;function o(t){var e=!0;return r.test(t)||(e=!1),e}},d5c0:function(t,e,n){"use strict";var a=n("2bff"),r=n.n(a);r.a},f0da:function(t,e,n){}}]);