| 1 |
- (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 i in t)["default"].indexOf(i)<0&&function(e){o.d(n,e,(function(){return t[e]}))}(i);n["default"]=u.a},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{isSelect:!1,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"])},"80be":function(e,n,o){"use strict";var t=o("c7b9"),u=o.n(t);u.a},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"])},bfbf:function(e,n,o){"use strict";o.d(n,"b",(function(){return u})),o.d(n,"c",(function(){return i})),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,n=e.$createElement;e._self._c;e._isMounted||(e.e0=function(n){e.isSelect=!1},e.e1=function(n){e.isSelect=!0})},i=[]},c7b9:function(e,n,o){},fd38:function(e,n,o){"use strict";o.r(n);var t=o("bfbf"),u=o("0692");for(var i in u)["default"].indexOf(i)<0&&function(e){o.d(n,e,(function(){return u[e]}))}(i);o("80be");var r=o("f0c5"),s=Object(r["a"])(u["default"],t["b"],t["c"],!1,null,"317244a7",null,!1,t["a"],void 0);n["default"]=s.exports}},[["a7e1","common/runtime","common/vendor"]]]);
|