You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
13 KiB
2 lines
13 KiB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0f8e47f1"],{"1da1":function(t,e,r){"use strict";r.d(e,"a",(function(){return a}));r("d3b7");function n(t,e,r,n,a,o,i){try{var s=t[o](i),c=s.value}catch(u){return void r(u)}s.done?e(c):Promise.resolve(c).then(n,a)}function a(t){return function(){var e=this,r=arguments;return new Promise((function(a,o){var i=t.apply(e,r);function s(t){n(i,a,o,s,c,"next",t)}function c(t){n(i,a,o,s,c,"throw",t)}s(void 0)}))}}},"37b7":function(t,e,r){"use strict";var n=r("42de"),a=r.n(n);a.a},"42de":function(t,e,r){},"468f":function(t,e,r){"use strict";r.r(e);var n=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"Message"},[n("NavBar",{staticClass:"nav-bar"},[n("div",{staticClass:"back",attrs:{slot:"left"},on:{click:t.backClick},slot:"left"},[n("img",{attrs:{src:r("5aa0"),alt:""}})]),n("div",{attrs:{slot:"center"},slot:"center"},[t._v("个人信息")])]),n("div",{staticClass:"content"},[n("el-form",{ref:"nameFormRef",staticClass:"form",attrs:{"label-width":"0px",model:t.nameForm,rules:t.nameFormRules}},[n("el-form-item",{staticClass:"updataform",attrs:{prop:"name"}},[n("el-input",{attrs:{placeholder:"输入新的名称","prefix-icon":"el-icon-user-solid"},model:{value:t.nameForm.name,callback:function(e){t.$set(t.nameForm,"name",e)},expression:"nameForm.name"}})],1),n("el-form-item",{staticClass:"updatabtn"},[n("el-row",[n("el-button",{staticClass:"btn",attrs:{type:"primary"},on:{click:t.updataname}},[t._v("修改")])],1)],1)],1),n("el-form",{ref:"passwordFormRef",staticClass:"form",attrs:{"label-width":"0px",model:t.passwordForm,rules:t.passwordFormRules}},[n("el-form-item",{staticClass:"updataform",attrs:{prop:"password"}},[n("el-input",{attrs:{placeholder:"输入新的密码","prefix-icon":"el-icon-user-solid"},model:{value:t.passwordForm.password,callback:function(e){t.$set(t.passwordForm,"password",e)},expression:"passwordForm.password"}})],1),n("el-form-item",{staticClass:"updatabtn"},[n("el-row",[n("el-button",{staticClass:"btn",attrs:{type:"primary"},on:{click:t.updatapassword}},[t._v("修改")])],1)],1)],1),n("el-form",{ref:"signFormRef",staticClass:"form",attrs:{"label-width":"0px",model:t.signForm,rules:t.signFormRules}},[n("el-form-item",{staticClass:"updataform",attrs:{prop:"sign"}},[n("el-input",{attrs:{placeholder:"输入你的个性签名","prefix-icon":"el-icon-user-solid"},model:{value:t.signForm.sign,callback:function(e){t.$set(t.signForm,"sign",e)},expression:"signForm.sign"}})],1),n("el-form-item",{staticClass:"updatabtn"},[n("el-row",[n("el-button",{staticClass:"btn",attrs:{type:"primary"},on:{click:t.updatasign}},[t._v("修改")])],1)],1)],1)],1)],1)},a=[],o=(r("b0c0"),r("96cf"),r("1da1")),i=r("a7ac"),s={name:"Message",components:{NavBar:i["a"]},data:function(){return{passwordForm:{password:""},passwordFormRules:{password:[{required:!0,message:"请输入密码",trigger:"blur"},{min:5,max:10,message:"长度在 6 到 16 个字符",trigger:"blur"}]},signForm:{sign:""},signFormRules:{sign:[{required:!0,message:"请输入个性签名",trigger:"blur"},{min:0,max:15,message:"长度在15个字符以内",trigger:"blur"}]},nameForm:{sign:""},nameFormRules:{name:[{required:!0,message:"请输入名称",trigger:"blur"},{min:2,max:10,message:"长度在2到10个名称",trigger:"blur"}]}}},created:function(){},methods:{backClick:function(){this.$router.push("/profile")},updatapassword:function(){var t=this;this.$refs.passwordFormRef.validate(function(){var e=Object(o["a"])(regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(r){e.next=2;break}return e.abrupt("return");case 2:return e.prev=2,e.next=5,t.$http.post("/users/updata/password",t.passwordForm);case 5:t.$message.success("修改成功"),t.$bus.$emit("isrefreshinfo"),t.$refs.passwordFormRef.resetFields(),e.next=13;break;case 10:return e.prev=10,e.t0=e["catch"](2),e.abrupt("return",t.$message.error("修改失败"));case 13:case"end":return e.stop()}}),e,null,[[2,10]])})));return function(t){return e.apply(this,arguments)}}())},updatasign:function(){var t=this;this.$refs.signFormRef.validate(function(){var e=Object(o["a"])(regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(r){e.next=2;break}return e.abrupt("return");case 2:return e.prev=2,e.next=5,t.$http.post("/users/updata/sign",t.signForm);case 5:t.$message.success("修改成功"),t.$bus.$emit("isrefreshinfo"),t.$refs.signFormRef.resetFields(),e.next=13;break;case 10:return e.prev=10,e.t0=e["catch"](2),e.abrupt("return",t.$message.error("修改失败"));case 13:case"end":return e.stop()}}),e,null,[[2,10]])})));return function(t){return e.apply(this,arguments)}}())},updataname:function(){var t=this;this.$refs.nameFormRef.validate(function(){var e=Object(o["a"])(regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(r){e.next=2;break}return e.abrupt("return");case 2:return e.prev=2,e.next=5,t.$http.post("/users/updata/name",t.nameForm);case 5:t.$message.success("修改成功"),window.localStorage.setItem("name",t.nameForm.name),t.$bus.$emit("isrefreshinfo"),t.$refs.nameFormRef.resetFields(),e.next=14;break;case 11:return e.prev=11,e.t0=e["catch"](2),e.abrupt("return",t.$message.error("修改失败"));case 14:case"end":return e.stop()}}),e,null,[[2,11]])})));return function(t){return e.apply(this,arguments)}}())}}},c=s,u=(r("9d4a"),r("2877")),l=Object(u["a"])(c,n,a,!1,null,"6953b79f",null);e["default"]=l.exports},"5aa0":function(t,e,r){t.exports=r.p+"img/back.8059563a.svg"},"96cf":function(t,e,r){var n=function(t){"use strict";var e,r=Object.prototype,n=r.hasOwnProperty,a="function"===typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(N){c=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var a=e&&e.prototype instanceof v?e:v,o=Object.create(a.prototype),i=new C(n||[]);return o._invoke=$(t,r,i),o}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(N){return{type:"throw",arg:N}}}t.wrap=u;var f="suspendedStart",p="suspendedYield",h="executing",m="completed",d={};function v(){}function g(){}function y(){}var w={};w[o]=function(){return this};var b=Object.getPrototypeOf,x=b&&b(b(O([])));x&&x!==r&&n.call(x,o)&&(w=x);var F=y.prototype=v.prototype=Object.create(w);function k(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function L(t,e){function r(a,o,i,s){var c=l(t[a],t,o);if("throw"!==c.type){var u=c.arg,f=u.value;return f&&"object"===typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,i,s)}),(function(t){r("throw",t,i,s)})):e.resolve(f).then((function(t){u.value=t,i(u)}),(function(t){return r("throw",t,i,s)}))}s(c.arg)}var a;function o(t,n){function o(){return new e((function(e,a){r(t,n,e,a)}))}return a=a?a.then(o,o):o()}this._invoke=o}function $(t,e,r){var n=f;return function(a,o){if(n===h)throw new Error("Generator is already running");if(n===m){if("throw"===a)throw o;return j()}r.method=a,r.arg=o;while(1){var i=r.delegate;if(i){var s=_(i,r);if(s){if(s===d)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===f)throw n=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=h;var c=l(t,e,r);if("normal"===c.type){if(n=r.done?m:p,c.arg===d)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n=m,r.method="throw",r.arg=c.arg)}}}function _(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator["return"]&&(r.method="return",r.arg=e,_(t,r),"throw"===r.method))return d;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var a=l(n,t.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,d;var o=a.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,d):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function R(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function O(t){if(t){var r=t[o];if(r)return r.call(t);if("function"===typeof t.next)return t;if(!isNaN(t.length)){var a=-1,i=function r(){while(++a<t.length)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}return{next:j}}function j(){return{value:e,done:!0}}return g.prototype=F.constructor=y,y.constructor=g,g.displayName=c(y,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"===typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,c(t,s,"GeneratorFunction")),t.prototype=Object.create(F),t},t.awrap=function(t){return{__await:t}},k(L.prototype),L.prototype[i]=function(){return this},t.AsyncIterator=L,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new L(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},k(F),c(F,s,"Generator"),F[o]=function(){return this},F.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){while(e.length){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=O,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(R),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0],e=t.completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return s.type="throw",s.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],s=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),R(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var a=n.arg;R(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:O(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),d}},t}(t.exports);try{regeneratorRuntime=n}catch(a){Function("r","regeneratorRuntime = r")(n)}},"9d4a":function(t,e,r){"use strict";var n=r("ef7a"),a=r.n(n);a.a},a7ac:function(t,e,r){"use strict";var n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"nav-bar"},[r("div",{staticClass:"left"},[t._t("left")],2),r("div",{staticClass:"center"},[t._t("center")],2),r("div",{staticClass:"right"},[t._t("right")],2)])},a=[],o={name:"NavBar"},i=o,s=(r("37b7"),r("2877")),c=Object(s["a"])(i,n,a,!1,null,"cfeec936",null);e["a"]=c.exports},b0c0:function(t,e,r){var n=r("83ab"),a=r("9bf2").f,o=Function.prototype,i=o.toString,s=/^\s*function ([^ (]*)/,c="name";n&&!(c in o)&&a(o,c,{configurable:!0,get:function(){try{return i.call(this).match(s)[1]}catch(t){return""}}})},ef7a:function(t,e,r){}}]);
|
|
//# sourceMappingURL=chunk-0f8e47f1.73b326ea.js.map
|