chunk-8e628654.1e2b0772.js 3.9 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-8e628654"],{"35bd":function(t,e,a){},ba6d:function(t,e,a){"use strict";a.r(e);var s=function(){var t=this,e=t._self._c;return e("div",[e("a-form",{staticStyle:{"max-width":"500px",margin:"40px auto 0"},attrs:{form:t.form},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.nextStep.apply(null,arguments)}}},[e("a-form-item",{attrs:{label:"账号名",labelCol:{span:5},wrapperCol:{span:19}}},[e("a-input",{style:{width:"310px"},attrs:{type:"text",autocomplete:"false",value:t.accountName,disabled:""}})],1),e("a-form-item",{attrs:{label:"手机",labelCol:{span:5},wrapperCol:{span:19}}},[e("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["phone",{initialValue:t.defaultPhone,rules:t.validatorRules.phone.rule}],expression:"['phone',{initialValue: defaultPhone, rules: validatorRules.phone.rule}]"}],style:{width:"310px"},attrs:{type:"text",autocomplete:"false",placeholder:"请输入手机号"}},[e("a-icon",{style:{color:"rgba(0,0,0,.25)"},attrs:{slot:"prefix",type:"phone"},slot:"prefix"})],1)],1),t.show?e("a-form-item",{attrs:{label:"验证码",labelCol:{span:5},wrapperCol:{span:19}}},[e("a-row",{staticStyle:{"margin-left":"2px"},attrs:{gutter:16}},[e("a-col",{staticClass:"gutter-row",attrs:{span:12}},[e("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["captcha",t.validatorRules.captcha],expression:"['captcha',validatorRules.captcha]"}],attrs:{type:"text",placeholder:"手机短信验证码"}})],1),e("a-col",{staticClass:"gutter-row",attrs:{span:8}},[e("a-button",{attrs:{tabindex:"-1",size:"default",disabled:t.state.smsSendBtn},domProps:{textContent:t._s(t.state.smsSendBtn?t.state.time+" s":"获取验证码")},on:{click:function(e){return e.stopPropagation(),e.preventDefault(),t.getCaptcha.apply(null,arguments)}}})],1)],1)],1):t._e(),e("a-form-item",{attrs:{wrapperCol:{span:19,offset:5}}},[e("a-button",{staticStyle:{"margin-left":"8px"},on:{click:t.prevStep}},[t._v("上一步")]),e("a-button",{staticStyle:{"margin-left":"20px"},attrs:{type:"primary"},on:{click:t.nextStep}},[t._v("下一步")])],1)],1)],1)},i=[],n=a("0fea"),r={name:"Step2",props:["userList"],data:function(){return{form:this.$form.createForm(this),loading:!1,accountName:this.userList.username,dropList:"0",captcha:"",show:!0,state:{time:60,smsSendBtn:!1},formLogin:{captcha:"",mobile:""},validatorRules:{captcha:{rule:[{required:!0,message:"请输入短信验证码!"},{validator:this.validateCaptcha}]},phone:{rule:[{required:!0,message:"请输入手机号码!"}]}}}},computed:{defaultPhone:function(){return this.userList.isPhone?this.userList.phone:null}},methods:{nextStep:function(){var t=this,e=this;e.loading=!0,this.form.validateFields((function(a,s){if(!a&&"0"==e.dropList)if(void 0==s.captcha)t.cmsFailed("请输入短信验证码!");else{var i={};i.phone=t.userList.phone,i.smscode=s.captcha,Object(n["j"])("/sys/user/phoneVerification",i).then((function(a){if(a.success){var s={username:t.userList.username,phone:t.userList.phone,smscode:a.result};setTimeout((function(){e.$emit("nextStep",s)}),0)}else t.cmsFailed(a.message)}))}}))},prevStep:function(){this.$emit("prevStep",this.userList)},getCaptcha:function(t){var e=this;t.preventDefault();var a=this;this.state.smsSendBtn=!0;var s=window.setInterval((function(){a.state.time--<=0&&(a.state.time=60,a.state.smsSendBtn=!1,window.clearInterval(s))}),1e3),i=this.$message.loading("验证码发送中..",0),r={mobile:this.userList.phone,smsmode:"2"};Object(n["j"])("/sys/sms",r).then((function(t){t.success||(setTimeout(i,1),e.cmsFailed(t.message)),setTimeout(i,500)}))},cmsFailed:function(t){this.$notification["error"]({message:"验证错误",description:t,duration:4})},handleChangeSelect:function(t){var e=this;0==t?(e.dropList="0",e.show=!0):(e.dropList="1",e.show=!1)}}},o=r,l=(a("d086"),a("2877")),p=Object(l["a"])(o,s,i,!1,null,"0d38e0f0",null);e["default"]=p.exports},d086:function(t,e,a){"use strict";a("35bd")}}]);