49.7839084f9140c6f1875f.js 3.1 KB

1
  1. webpackJsonp([49],{"0yNy":function(r,s){},TTk0:function(r,s,e){"use strict";Object.defineProperty(s,"__esModule",{value:!0});var t=e("Dd8w"),o=e.n(t),i=e("SQ4B"),a=e("vGYV"),d=e("qI5z"),n=e("2uFj"),l={name:"ModifyPsw",data:function(){return{user:{},modifyForm:{oldPassword:"",password:"",password2:""},rules:{oldPassword:[{required:!0,message:"当前密码不可为空",trigger:"blur"},{min:6,max:16,message:"密码长度在 6 到 16 个字符",trigger:"blur"}],password:[{required:!0,message:"新密码不可为空",trigger:"blur"},{min:6,max:16,message:"密码长度在 6 到 16 个字符",trigger:"blur"}],password2:[{required:!0,message:"确认密码不可为空",trigger:"blur"},{min:6,max:16,message:"密码长度在 6 到 16 个字符",trigger:"blur"}]}}},methods:{setUserInfo:function(){this.user=Object(a.K)("user")&&Object(a.K)("user").userVO},ModifyPassword:function(){var r=this;this.$refs.modifyForm.validate(function(s){if(s){var e=o()({id:r.user.id.toString()},r.modifyForm);if(r.modifyForm.password!=r.modifyForm.password2)return void Object(d.a)("error","两次密码不一致,请重新输入!");i.a.put("/api/password/reset",e).then(function(r){window.alert("密码修改成功,请重新登录"),Object(a.F)().then(function(r){window.location.href=n.b})}).catch(function(r){Object(d.a)("error","修改密码失败:"+r.data)})}})}},mounted:function(){this.setUserInfo()}},m={render:function(){var r=this,s=r.$createElement,e=r._self._c||s;return e("div",[e("div",{staticClass:"right-modifyPsw"},[r._m(0),r._v(" "),r._m(1),r._v(" "),e("el-form",{ref:"modifyForm",staticStyle:{"margin-top":"20px",width:"40%"},attrs:{rules:r.rules,model:r.modifyForm,"label-width":"80px"}},[e("el-form-item",{attrs:{label:"当前密码",prop:"oldPassword"}},[e("el-input",{attrs:{type:"password"},model:{value:r.modifyForm.oldPassword,callback:function(s){r.$set(r.modifyForm,"oldPassword",s)},expression:"modifyForm.oldPassword"}})],1),r._v(" "),e("el-form-item",{attrs:{label:"新密码",prop:"password"}},[e("el-input",{attrs:{type:"password"},model:{value:r.modifyForm.password,callback:function(s){r.$set(r.modifyForm,"password",s)},expression:"modifyForm.password"}})],1),r._v(" "),e("el-form-item",{attrs:{label:"确认密码",prop:"password2"}},[e("el-input",{attrs:{type:"password"},model:{value:r.modifyForm.password2,callback:function(s){r.$set(r.modifyForm,"password2",s)},expression:"modifyForm.password2"}})],1),r._v(" "),e("el-form-item",[e("el-button",{attrs:{type:"primary"},on:{click:r.ModifyPassword}},[r._v("确认修改")])],1)],1)],1)])},staticRenderFns:[function(){var r=this.$createElement,s=this._self._c||r;return s("div",{staticClass:"right-modifyPsw-title"},[s("span",{staticStyle:{"font-size":"18px","font-weight":"bold"}},[this._v("修改密码")])])},function(){var r=this.$createElement,s=this._self._c||r;return s("div",{staticClass:"modify-psw-warning"},[s("i",{staticClass:"el-icon-warning"}),this._v(" "),s("span",{staticStyle:{"font-size":"16px"}},[this._v("安全提醒:请妥善保管密码,切记向他人随意泄漏您的密码。")])])}]};var f=e("VU/8")(l,m,!1,function(r){e("0yNy")},"data-v-087441ea",null);s.default=f.exports}});