var $url="/settings/administratorsLayerPassword",data=utils.init({userName:utils.getQueryString("userName"),administrator:null,form:{password:null,confirmPassword:null}}),methods={apiGet:function(){var t=this;$api.get($url,{params:{userName:this.userName}}).then(function(i){var s=i.data;t.administrator=s.administrator,t.userName||t.$message({type:"warning",message:"您的密码已过期，请更改登录密码",showClose:!0,duration:0})}).catch(function(t){utils.error(t)}).then(function(){utils.loading(t,!1)})},apiSubmit:function(){var t=this;utils.loading(this,!0),$api.post($url,{userName:this.userName,password:this.form.password}).then(function(t){t.data;utils.success("密码更改成功！"),setTimeout(function(){utils.closeLayer()},1e3)}).catch(function(t){utils.error(t)}).then(function(){utils.loading(t,!1)})},validatePass:function(t,i,s){""===i?s(new Error("请再次输入密码")):i!==this.form.password?s(new Error("两次输入密码不一致!")):s()},btnSubmitClick:function(){var t=this;this.$refs.form.validate(function(i){i&&t.apiSubmit()})},btnCancelClick:function(){utils.closeLayer()}},$vue=new Vue({el:"#main",data:data,methods:methods,created:function(){this.apiGet()}});