(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-eb6f7ab2"],{1701:function(e,n,o){"use strict";o("b72f")},"26c0":function(e,n,o){e.exports=o.p+"img/password.561d990b.png"},b72f:function(e,n,o){},c1bd:function(e,n,o){"use strict";o.r(n);var t=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("div",{staticClass:"reset"},[t("el-row",{staticClass:"reset-wraps",attrs:{gutter:20}},[t("el-col",{staticClass:"reset-lefts",attrs:{span:8}},[t("img",{attrs:{src:o("26c0"),alt:""}})]),t("el-col",{staticClass:"reset-rights",attrs:{span:16}},[t("h3",[e._v("修改密码")]),t("p",[e._v(" 请在下面的输入框中输入对应密码，然后点击“保存”修改您的登陆密码为最新的密码。为了保证您的账号安全，请不要将您的密码告诉给第三方，并建议您不定期修改您的登录密码 ")]),t("el-form",{ref:"formPhone",staticClass:"form-content",attrs:{model:e.loginPhone}},[t("el-form-item",{attrs:{error:e.errors.phone}},[t("el-input",{attrs:{disabled:""!=e.loginPhone.phone,"prefix-icon":"el-icon-user-solid"},model:{value:e.loginPhone.phone,callback:function(n){e.$set(e.loginPhone,"phone",n)},expression:"loginPhone.phone"}})],1),t("el-form-item",{attrs:{error:e.errors.newPassword}},[t("el-input",{attrs:{"show-password":"",placeholder:"请输入密码","prefix-icon":"el-icon-unlock"},model:{value:e.loginPhone.newPassword,callback:function(n){e.$set(e.loginPhone,"newPassword",n)},expression:"loginPhone.newPassword"}})],1),t("el-form-item",{attrs:{error:e.errors.code}},[t("el-input",{attrs:{"prefix-icon":"el-icon-unlock",placeholder:"请输入验证码"},nativeOn:{keyup:function(n){return!n.type.indexOf("key")&&e._k(n.keyCode,"enter",13,n.key,"Enter")?null:e.resetPwd(n)}},model:{value:e.loginPhone.code,callback:function(n){e.$set(e.loginPhone,"code",n)},expression:"loginPhone.code"}},[t("el-button",{attrs:{slot:"append",loading:e.loading.send},on:{click:e.sendSMSCode},slot:"append"},[e._v(e._s(e.codeContent))])],1)],1),t("el-form-item",{staticClass:"submit"},[t("el-button",{staticClass:"btn-login",attrs:{type:"primary"},on:{click:e.resetPwd}},[e._v("保存")])],1)],1)],1)],1)],1)},s=[],r=(o("ac1f"),o("5319"),o("4795"),{components:{},data:function(){return{loginPhone:{phone:"",newPassword:""},loading:{send:!1},codeContent:"获取验证码",timerRunning:!1,errors:{code:null}}},computed:{},methods:{sendSMSCode:function(){var e=this;this.loading.send||this.timerRunning||this.checkLoginPhone()&&(this.loading.send=!0,this.$store.dispatch("login/sendLoginCode",{phoneNumber:this.loginPhone.phone}).then((function(n){e.loading.send=!1,e.countDownChange()}))["catch"]((function(n){e.loading.send=!1})))},countDownChange:function(){var e=this,n=60;this.timerRunning=!0,this.loading.send=!1,this.codeContent="60S后重新获取";var o=setInterval((function(){return n>1?(n--,e.codeContent=n+"S后重新获取",!0):(n=60,clearInterval(o),e.codeContent="获取验证码",e.timerRunning=!1,!1)}),1e3)},resetPwd:function(){var e=this;if(this.checkLoginPhone()){if(this.errors.code="",this.errors.newPassword="",!this.loginPhone.newPassword)return void(this.errors.newPassword="请输入密码");if(!this.loginPhone.code)return void(this.errors.code="请输入验证码");this.loginState=!0,this.$store.dispatch("login/resetPassword",{phone:this.loginPhone.phone,newPassword:this.loginPhone.newPassword,vcode:this.loginPhone.code}).then((function(n){0==n&&(e.$message.success("密码修改成功"),e.$store.state.login.token=null,e.$router.replace({path:"/login"}))}))["catch"]((function(n){console.log(n),e.errors.code="",e.errors.newPassword="",e.$message.error(n.message),e.loginState=!1}))}},checkLoginPhone:function(){return this.loginPhone.phone?!!/^1\d{10}$/.test(this.loginPhone.phone)||(this.errors.phone="请输入正确的手机号",!1):(this.errors.phone="请输入手机号",!1)}},created:function(){this.loginPhone.phone=this.$store.state.login.phoneNumber}}),i=r,l=(o("1701"),o("2877")),a=Object(l["a"])(i,t,s,!1,null,"4eec368a",null);n["default"]=a.exports}}]);
//# sourceMappingURL=chunk-eb6f7ab2.6218de81.js.map