1 |
- webpackJsonp([30],{"5ebZ":function(r,e){},TTk0:function(r,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=s("Dd8w"),o=s.n(t),i=s("SQ4B"),a=s("vGYV"),d=s("qI5z"),n=s("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.J)("user")&&Object(a.J)("user").userVO},ModifyPassword:function(){var r=this;this.$refs.modifyForm.validate(function(e){if(e){var s=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",s).then(function(r){window.alert("密码修改成功,请重新登录"),Object(a.E)().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,e=r.$createElement,s=r._self._c||e;return s("div",[s("div",{staticClass:"right-modifyPsw"},[r._m(0),r._v(" "),r._m(1),r._v(" "),s("el-form",{ref:"modifyForm",staticStyle:{"margin-top":"20px",width:"40%"},attrs:{rules:r.rules,model:r.modifyForm,"label-width":"80px"}},[s("el-form-item",{attrs:{label:"当前密码",prop:"oldPassword"}},[s("el-input",{attrs:{type:"password"},model:{value:r.modifyForm.oldPassword,callback:function(e){r.$set(r.modifyForm,"oldPassword",e)},expression:"modifyForm.oldPassword"}})],1),r._v(" "),s("el-form-item",{attrs:{label:"新密码",prop:"password"}},[s("el-input",{attrs:{type:"password"},model:{value:r.modifyForm.password,callback:function(e){r.$set(r.modifyForm,"password",e)},expression:"modifyForm.password"}})],1),r._v(" "),s("el-form-item",{attrs:{label:"确认密码",prop:"password2"}},[s("el-input",{attrs:{type:"password"},model:{value:r.modifyForm.password2,callback:function(e){r.$set(r.modifyForm,"password2",e)},expression:"modifyForm.password2"}})],1),r._v(" "),s("el-form-item",[s("el-button",{attrs:{type:"primary"},on:{click:r.ModifyPassword}},[r._v("确认修改")])],1)],1)],1)])},staticRenderFns:[function(){var r=this.$createElement,e=this._self._c||r;return e("div",{staticClass:"right-modifyPsw-title"},[e("span",{staticStyle:{"font-size":"18px","font-weight":"bold"}},[this._v("修改密码")])])},function(){var r=this.$createElement,e=this._self._c||r;return e("div",{staticStyle:{"background-color":"rgba(233,239,249,1)",padding:"10px"}},[e("i",{staticClass:"el-icon-warning",staticStyle:{color:"rgba(0, 117, 203, 1)","font-size":"18px"}}),this._v(" "),e("span",{staticStyle:{"font-size":"16px"}},[this._v("安全提醒:请妥善保管密码,众测服务平台人员不会以任何理由向您索取密码。")])])}]};var f=s("VU/8")(l,m,!1,function(r){s("5ebZ")},"data-v-46030882",null);e.default=f.exports}});
|