(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/user/login/register"],{"0692":function(e,n,o){"use strict";o.r(n);var t=o("6618"),u=o.n(t);for(var r in t)["default"].indexOf(r)<0&&function(e){o.d(n,e,(function(){return t[e]}))}(r);n["default"]=u.a},"5c74":function(e,n,o){},6618:function(e,n,o){"use strict";(function(e){var o;Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var t={data:function(){return{isImgCoedShow:!1,imgCodeUrl:"",smsTimer:null,smsTimeNum:60,data:{},form1:{username:null,password:"",re_password:"",image_code:"",sms_code:""},rules:{username:[{required:!0,message:"请输入账号",trigger:"blur,change"}],password:[{min:6,message:"密码不能少于6个字符",trigger:"change"}],re_password:[{min:6,message:"密码不能少于6个字符",trigger:"change"},{validator:function(e,n,t){return o.form1.password==n},message:"与上次输入的不一致",trigger:["change","blur"]}],image_code:[{required:!0,message:"请输入图形验证码",trigger:"blur,change"}],sms_code:[{required:!0,message:"请输入短信验证码",trigger:"blur,change"}]},scrollTop:0}},onPageScroll:function(e){this.scrollTop=e.scrollTop},onLoad:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o=this,o.options=e,this.form1.username&&this.getImgCode()},onReady:function(){this.$refs.uForm.setRules(this.rules)},onShareAppMessage:function(e){},methods:{pageTo:function(n){"dev"!==n?e.navigateTo({url:n}):e.$msg("开发中~")},getImgCode:function(){this.imgCodeUrl="".concat(e.baseUrl,"api/captcha?phone=").concat(this.form1.username,"&r=").concat(Math.random())},phoneBlurHandle:function(){var n=this;this.form1.username&&11===this.form1.username.length?e.api.base.apicheckcaptcha({phone:this.form1.username}).then((function(e){n.isImgCoedShow=e,n.getImgCode()})):this.isImgCoedShow=!1},smsHandle:function(){var n=this;if(this.form1.username&&11===this.form1.username.length){var o={phone:this.form1.username,user_type:"wx"};if(this.isImgCoedShow){if(!this.form1.image_code)return void e.$msg("请输入图形验证码");o.img_code=this.form1.image_code}e.api.base.apisendsms(o).then((function(e){n.smsTimer=setInterval((function(){n.smsTimeNum--,0===n.smsTimeNum&&(n.smsTimeNum=60,clearInterval(n.smsTimer),n.smsTimer=null)}),1e3)}))}else e.$msg("请输入正确的手机号")},register:function(){var n=this;this.$refs.uForm.validate((function(o){o?e.api.base.apiregister({phone:n.form1.username,password:n.form1.password,sms_code:n.form1.sms_code}).then((function(o){e.setStorageSync("MD_phone",n.form1.username),e.$msgConfirm("注册成功~",(function(){e.navigateTo({url:"/pages/user/login/login"})}),(function(){e.navigateTo({url:"/pages/user/login/login"})}))})):console.log("验证失败")}))}},watch:{},computed:{}};n.default=t}).call(this,o("543d")["default"])},a7e1:function(e,n,o){"use strict";(function(e,n){var t=o("4ea4");o("2ab2");t(o("66fd"));var u=t(o("fd38"));e.__webpack_require_UNI_MP_PLUGIN__=o,n(u.default)}).call(this,o("bc2e")["default"],o("543d")["createPage"])},ccc6:function(e,n,o){"use strict";o.d(n,"b",(function(){return u})),o.d(n,"c",(function(){return r})),o.d(n,"a",(function(){return t}));var t={uAvatar:function(){return o.e("uni_modules/vk-uview-ui/components/u-avatar/u-avatar").then(o.bind(null,"c634"))},uForm:function(){return o.e("uni_modules/vk-uview-ui/components/u-form/u-form").then(o.bind(null,"e893"))},uFormItem:function(){return Promise.all([o.e("common/vendor"),o.e("uni_modules/vk-uview-ui/components/u-form-item/u-form-item")]).then(o.bind(null,"a81d"))},uInput:function(){return Promise.all([o.e("common/vendor"),o.e("uni_modules/vk-uview-ui/components/u-input/u-input")]).then(o.bind(null,"830c"))},uImage:function(){return o.e("uni_modules/vk-uview-ui/components/u-image/u-image").then(o.bind(null,"9340"))},uGap:function(){return o.e("uni_modules/vk-uview-ui/components/u-gap/u-gap").then(o.bind(null,"9db7"))},uButton:function(){return o.e("uni_modules/vk-uview-ui/components/u-button/u-button").then(o.bind(null,"51b1b"))}},u=function(){var e=this.$createElement;this._self._c},r=[]},d47a:function(e,n,o){"use strict";var t=o("5c74"),u=o.n(t);u.a},fd38:function(e,n,o){"use strict";o.r(n);var t=o("ccc6"),u=o("0692");for(var r in u)["default"].indexOf(r)<0&&function(e){o.d(n,e,(function(){return u[e]}))}(r);o("d47a");var i=o("f0c5"),s=Object(i["a"])(u["default"],t["b"],t["c"],!1,null,"1a05e8f0",null,!1,t["a"],void 0);n["default"]=s.exports}},[["a7e1","common/runtime","common/vendor"]]]);