text: (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-9ee84b7c"],{"44a0":function(e,t,r){"use strict";var a=r("ef84"),o=r.n(a);o.a},a347:function(e,t,r){"use strict";r.r(t);var a=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("Card",[r("p",{attrs:{slot:"title"},slot:"title"},[r("Icon",{attrs:{type:"md-person"}}),e._v("\n      个人信息\n    ")],1),r("div",[r("Form",{ref:"myForm",attrs:{rules:e.ruleValidate,model:e.formItem,"label-width":90}},[r("FormItem",{attrs:{label:"用户账号",prop:"username"}},[r("div",{staticStyle:{display:"inline-block",width:"300px"}},[r("Input",{attrs:{disabled:""},model:{value:e.username,callback:function(t){e.username=t},expression:"username"}})],1)]),r("FormItem",{attrs:{label:"用户昵称",prop:"nickname"}},[r("div",{staticStyle:{display:"inline-block",width:"300px"}},[r("Input",{attrs:{placeholder:"请输入昵称"},model:{value:e.formItem.nickname,callback:function(t){e.$set(e.formItem,"nickname",t)},expression:"formItem.nickname"}})],1)]),r("FormItem",{attrs:{label:"用户头像",prop:"headImg"}},[e.formItem.head_img?r("div",{staticClass:"demo-upload-list"},[r("img",{attrs:{src:e.formItem.head_img}}),r("div",{staticClass:"demo-upload-list-cover"},[r("Icon",{attrs:{type:"ios-trash-outline"},nativeOn:{click:function(t){return e.handleImgRemove()}}})],1)]):e._e(),e.formItem.head_img?r("input",{directives:[{name:"model",rawName:"v-model",value:e.formItem.head_img,expression:"formItem.head_img"}],attrs:{type:"hidden",name:"image"},domProps:{value:e.formItem.head_img},on:{input:function(t){t.target.composing||e.$set(e.formItem,"head_img",t.target.value)}}}):e._e(),e.formItem.head_img?e._e():r("Upload",{staticStyle:{display:"inline-block",width:"58px"},attrs:{type:"drag",action:e.uploadUrl,headers:e.uploadHeader,format:["jpg","jpeg","png"],"max-size":5120,"on-success":e.handleImgSuccess,"on-format-error":e.handleImgFormatError,"on-exceeded-size":e.handleImgMaxSize}},[r("div",{staticStyle:{width:"58px",height:"58px","line-height":"58px"}},[r("Icon",{attrs:{type:"md-camera",size:"20"}})],1)])],1),r("FormItem",{attrs:{label:"原密码",prop:"oldPassword"}},[r("div",{staticStyle:{display:"inline-block",width:"300px"}},[r("Input",{attrs:{type:"password",placeholder:"请输入现在使用的密码，如需修改密码则必填"},model:{value:e.formItem.oldPassword,callback:function(t){e.$set(e.formItem,"oldPassword",t)},expression:"formItem.oldPassword"}})],1)]),r("FormItem",{attrs:{label:"新密码",prop:"password"}},[r("div",{staticStyle:{display:"inline-block",width:"300px"}},[r("Input",{attrs:{type:"password",placeholder:"请输入新密码，至少6位字符"},model:{value:e.formItem.password,callback:function(t){e.$set(e.formItem,"password",t)},expression:"formItem.password"}})],1)]),r("FormItem",{attrs:{label:"确认新密码",prop:"rePassword"}},[r("div",{staticStyle:{display:"inline-block",width:"300px"}},[r("Input",{attrs:{type:"password",placeholder:"请再次输入新密码"},model:{value:e.rePassword,callback:function(t){e.rePassword=t},expression:"rePassword"}})],1)]),r("div",[r("Button",{staticStyle:{width:"100px"},attrs:{type:"text"},on:{click:e.cancel}},[e._v("取消")]),r("Button",{staticStyle:{width:"100px"},attrs:{type:"primary",loading:e.saveLoading},on:{click:e.confirmSubmit}},[e._v("保存\n          ")])],1)],1)],1)]),r("Modal",{attrs:{width:"360"},model:{value:e.confirmSub,callback:function(t){e.confirmSub=t},expression:"confirmSub"}},[r("p",{staticStyle:{color:"#f60","text-align":"center"},attrs:{slot:"header"},slot:"header"},[r("Icon",{attrs:{type:"information-circled"}}),r("span",[e._v("确定要提交么")])],1),r("div",{staticStyle:{"text-align":"center"}},[r("p",[e._v("个人信息修改后，将会退出系统重新登录，请明确后修改！")])]),r("div",{attrs:{slot:"footer"},slot:"footer"},[r("Button",{attrs:{type:"error",size:"large",long:"",loading:e.saveLoading},on:{click:e.submit}},[e._v("确定修改")])],1)])],1)},o=[],s=(r("8e6e"),r("ac6a"),r("456d"),r("7f7f"),r("ade3")),i=r("2f62"),n=r("c24f"),l=r("66df"),m=r("c276");function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function d(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?c(Object(r),!0).forEach((function(t){Object(s["a"])(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var u={name:"own_index",data:function(){var e=this,t=function(t,r,a){var o=e.formItem.password;o!==e.rePassword?a(new Error("两次输入密码不一致")):a()},r=function(t,r,a){var o=e.formItem.password;o?e.formItem.oldPassword?a():a(new Error("初始密码不得为空")):a()};return{confirmSub:!1,uploadUrl:l["a"]+"Index/upload",uploadHeader:{apiAuth:Object(m["i"])()},saveLoading:!1,rePassword:"",username:"",formItem:{nickname:"",head_img:"",oldPassword:"",password:""},ruleValidate:{nickname:[{required:!0,message:"请输入用户昵称",trigger:"blur"}],password:[{min:6,message:"请至少输入6个字符",trigger:"blur"},{max:32,message:"最多输入32个字符",trigger:"blur"}],rePassword:[{validator:t,trigger:"blur"}],oldPassword:[{validator:r,trigger:"blur"}]}}},methods:d(d(d({},Object(i["b"])(["handleLogOut"])),Object(i["c"])(["closeTag"])),{},{cancel:function(){this.closeTag({name:"user_center"})},confirmSubmit:function(){this.confirmSub=!0},submit:function(){var e=this;this.$refs["myForm"].validate((function(t){t&&(e.saveLoading=!0,Object(n["j"])(e.formItem).then((function(t){e.$Message.success(t.data.msg),e.handleLogOut().then((function(){e.$router.push({name:"login"})})),e.saveLoading=!1})))}))},init:function(){var e=this.$store.state.user.userInfo;this.username=e.username,this.formItem.nickname=e.nickname,this.formItem.head_img=e.userData.head_img},handleImgFormatError:function(e){this.$Notice.warning({title:"文件类型不合法",desc:e.name+"的文件类型不正确，请上传jpg或者png图片。"})},handleImgRemove:function(){this.formItem.head_img=""},handleImgSuccess:function(e){1===e.code?(this.$Message.success(e.msg),this.formItem.head_img=e.data.fileUrl):this.$Message.error(e.msg)},handleImgMaxSize:function(e){this.$Notice.warning({title:"文件大小不合法",desc:e.name+"太大啦请上传小于5M的文件。"})}}),mounted:function(){this.init()}},p=u,f=(r("44a0"),r("2877")),g=Object(f["a"])(p,a,o,!1,null,null,null);t["default"]=g.exports},ef84:function(e,t,r){}}]);