(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/user/login/register"],{"104b":function(e,n,o){"use strict";(function(e){o("3690");t(o("66fd"));var n=t(o("983e"));function t(e){return e&&e.__esModule?e:{default:e}}wx.__webpack_require_UNI_MP_PLUGIN__=o,e(n.default)}).call(this,o("543d")["createPage"])},"19d6":function(e,n,o){"use strict";o.r(n);var t=o("945b"),u=o.n(t);for(var r in t)"default"!==r&&function(e){o.d(n,e,(function(){return t[e]}))}(r);n["default"]=u.a},"4d2a":function(e,n,o){},"917a":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,"2143"))},uForm:function(){return o.e("uni_modules/vk-uview-ui/components/u-form/u-form").then(o.bind(null,"ce96"))},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,"23cb"))},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,"6943"))},uImage:function(){return o.e("uni_modules/vk-uview-ui/components/u-image/u-image").then(o.bind(null,"2afb"))},uGap:function(){return o.e("uni_modules/vk-uview-ui/components/u-gap/u-gap").then(o.bind(null,"dc7f"))},uButton:function(){return o.e("uni_modules/vk-uview-ui/components/u-button/u-button").then(o.bind(null,"ce9e"))}},u=function(){var e=this,n=e.$createElement;e._self._c},r=[]},"945b":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:{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"])},"983e":function(e,n,o){"use strict";o.r(n);var t=o("917a"),u=o("19d6");for(var r in u)"default"!==r&&function(e){o.d(n,e,(function(){return u[e]}))}(r);o("cbc2");var i,s=o("f0c5"),a=Object(s["a"])(u["default"],t["b"],t["c"],!1,null,"a44931fe",null,!1,t["a"],i);n["default"]=a.exports},cbc2:function(e,n,o){"use strict";var t=o("4d2a"),u=o.n(t);u.a}},[["104b","common/runtime","common/vendor"]]]);