You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
high-mini/unpackage/dist/build/mp-weixin/pages/login/register.js

1 line
3.1 KiB

(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/login/register"],{"0c79":function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n("8f7e"));function i(e){return e&&e.__esModule?e:{default:e}}var a={data:function(){return{phoneNumber:"",code:"",passwd:"",getCodeText:"获取验证码",getCodeBtnColor:"#ffffff",getCodeisWaiting:!1}},onLoad:function(){},methods:{Timer:function(){},getCode:function(){var t=this;if(e.hideKeyboard(),!this.getCodeisWaiting){if(!/^1(3|4|5|6|7|8|9)\d{9}$/.test(this.phoneNumber))return e.showToast({title:"请填写正确手机号码",icon:"none"}),!1;this.getCodeText="发送中...",this.getCodeisWaiting=!0,this.getCodeBtnColor="rgba(255,255,255,0.5)",setTimeout((function(){e.showToast({title:"验证码已发送",icon:"none"}),t.code=1234,t.setTimer()}),1e3)}},setTimer:function(){var e=this,t=60;this.getCodeText="重新获取(60)",this.Timer=setInterval((function(){if(t<=0)return e.getCodeisWaiting=!1,e.getCodeBtnColor="#ffffff",e.getCodeText="获取验证码",void clearInterval(e.Timer);e.getCodeText="重新获取("+t+")",t--}),1e3)},doReg:function(){var t=this;return e.hideKeyboard(),/^1(3|4|5|6|7|8|9)\d{9}$/.test(this.phoneNumber)?1234!=this.code?(e.showToast({title:"验证码不正确",icon:"none"}),!1):(e.showLoading({title:"提交中..."}),void setTimeout((function(){e.getStorage({key:"UserList",success:function(n){n.data.push({username:t.phoneNumber,passwd:(0,o.default)(t.passwd)}),e.setStorage({key:"UserList",data:n.data,success:function(){e.hideLoading(),e.showToast({title:"注册成功",icon:"success"}),setTimeout((function(){e.navigateBack()}),1e3)}})},fail:function(n){e.hideLoading(),console.log("error"),e.setStorage({key:"UserList",data:[{username:t.phoneNumber,passwd:(0,o.default)(t.passwd)}],success:function(){e.hideLoading(),e.showToast({title:"注册成功",icon:"success"}),setTimeout((function(){e.navigateBack()}),1e3)},fail:function(e){console.log("set error:"+JSON.stringify(e))}})}})}),1e3)):(e.showToast({title:"请填写正确手机号码",icon:"none"}),!1)},toLogin:function(){e.hideKeyboard(),e.redirectTo({url:"login"}),e.navigateBack()}}};t.default=a}).call(this,n("543d")["default"])},"2daa":function(e,t,n){"use strict";var o;n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return a})),n.d(t,"a",(function(){return o}));var i=function(){var e=this,t=e.$createElement;e._self._c},a=[]},4665:function(e,t,n){"use strict";var o=n("a837"),i=n.n(o);i.a},"544a":function(e,t,n){"use strict";n.r(t);var o=n("0c79"),i=n.n(o);for(var a in o)"default"!==a&&function(e){n.d(t,e,(function(){return o[e]}))}(a);t["default"]=i.a},"93ae":function(e,t,n){"use strict";n.r(t);var o=n("2daa"),i=n("544a");for(var a in i)"default"!==a&&function(e){n.d(t,e,(function(){return i[e]}))}(a);n("4665");var s,r=n("f0c5"),u=Object(r["a"])(i["default"],o["b"],o["c"],!1,null,null,null,!1,o["a"],s);t["default"]=u.exports},a837:function(e,t,n){},daab:function(e,t,n){"use strict";(function(e){n("eba6");o(n("66fd"));var t=o(n("93ae"));function o(e){return e&&e.__esModule?e:{default:e}}e(t.default)}).call(this,n("543d")["createPage"])}},[["daab","common/runtime","common/vendor"]]]);