| 1 |
- (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/user/login/register"],{"18fb":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"])},"42dd":function(e,n,o){"use strict";(function(e,n){var t=o("4ea4");o("b159");t(o("66fd"));var u=t(o("ae56"));e.__webpack_require_UNI_MP_PLUGIN__=o,n(u.default)}).call(this,o("bc2e")["default"],o("543d")["createPage"])},"66d9":function(e,n,o){"use strict";o.r(n);var t=o("18fb"),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},"6f9d":function(e,n,o){},ae56:function(e,n,o){"use strict";o.r(n);var t=o("b5bf"),u=o("66d9");for(var r in u)["default"].indexOf(r)<0&&function(e){o.d(n,e,(function(){return u[e]}))}(r);o("f7ac");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},b5bf: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,"034e"))},uForm:function(){return o.e("uni_modules/vk-uview-ui/components/u-form/u-form").then(o.bind(null,"a0c0"))},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,"470d"))},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,"f017"))},uImage:function(){return o.e("uni_modules/vk-uview-ui/components/u-image/u-image").then(o.bind(null,"7487"))},uGap:function(){return o.e("uni_modules/vk-uview-ui/components/u-gap/u-gap").then(o.bind(null,"2bea"))},uButton:function(){return o.e("uni_modules/vk-uview-ui/components/u-button/u-button").then(o.bind(null,"479c"))}},u=function(){var e=this.$createElement;this._self._c},r=[]},f7ac:function(e,n,o){"use strict";var t=o("6f9d"),u=o.n(t);u.a}},[["42dd","common/runtime","common/vendor"]]]);
|