1 |
- webpackJsonp([20],{TTk0:function(r,t,e){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=e("Dd8w"),o=e.n(s),i=e("SQ4B"),a=e("vGYV"),d=e("qI5z"),n={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.I)("user")&&Object(a.I)("user").userVO},ModifyPassword:function(){var r=this;this.$refs.modifyForm.validate(function(t){if(t){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.D)().then(function(r){window.location.href="http://47.98.174.59:8081/page/login?redirect=http%3a%2f%2f47.98.174.59%2f%23%2fhome"})}).catch(function(r){Object(d.a)("error","修改密码失败:"+r.data)})}})}},mounted:function(){this.setUserInfo()}},l={render:function(){var r=this,t=r.$createElement,e=r._self._c||t;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(t){r.$set(r.modifyForm,"oldPassword",t)},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(t){r.$set(r.modifyForm,"password",t)},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(t){r.$set(r.modifyForm,"password2",t)},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,t=this._self._c||r;return t("div",{staticClass:"right-modifyPsw-title"},[t("span",{staticStyle:{"font-size":"18px","font-weight":"bold"}},[this._v("修改密码")])])},function(){var r=this.$createElement,t=this._self._c||r;return t("div",{staticStyle:{"background-color":"rgba(233,239,249,1)",padding:"10px"}},[t("i",{staticClass:"el-icon-warning",staticStyle:{color:"rgba(0, 117, 203, 1)","font-size":"18px"}}),this._v(" "),t("span",{staticStyle:{"font-size":"16px"}},[this._v("安全提醒:请妥善保管密码,众测服务平台人员不会以任何理由向您索取密码。")])])}]};var m=e("VU/8")(n,l,!1,function(r){e("y4EM")},"data-v-af29d3de",null);t.default=m.exports},y4EM:function(r,t){}});
|