(window.webpackJsonp=window.webpackJsonp||[]).push([[44],{539:function(e,t,n){var content=n(664);"string"==typeof content&&(content=[[e.i,content,""]]),content.locals&&(e.exports=content.locals);(0,n(6).default)("0727477a",content,!0,{sourceMap:!1})},662:function(e,t,n){e.exports=n.p+"img/header.2b73ec1.png"},663:function(e,t,n){"use strict";n(539)},664:function(e,t,n){(t=n(5)(!1)).push([e.i,".header[data-v-46966f6b]{float:right;width:24px;height:24px;border-radius:50%;overflow:hidden}[data-v-46966f6b] .van-dialog__content{padding:30px 15px}[data-v-46966f6b] .van-uploader{display:block}[data-v-46966f6b] .van-uploader .van-uploader__input-wrapper{flex:1}[data-v-46966f6b] .van-cell__title{width:5em;flex:0 0 auto}.van-cell__right-icon[data-v-46966f6b]{font-size:14px}.van-field[data-v-46966f6b]{line-height:32px;padding:8px 15px}",""]),e.exports=t},708:function(e,t,n){"use strict";n.r(t);n(69),n(16);var r=n(8),o=(n(536),n(537)),c=n.n(o),l=n(38);function f(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function d(e){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?f(Object(source),!0).forEach((function(t){Object(r.a)(e,t,source[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(source)):f(Object(source)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(source,t))}))}return e}var v={i18n:{messages:{zh:{title:"个人资料",head:"头像",nick:"昵称",signature:"个人签名",edit_nick:"编辑昵称",please:"请输入昵称",edit_sign:"编辑个人签名"},en:{title:"Personal Information",head:"Avatar",nick:"Nickname",signature:"Signatures",edit_nick:"Edit nickname",please:"Please enter a nickname",edit_sign:"Edit personal signature"}}},components:Object(r.a)({},c.a.name,c.a),data:function(){return{avatar:n(662),user_nickname:"",signature:"",showNickPop:!1,showSignPop:!1}},computed:d({},Object(l.d)({userInfo:function(e){var t=e.user.userInfo;return this.user_nickname=t.user_nickname,this.signature=t.signature,t}})),watch:{userInfo:function(e){this.user_nickname=e.user_nickname,this.signature=e.signature}},methods:d(d({},Object(l.b)({upload:"upload",editUserInfo:"user/editUserInfo",getUserInfo:"user/getUserInfo"})),{},{afterRead:function(e){var t=this,n=this.$toast.loading();this.upload(e.file).then((function(e){t.avatar=e.data.url,t.$nextTick((function(){t.handleSave("avatar")}))})).finally((function(){n.clear()}))},handleSave:function(e){var t=this,n=this.$toast.loading();this.editUserInfo(Object(r.a)({},e,this[e])).then((function(e){t.$toast(e.msg),t.getUserInfo()})).finally((function(){n.clear()}))}})},h=(n(663),n(43)),component=Object(h.a)(v,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("van-nav-bar",{attrs:{title:e.$t("title"),"left-arrow":""},on:{"click-left":function(t){return e.$router.back()}}}),e._v(" "),n("van-cell-group",[n("van-uploader",{attrs:{"after-read":e.afterRead}},[n("van-cell",{attrs:{title:e.$t("head"),"is-link":""}},[[n("van-image",{staticClass:"header",attrs:{src:e.userInfo.avatar}})]],2)],1),e._v(" "),n("van-cell",{attrs:{title:e.$t("nick"),value:e.userInfo.user_nickname,"is-link":""},on:{click:function(t){e.showNickPop=!0}}}),e._v(" "),n("van-cell",{attrs:{title:e.$t("signature"),value:e.userInfo.signature,"is-link":""},on:{click:function(t){e.showSignPop=!0}}})],1),e._v(" "),n("van-dialog",{attrs:{title:e.$t("edit_nick"),"show-cancel-button":""},on:{confirm:function(t){return e.handleSave("user_nickname")}},model:{value:e.showNickPop,callback:function(t){e.showNickPop=t},expression:"showNickPop"}},[n("van-cell-group",[n("van-field",{attrs:{"input-align":"center",placeholder:e.$t("please")},model:{value:e.user_nickname,callback:function(t){e.user_nickname=t},expression:"user_nickname"}})],1)],1),e._v(" "),n("van-dialog",{attrs:{title:e.$t("edit_sign"),"show-cancel-button":""},on:{confirm:function(t){return e.handleSave("signature")}},model:{value:e.showSignPop,callback:function(t){e.showSignPop=t},expression:"showSignPop"}},[n("van-cell-group",[n("van-field",{attrs:{rows:"2",type:"textarea",maxlength:"20","show-word-limit":""},model:{value:e.signature,callback:function(t){e.signature=t},expression:"signature"}})],1)],1)],1)}),[],!1,null,"46966f6b",null);t.default=component.exports}}]);