1 |
- (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-37bf977e"],{"03a5":function(e,r,t){"use strict";t("bfe0")},"0ff4":function(e,r,t){},"2cc2":function(e,r,t){"use strict";t.r(r);var a=t("1da1"),n=(t("e9c4"),t("96cf"),t("6a1e")),i=t("61f7"),s={name:"myMessage",mixins:[t("9f53").a],data:function(){return{infor:{},isDetail:!0,loading:!1,ruleForm:{username:"",nickname:"",mobile:"",email:"",role_name:"",addtime:""},rules:{username:[{required:!0,message:"请输入账号",trigger:"blur"}],nickname:[{required:!0,validator:function(e,r,t){""===r?t(new Error("真实姓名不能为空!")):r.lenght<2||12<r.lenght||!Object(i.c)(r)||Object(i.d)(r)?t(new Error("真实姓名规则为2~12位汉字!")):t()},trigger:"blur"}],mobile:[{required:!0,message:"请输入手机号",trigger:"blur"}],email:[{required:!0,validator:function(e,r,t){""===r?t(new Error("邮箱不能为空!")):Object(i.p)(r)?t():t(new Error("邮箱格式不正确!"))},trigger:"blur"}],role_name:[{required:!0,message:"请输入角色",trigger:"blur"}],addtime:[{required:!0,message:"请输入加入时间",trigger:"blur"}]}}},created:function(){},mounted:function(){var e=this;return Object(a.a)(regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,e.resetForm();case 2:return r.next=4,e.initData();case 4:case"end":return r.stop()}}),r)})))()},destroyed:function(){},methods:{resetForm:function(){var e=this;return Object(a.a)(regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,e.$nextTick((function(){e.$refs.ruleForm&&(e.$refs.ruleForm.resetFields(),e.$refs.ruleForm.clearValidate(),e.ruleForm={username:"",nickname:"",mobile:"",email:"",role_name:"",addtime:""})}));case 2:case"end":return r.stop()}}),r)})))()},initData:function(){var e=this;return Object(a.a)(regeneratorRuntime.mark((function r(){var t,a;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,n.a.detail({});case 2:if(!(t=r.sent)||0!==t.code||!t.data){r.next=9;break}a=t.data,e.ruleForm={username:a.username,nickname:a.nickname,mobile:a.mobile,email:a.email,addtime:a.addtime,role_name:a.role_name},r.next=15;break;case 9:if(t&&100<=t.code&&t.code<=104)return r.next=12,e.logout();r.next=14;break;case 12:r.next=15;break;case 14:e.$message.warning(t.message);case 15:case"end":return r.stop()}}),r)})))()},submitForm:function(){var e=this;return Object(a.a)(regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,e.$refs.ruleForm.validate(function(){var r=Object(a.a)(regeneratorRuntime.mark((function r(t){var a,i;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(t&&!e.loading)return e.loading=!0,delete(a=JSON.parse(JSON.stringify(e.ruleForm))).role_name,delete a.addtime,delete a.username,r.next=8,n.a.prefect(a);r.next=22;break;case 8:if(i=r.sent,e.loading=!1,!i||0!==i.code){r.next=14;break}e.$notify.success({title:"个人信息修改成功!",message:""}),r.next=20;break;case 14:if(i&&100<=i.code&&i.code<=104)return r.next=17,e.logout();r.next=19;break;case 17:r.next=20;break;case 19:e.$message.warning(i.message);case 20:r.next=24;break;case 22:return r.abrupt("return",!1);case 24:case"end":return r.stop()}}),r)})));return function(e){return r.apply(this,arguments)}}());case 2:case"end":return r.stop()}}),r)})))()}}};t("90a6"),t("03a5"),t=t("2877"),t=Object(t.a)(s,(function(){var e=this,r=e.$createElement;r=e._self._c||r;return r("div",{staticClass:"my-messagge-page pagePadding"},[r("div",{staticClass:"change"},[r("div",{staticClass:"title"},[e._v("我的信息")]),r("div",{staticClass:"change-main"},[r("el-form",{ref:"ruleForm",staticClass:"demo-ruleForm",attrs:{model:e.ruleForm,"status-icon":"",rules:e.rules,"label-width":"110px"}},[r("el-row",{attrs:{gutter:10}},[r("el-col",{attrs:{span:24}},[r("el-form-item",{attrs:{label:"账户",prop:"username"}},[r("el-input",{attrs:{disabled:e.isDetail},model:{value:e.ruleForm.username,callback:function(r){e.$set(e.ruleForm,"username",r)},expression:"ruleForm.username"}})],1)],1),r("el-col",{attrs:{span:24}},[r("el-form-item",{attrs:{label:"姓名",prop:"nickname"}},[r("el-input",{attrs:{disabled:e.isDetail},model:{value:e.ruleForm.nickname,callback:function(r){e.$set(e.ruleForm,"nickname",r)},expression:"ruleForm.nickname"}})],1)],1),r("el-col",{attrs:{span:24}},[r("el-form-item",{attrs:{label:"手机号",prop:"mobile"}},[r("el-input",{attrs:{disabled:e.isDetail},model:{value:e.ruleForm.mobile,callback:function(r){e.$set(e.ruleForm,"mobile",r)},expression:"ruleForm.mobile"}})],1)],1),r("el-col",{attrs:{span:24}},[r("el-form-item",{attrs:{label:"邮箱",prop:"email"}},[r("el-input",{model:{value:e.ruleForm.email,callback:function(r){e.$set(e.ruleForm,"email",r)},expression:"ruleForm.email"}})],1)],1),r("el-col",{attrs:{span:24}},[r("el-form-item",{attrs:{label:"角色",prop:"role_name"}},[r("el-input",{attrs:{disabled:e.isDetail},model:{value:e.ruleForm.role_name,callback:function(r){e.$set(e.ruleForm,"role_name",r)},expression:"ruleForm.role_name"}})],1)],1),r("el-col",{attrs:{span:24}},[r("el-form-item",{attrs:{label:"加入时间",prop:"addtime"}},[r("el-input",{attrs:{disabled:e.isDetail},model:{value:e.ruleForm.addtime,callback:function(r){e.$set(e.ruleForm,"addtime",r)},expression:"ruleForm.addtime"}})],1)],1)],1)],1),r("el-col",{staticClass:"tc",attrs:{span:24}},[r("el-button",{attrs:{type:"primary",disabled:e.loading},on:{click:e.submitForm}},[e.loading?r("i",{staticClass:"el-icon-loading"}):e._e(),r("span",[e._v("提 交 信 息")])])],1)],1)])])}),[],!1,null,"705cd365",null);r.default=t.exports},"6a1e":function(e,r,t){"use strict";var a=t("1b69");r.a={verfiy:function(e,r){return Object(a.a)("Api/verify_code",e,"post",r)},resetpwd:function(e,r){return Object(a.a)("Api/passmobile",e,"post",r)},resetmobile:function(e,r){return Object(a.a)("Api/resetmobile",e,"post",r)},setpwd:function(e,r){return Object(a.a)("Api/passsave",e,"post",r)},list:function(e,r){return Object(a.a)("admin/menu",e,"post",r)},detail:function(e,r){return Object(a.a)("Admin/userinfo",e,"post",r)},version:function(e,r){return Object(a.a)("Admin/lastversion",e,"post",r)},prefect:function(e,r){return Object(a.a)("Api/prefect",e,"post",r)}}},"90a6":function(e,r,t){"use strict";t("0ff4")},bfe0:function(e,r,t){}}]);
|