(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/mine/changePhone"],{"3be9":function(e,t,n){"use strict";n.r(t);var i=n("8f27"),s=n.n(i);for(var a in i)"default"!==a&&function(e){n.d(t,e,(function(){return i[e]}))}(a);t["default"]=s.a},"8f27":function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n("3786"),s=a(n("df35"));function a(e){return e&&e.__esModule?e:{default:e}}var r={data:function(){return{sendTime:60,disableSendMsgBtn:!0,sendMsg:"获取验证码",leftTime:0,form:{user_phone:"",captcha:""},rules:[{name:"user_phone",required:!0,type:"phone",errmsg:"请输入正确手机号"},{name:"captcha",required:!0,type:"number",errmsg:"请输入正确的验证码"}]}},methods:{save:function(){var t=this,n=s.default.validate(this.form,this.rules);if(!n.isOk)return e.showToast({icon:"none",title:n.errmsg}),!1;(0,i._changePhone)(this.form).then((function(n){t.$store.dispatch("setToken",n.data.token),e.showToast({title:"保存成功",icon:"success"}),setTimeout((function(){e.navigateBack()}),800)}))},changePhone:function(e){/^[1]([3-9])[0-9]{9}$/.test(e.detail.value)?this.disableSendMsgBtn=!1:this.disableSendMsgBtn=!0},getCode:function(){this.disableSendMsgBtn||(this.leftTime=this.sendTime,this.timing(this.leftTime),(0,i._getCode)({phone:this.form.user_phone}).then((function(t){e.showToast({title:"验证码发送成功! 请注意查收！",duration:3e3})})))},timing:function(){var e=this;this.disableSendMsgBtn=!0;var t=this.sendMsg;this.sendMsg=this.leftTime+"秒后重试",this.timeInterval=setInterval((function(){e.leftTime--,e.sendMsg=e.leftTime+"秒后重试",e.leftTime<=0&&(e.sendMsg=t,clearInterval(e.timeInterval),/^[1]([3-9])[0-9]{9}$/.test(e.form.phone)&&(e.disableSendMsgBtn=!1))}),1e3)}}};t.default=r}).call(this,n("543d")["default"])},ac06:function(e,t,n){"use strict";var i=n("f92d"),s=n.n(i);s.a},b49c:function(e,t,n){"use strict";var i,s=function(){var e=this,t=e.$createElement;e._self._c},a=[];n.d(t,"b",(function(){return s})),n.d(t,"c",(function(){return a})),n.d(t,"a",(function(){return i}))},c4c7:function(e,t,n){"use strict";(function(e){n("6cdc");i(n("66fd"));var t=i(n("fd65"));function i(e){return e&&e.__esModule?e:{default:e}}e(t.default)}).call(this,n("543d")["createPage"])},f92d:function(e,t,n){},fd65:function(e,t,n){"use strict";n.r(t);var i=n("b49c"),s=n("3be9");for(var a in s)"default"!==a&&function(e){n.d(t,e,(function(){return s[e]}))}(a);n("ac06");var r,o=n("f0c5"),u=Object(o["a"])(s["default"],i["b"],i["c"],!1,null,"3f3286f7",null,!1,i["a"],r);t["default"]=u.exports}},[["c4c7","common/runtime","common/vendor"]]]);