/*! * build: Hopaheal * copyright: Mead * time: 2022-8-18 15:39:42 */ (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2149027e"],{"0e49":function(e,t,r){"use strict";r.r(t);var s=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"container"},[r("div",{staticClass:"title"},[e._v("修改密码")]),r("el-form",{ref:"change-pwd",attrs:{"label-width":"120px",model:e.form,rules:e.rules}},[r("el-form-item",{attrs:{label:"新密码:",prop:"password"}},[r("el-input",{attrs:{clearable:"","show-password":""},model:{value:e.form.password,callback:function(t){e.$set(e.form,"password",t)},expression:"form.password"}})],1),r("el-form-item",{attrs:{label:"确认密码:",prop:"password_confirmation"}},[r("el-input",{attrs:{clearable:"","show-password":""},model:{value:e.form.password_confirmation,callback:function(t){e.$set(e.form,"password_confirmation",t)},expression:"form.password_confirmation"}})],1),r("el-form-item",{staticStyle:{"text-align":"right"}},[r("el-button",{attrs:{type:"primary"},on:{click:e.changPwd}},[e._v("确认修改")])],1)],1)],1)},a=[],n=r("1da1"),o=r("5530"),i=(r("96cf"),r("2f62")),c=r("9f2e"),u=r("d2c9"),d={data:function(){return{rules:{password:[{required:!0,trigger:"blur",message:"请输入新密码!"}],password_confirmation:[{required:!0,trigger:"blur",message:"请输入确认密码!"}]},form:{}}},computed:Object(o["a"])({},Object(i["c"])({user_id:"user/user_id"})),created:function(){console.log(this.user_id,"pppp"),this.form.id=this.user_id},methods:Object(o["a"])(Object(o["a"])({},Object(i["b"])({setAvatar:"user/setAvatar",_logout:"user/logout"})),{},{changPwd:function(){var e=this;return Object(n["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:e.$refs["change-pwd"].validate(function(){var t=Object(n["a"])(regeneratorRuntime.mark((function t(r){var s,a;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!r){t.next=13;break}if(e.form.password===e.form.password_confirmation){t.next=4;break}return e.$message.warning("您两次输入的密码不一致,请重新输入"),t.abrupt("return");case 4:return t.next=6,Object(u["changePassword"])(e.form);case 6:return s=t.sent,a=s.message,e.$baseMessage(a,"success",!1,"vab-hey-message-success"),t.next=11,e._logout();case 11:return t.next=13,e.$router.push(Object(c["toLoginRoute"])());case 13:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}());case 1:case"end":return t.stop()}}),t)})))()},close:function(e){var t=this;this.$nextTick((function(){void 0!==t.$refs[e]&&t.$refs[e].resetFields()})),this.form=this.$options.data().form,this.fileList=[],this.dialogFormVisible=!1}})},l=d,f=(r("e386"),r("2877")),p=Object(f["a"])(l,s,a,!1,null,"6d16986c",null);t["default"]=p.exports},d2c9:function(e,t,r){"use strict";r.r(t),r.d(t,"doEdit",(function(){return a})),r.d(t,"getUser",(function(){return n})),r.d(t,"changePassword",(function(){return o}));var s=r("b775");function a(e){return Object(s["default"])({url:"/auth/me",method:"put",data:e})}function n(){return Object(s["default"])({url:"/auth/me",method:"get"})}function o(e){return Object(s["default"])({url:"/auth/reset-password",method:"post",data:e})}},daa1c:function(e,t,r){},e386:function(e,t,r){"use strict";r("daa1c")}}]);