(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-39c9d1c8"],{"03b7":function(e,t,a){"use strict";a("1aec")},"1aec":function(e,t,a){},"53ca":function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));a("a4d3"),a("e01a"),a("d28b"),a("d3b7"),a("3ca3"),a("ddb0");function r(e){return r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}},"7c26":function(e,t,a){"use strict";a.d(t,"b",(function(){return r})),a.d(t,"a",(function(){return n}));var r=["123456","password","111111","12345678","123123","000000","1234567","12345","1234567890","88888888","666666","123456789","abcd1234","qwerty","abc123","admin123","admin888","administrator"],n={weak:/^[0-9]{6,}$/,medium:/^(?=.*[0-9])(?=.*[a-zA-Z])[0-9a-zA-Z]{6,}$/,strong:/^(?=.*[0-9])(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%^&*(),.?":{}|<>])[0-9a-zA-Z!@#$%^&*(),.?":{}|<>]{8,}$/}},"8f2c":function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page-container"},[a("el-form",[a("el-form-item",{attrs:{label:"姓名:"}},[e._v(" "+e._s(e.userInfo.username)+" ")]),a("el-form-item",{attrs:{label:"用户名:"}},[e._v(" "+e._s(e.userInfo.account)+" ")]),a("el-form-item",{attrs:{label:"邮箱:",id:"email"}},[e._v(" "+e._s(e.userInfoNew.email)+" ")])],1),a("div",{staticStyle:{"margin-top":"10px"}},[a("el-button",{attrs:{type:"primary",size:"small"},on:{click:e.clickChangePasswordBtn}},[e._v("修改密码")]),a("el-button",{attrs:{type:"default",size:"small"},on:{click:e.clickChangeEmailBtn}},[e._v("修改邮箱")])],1),a("el-dialog",{directives:[{name:"el-drag-dialog",rawName:"v-el-drag-dialog"}],attrs:{title:"修改密码",visible:e.changePassword.dialog,width:"500px",center:"","close-on-click-modal":!1},on:{"update:visible":function(t){return e.$set(e.changePassword,"dialog",t)}}},[a("div",{staticClass:"dialog-container"},[a("el-form",{ref:"changePasswordForm",attrs:{"label-width":"150px",model:e.changePassword,rules:e.changePassword.rule}},[a("el-form-item",{attrs:{prop:"password",label:"请输入原密码："}},[a("el-input",{attrs:{placeholder:"请输入",type:"password",onKeypress:"javascript:if(event.keyCode == 32 || event.keyCode == 43)event.returnValue = false;"},model:{value:e.changePassword.password,callback:function(t){e.$set(e.changePassword,"password",t)},expression:"changePassword.password"}})],1),a("el-form-item",{attrs:{prop:"password1",label:"请输入新密码："}},[a("el-input",{attrs:{placeholder:"请输入",maxlength:"12",onKeypress:"javascript:if(event.keyCode == 32 || event.keyCode == 43)event.returnValue = false;",type:"password"},on:{input:e.checkPasswordStrength},model:{value:e.changePassword.password1,callback:function(t){e.$set(e.changePassword,"password1",t)},expression:"changePassword.password1"}}),e.changePassword.password1?a("div",{staticClass:"password-strength-tips"},[a("div",{staticClass:"strength-bar"},[a("div",{staticClass:"strength-level",class:e.passwordStrengthClass})]),a("div",{staticClass:"strength-text"},[e._v(e._s(e.passwordStrengthText))])]):e._e()],1),a("el-form-item",{attrs:{prop:"password2",label:"请再次输入新密码："}},[a("el-input",{attrs:{placeholder:"请输入",maxlength:"12",onKeypress:"javascript:if(event.keyCode == 32 || event.keyCode == 43)event.returnValue = false;",type:"password"},model:{value:e.changePassword.password2,callback:function(t){e.$set(e.changePassword,"password2",t)},expression:"changePassword.password2"}})],1)],1)],1),a("div",{attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{type:"default"},on:{click:function(t){e.changePassword.dialog=!1}}},[e._v("取 消")]),a("el-button",{attrs:{type:"primary"},on:{click:e.clickChangePasswordSureBtn}},[e._v("确 认")])],1)]),a("el-dialog",{directives:[{name:"el-drag-dialog",rawName:"v-el-drag-dialog"}],attrs:{title:"修改邮箱",visible:e.changeEmail.dialog,width:"600px",center:"","close-on-click-modal":!1},on:{"update:visible":function(t){return e.$set(e.changeEmail,"dialog",t)}}},[a("div",{staticClass:"dialog-container"},[a("el-form",{ref:"changeEmailForm",attrs:{"label-width":"150px",model:e.changeEmail,rules:e.changeEmail.rule}},[a("el-form-item",{attrs:{prop:"email",label:"请输入新邮箱："}},[a("el-input",{attrs:{placeholder:"请输入"},model:{value:e.changeEmail.email,callback:function(t){e.$set(e.changeEmail,"email",t)},expression:"changeEmail.email"}})],1),a("el-form-item",{attrs:{prop:"code",label:"请输入验证码："}},[a("div",{staticClass:"flex flex-start"},[a("el-input",{attrs:{placeholder:"请输入",maxlength:"6"},model:{value:e.changeEmail.code,callback:function(t){e.$set(e.changeEmail,"code",t)},expression:"changeEmail.code"}}),a("el-button",{staticStyle:{"margin-left":"10px"},attrs:{disabled:e.changeEmail.send,type:"text",size:"small"},on:{click:e.clickSendEmailCodeBtn}},[e._v("发送验证码至邮箱 ")])],1),a("div",[a("el-button",{staticStyle:{"margin-left":"10px"},attrs:{type:"text",size:"small"},on:{click:e.clickGoEmailIndexBtn}},[e._v("前往邮箱查看 ")])],1)])],1)],1),a("div",{attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{type:"default"},on:{click:function(t){e.changeEmail.dialog=!1}}},[e._v("取 消")]),a("el-button",{attrs:{type:"primary"},on:{click:e.clickChangeEmailSureBtn}},[e._v("确 认")])],1)])],1)},n=[],s=(a("caad"),a("ac1f"),a("2532"),a("1276"),a("96cf"),a("1da1")),o=a("5530"),i=a("5c8a"),l=a("2f62"),c=a("a888"),d=a("cf45"),u=a("8bb9"),m=a("7c26"),g={name:"userInfo",directives:{elDragDialog:c["a"]},computed:Object(o["a"])({},Object(l["b"])({userInfo:function(e){return e.user}})),data:function(){var e=this,t=function(e,t,a){t.length<6||t.length>12?a(new Error("请输入6-12位密码")):m["b"].includes(t)?a(new Error("密码过于简单，请设置更复杂的密码")):!m["a"].weak.test(t)||m["a"].medium.test(t)?a():a(new Error("密码过于简单，请不要使用纯数字密码"))},a=function(t,a,r){(a.length<6||a.length>12)&&r(new Error("请再次输入新密码")),e.changePassword.password1&&e.changePassword.password1!==a&&r(new Error("新密码不一致")),r()},r=function(e,t,a){Object(d["p"])("email",t)||a(new Error("请输入正确的邮箱地址")),a()},n=function(e,t,a){var r=/^[0-9]+$/;r.test(t)||a(new Error("请输入验证码")),(6!==t.length||isNaN(Math.ceil(t)))&&a(new Error("请输入6位数字验证码")),a()};return{userInfoNew:{email:""},changePassword:{dialog:!1,password:"",password1:"",password2:"",rule:{password:[{required:!0,trigger:"blur",message:"请输入密码"}],password1:[{required:!0,trigger:"blur",validator:t}],password2:[{required:!0,trigger:"blur",validator:a}]}},changeEmail:{dialog:!1,email:"",code:"",send:!1,rule:{code:[{required:!0,trigger:"blur",validator:n}],email:[{required:!0,trigger:"blur",validator:r}]}},passwordStrengthClass:"",passwordStrengthText:""}},mounted:function(){this.userInfoNew=this.userInfo},methods:{checkPasswordStrength:function(){var e=this.changePassword.password1;return e?e.length<6?(this.passwordStrengthClass="strength-weak",void(this.passwordStrengthText="密码太短")):m["b"].includes(e)?(this.passwordStrengthClass="strength-weak",void(this.passwordStrengthText="常用密码，极易被破解")):void(m["a"].strong.test(e)?(this.passwordStrengthClass="strength-strong",this.passwordStrengthText="强"):m["a"].medium.test(e)?(this.passwordStrengthClass="strength-medium",this.passwordStrengthText="中"):(this.passwordStrengthClass="strength-weak",this.passwordStrengthText="弱")):(this.passwordStrengthClass="",void(this.passwordStrengthText=""))},clickChangePasswordBtn:function(){var e=this;return Object(s["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:e.changePassword.dialog=!0,e.changePassword.password="",e.changePassword.password1="",e.changePassword.password2="",e.passwordStrengthClass="",e.passwordStrengthText="",setTimeout((function(){e.$refs.changePasswordForm.clearValidate()}),300);case 7:case"end":return t.stop()}}),t)})))()},clickChangePasswordSureBtn:function(){var e=this;return Object(s["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:e.$refs.changePasswordForm.validate(function(){var t=Object(s["a"])(regeneratorRuntime.mark((function t(a){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!a){t.next=5;break}return t.next=3,u["a"].editUserInfo({oldpassword:e.changePassword.password,newpassword:e.changePassword.password1});case 3:Object(i["e"])("修改密码成功"),e.changePassword.dialog=!1;case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}());case 1:case"end":return t.stop()}}),t)})))()},clickChangeEmailBtn:function(){var e=this;return Object(s["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:e.changeEmail.dialog=!0,e.changeEmail.email="",e.changeEmail.code="",e.changeEmail.send=!1,setTimeout((function(){e.$refs.changeEmailForm.clearValidate()}),300);case 5:case"end":return t.stop()}}),t)})))()},clickSendEmailCodeBtn:function(){var e=this;return Object(s["a"])(regeneratorRuntime.mark((function t(){var a;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(a=e.changeEmail.email,a){t.next=4;break}return Object(i["d"])("请先输入您的邮箱地址"),t.abrupt("return");case 4:if(Object(d["p"])("email",a)){t.next=7;break}return Object(i["d"])("邮箱格式错误"),t.abrupt("return");case 7:return t.next=9,u["a"].sendBindEmail(e.changeEmail.email);case 9:e.changeEmail.send=!0,Object(i["e"])("发送验证码成功,请前往邮箱查看");case 11:case"end":return t.stop()}}),t)})))()},clickGoEmailIndexBtn:function(){var e=this.changeEmail.email;if(e){e.split("@")[1].split(".")[0];var t=e.split("@")[1];Object(i["e"])("请允许网页弹窗打开您的邮箱登录页!"),window.open("http://mail."+t)}else Object(i["d"])("请先输入您的邮箱地址")},clickChangeEmailSureBtn:function(){var e=this;return Object(s["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:e.$refs.changeEmailForm.validate(function(){var t=Object(s["a"])(regeneratorRuntime.mark((function t(a){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!a){t.next=6;break}return t.next=3,u["a"].editUserInfo({email:e.changeEmail.email,code:e.changeEmail.code+""});case 3:Object(i["e"])("修改邮箱成功"),e.changeEmail.dialog=!1,e.userInfoNew.email=e.changeEmail.email;case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}());case 1:case"end":return t.stop()}}),t)})))()}}},p=g,h=(a("03b7"),a("2877")),f=Object(h["a"])(p,r,n,!1,null,"4383011b",null);t["default"]=f.exports},a888:function(e,t,a){"use strict";var r=a("53ca"),n=20;function s(e,t,a){return Math.min(Math.max(e,t),a)}function o(e){return{dialogHeaderEl:e.querySelector(".el-dialog__header"),dragDom:e.querySelector(".el-dialog")}}function i(e){return e.componentInstance||e.child}function l(e){return Boolean(i(e)&&i(e).visible)}function c(e){return e&&"object"===Object(r["a"])(e.value)&&null!==e.value?e.value:{center:Boolean(e&&e.value)}}function d(e,t){var a=document.documentElement.clientWidth,r=document.documentElement.clientHeight,s=n,o=Math.max(a-e.offsetWidth-n,s),i=n,l=Math.max(r-t.offsetHeight-n,i);return{screenWidth:a,screenHeight:r,minLeft:s,maxLeft:o,minTop:i,maxTop:l}}function u(e){var t=o(e),a=t.dialogHeaderEl,r=t.dragDom;if(a&&r&&r.offsetWidth){var n=e.__dragDialogOptions||{},i=d(r,a),l=window.getComputedStyle(r),c=parseFloat(l.marginTop)||i.minTop,u=(i.screenWidth-r.offsetWidth)/2,m=(i.screenHeight-r.offsetHeight)/2,g=n.center?m:c;r.style.position="fixed",r.style.margin="0",r.style.left="".concat(s(u,i.minLeft,i.maxLeft),"px"),r.style.top="".concat(s(g,i.minTop,i.maxTop),"px"),r.style.right="auto",r.style.bottom="auto"}}function m(e,t,a){e.__dragDialogOptions=c(t),e.__dragDialogVm=i(a);var r=l(a),n=e.__dragDialogVisible;e.__dragDialogVisible=r,r&&!n&&requestAnimationFrame((function(){u(e)}))}var g={inserted:function(e,t,a){var r=o(e),n=r.dialogHeaderEl,i=r.dragDom;n&&i&&(n.style.cursor="move",n.onmousedown=function(t){var a=d(i,n),r=parseFloat(i.style.left)||i.getBoundingClientRect().left,o=parseFloat(i.style.top)||i.getBoundingClientRect().top,l=t.clientX,c=t.clientY,u=function(t){var n=s(r+t.clientX-l,a.minLeft,a.maxLeft),d=s(o+t.clientY-c,a.minTop,a.maxTop);i.style.left="".concat(n,"px"),i.style.top="".concat(d,"px"),e.__dragDialogVm&&e.__dragDialogVm.$emit&&e.__dragDialogVm.$emit("dragDialog")},m=function e(){document.removeEventListener("mousemove",u),document.removeEventListener("mouseup",e)};document.addEventListener("mousemove",u),document.addEventListener("mouseup",m),t.preventDefault()},m(e,t,a))},componentUpdated:function(e,t,a){m(e,t,a)},unbind:function(e){var t=o(e),a=t.dialogHeaderEl;a&&(a.onmousedown=null),delete e.__dragDialogOptions,delete e.__dragDialogVisible,delete e.__dragDialogVm}},p=function(e){e.directive("el-drag-dialog",g)};window.Vue&&(window["el-drag-dialog"]=g,Vue.use(p)),g.install=p;t["a"]=g}}]);