(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-215477d2"],{"2f3f":function(e,n,o){},4795:function(e,n,o){var t=o("23e7"),i=o("da84"),s=o("342f"),r=[].slice,l=/MSIE .\./.test(s),a=function(e){return function(n,o){var t=arguments.length>2,i=t?r.call(arguments,2):void 0;return e(t?function(){("function"==typeof n?n:Function(n)).apply(this,i)}:n,o)}};t({global:!0,bind:!0,forced:l},{setTimeout:a(i.setTimeout),setInterval:a(i.setInterval)})},acd9:function(e,n,o){"use strict";o("2f3f")},c1bd:function(e,n,o){"use strict";o.r(n);var t=function(){var e=this,n=e.$createElement,o=e._self._c||n;return o("div",{staticClass:"reset"},[o("el-menu",{attrs:{mode:"horizontal","default-active":"1"}},[o("el-menu-item",{attrs:{index:"1"}},[e._v("修改密码")])],1),o("el-card",{staticClass:"box-card",attrs:{shadow:"never"}},[o("p",[e._v(" 请在下面的输入框中输入对应密码，然后点击“提交新密码”修改您的登陆密码为最新的密码。为了保证您的账号安全，请不要将您的密码告诉给第三方，并建议您不定期修改您的登录密码 ")])]),o("el-form",{ref:"formPhone",staticClass:"form-content",attrs:{model:e.loginPhone}},[o("el-form-item",{attrs:{error:e.errors.phone}},[o("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),o("el-form-item",{attrs:{error:e.errors.newPassword}},[o("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),o("el-form-item",{attrs:{error:e.errors.code}},[o("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"}},[o("el-button",{attrs:{slot:"append",loading:e.loading.send},on:{click:e.sendSMSCode},slot:"append"},[e._v(e._s(e.codeContent))])],1)],1),o("el-form-item",{staticClass:"submit"},[o("el-button",{staticClass:"btn-login",attrs:{type:"primary"},on:{click:e.resetPwd}},[e._v("登录")])],1)],1)],1)},i=[],s=(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.loginPhone.code)return void(this.errors.code="请输入验证码");if(!this.loginPhone.newPassword)return void(this.errors.resetPassword="请输入密码");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.$router.replace({path:"login"})}))["catch"]((function(n){console.log(n),e.$message.error(n.msg),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}}),r=s,l=(o("acd9"),o("2877")),a=Object(l["a"])(r,t,i,!1,null,"06060a20",null);n["default"]=a.exports}}]);
//# sourceMappingURL=chunk-215477d2.d0404fe7.js.map