(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1fb5313b"],{"2ca6":function(t,e,o){"use strict";var s=o("3e14"),n=o.n(s);n.a},"3e14":function(t,e,o){},fe86:function(t,e,o){"use strict";o.r(e);var s=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"login",style:{height:t.bodyHeight+"px"}},[o("div",{staticClass:"section"},[o("h2",[t._v("手机号")]),o("van-cell-group",{staticClass:"form-container top"},[o("van-field",{attrs:{center:"",clearable:"",placeholder:"请输入手机号"},model:{value:t.form.phone,callback:function(e){t.$set(t.form,"phone",e)},expression:"form.phone"}})],1),o("h2",[t._v("验证码")]),o("van-cell-group",{staticClass:"form-container"},[o("van-field",{attrs:{center:"",clearable:"",placeholder:"请输入短信验证码"},model:{value:t.form.code,callback:function(e){t.$set(t.form,"code",e)},expression:"form.code"}},[o("van-button",{attrs:{slot:"button",size:"small",type:"primary"},on:{click:t.sendCode},slot:"button"},[t._v(t._s(t.smsText))])],1)],1),o("div",{staticClass:"btn-group"},[o("van-button",{staticClass:"btn",attrs:{size:"large"},on:{click:t.onSubmit}},[t._v("登录")])],1)],1)])},n=[],a=o("4328"),c=o.n(a),i={name:"login",data:function(){return{bodyHeight:0,popupStatus:!1,popupCodeStatus:!1,smsText:"发送验证码",popupText:"",codeStatus:!0,btnStatus:!0,form:{phone:null,code:null}}},created:function(){this.bodyHeight=document.documentElement.clientHeight},mounted:function(){},methods:{codeBlur:function(){setTimeout(function(){var t=document.documentElement.scrollTop||document.body.scrollTop||0;window.scrollTo(0,Math.max(t-1,0))},100)},onSubmit:function(){var t=this,e=this.form;if(!/^1(3|4|5|6|7|8|9)\d{9}$/.test(e.phone))return this.$toast("手机号输入有误"),!1;this.$axios.get("/user/getMecUser?phone=".concat(e.phone,"&smsCode=").concat(e.code)).then(function(e){var o=e.data;console.log(o),200==o.code?t.$router.push({path:"activePay",query:{userId:o.data.userId,branchId:o.data.branchId}}):t.$toast(o.msg)})},checkCode:function(){var t=this,e=this.$route.query,o=this.form.code;o.length>=6&&this.$axios.post("/user/verifySmsCode",c.a.stringify({smsCode:o,mobile:this.form.phone})).then(function(o){var s=o.data;s.status?t.$router.push({path:"register",query:{phone:t.form.phone,cityId:e.cityId,classId:t.dataList.classId,schoolId:e.schoolId,status:t.dataList.status,schoolName:t.dataList.schoolName,branchId:t.dataList.branchId}}):(t.$toast("验证码输入有误"),t.form.code="")})},sendCode:function(){var t=this;return/^1(3|4|5|6|7|8|9)\d{9}$/.test(this.form.phone)?!!this.codeStatus&&void this.$axios.get("/user/sendSmsCode?mobile="+this.form.phone).then(function(e){e.data;t.codeStatus=!1,t.CountDown()}):(this.$toast("手机号输入有误"),!1)},CountDown:function(){var t=this,e=120;this.smsText=e+"秒";var o=setInterval(function(){e<=0?(t.codeStatus=!0,t.smsText="发送验证码",clearInterval(o)):(e--,t.smsText=e+"秒")},1e3)}}},r=i,u=(o("2ca6"),o("2877")),d=Object(u["a"])(r,s,n,!1,null,"641c85b3",null);e["default"]=d.exports}}]);
//# sourceMappingURL=chunk-1fb5313b.f79df9b7.js.map