profile.js 3.5 KB

1
  1. (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/my/profile"],{"4ea3":function(e,n,t){"use strict";(function(e){t("630e");u(t("66fd"));var n=u(t("d801"));function u(e){return e&&e.__esModule?e:{default:e}}e(n.default)}).call(this,t("5486")["createPage"])},d801:function(e,n,t){"use strict";t.r(n);var u=t("d9a8"),r=t("e217");for(var o in r)"default"!==o&&function(e){t.d(n,e,(function(){return r[e]}))}(o);var a,i=t("f0c5"),s=Object(i["a"])(r["default"],u["b"],u["c"],!1,null,null,null,!1,u["a"],a);n["default"]=s.exports},d9a8:function(e,n,t){"use strict";t.d(n,"b",(function(){return r})),t.d(n,"c",(function(){return o})),t.d(n,"a",(function(){return u}));var u={faNavbar:function(){return t.e("components/fa-navbar/fa-navbar").then(t.bind(null,"6858"))},uForm:function(){return t.e("uview-ui/components/u-form/u-form").then(t.bind(null,"3e66"))},uFormItem:function(){return Promise.all([t.e("common/vendor"),t.e("uview-ui/components/u-form-item/u-form-item")]).then(t.bind(null,"8413"))},uImage:function(){return t.e("uview-ui/components/u-image/u-image").then(t.bind(null,"9406"))},uInput:function(){return Promise.all([t.e("common/vendor"),t.e("uview-ui/components/u-input/u-input")]).then(t.bind(null,"b3e3"))},uButton:function(){return t.e("uview-ui/components/u-button/u-button").then(t.bind(null,"6829"))},faTabbar:function(){return Promise.all([t.e("common/vendor"),t.e("components/fa-tabbar/fa-tabbar")]).then(t.bind(null,"ecd8"))}},r=function(){var e=this,n=e.$createElement,t=(e._self._c,{backgroundColor:e.theme.bgColor,color:e.theme.color});e.$mp.data=Object.assign({},{$root:{a0:t}})},o=[]},e217:function(e,n,t){"use strict";t.r(n);var u=t("f0cc"),r=t.n(u);for(var o in u)"default"!==o&&function(e){t.d(n,e,(function(){return u[e]}))}(o);n["default"]=r.a},f0cc:function(e,n,t){"use strict";(function(e){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var u=o(t("a34a")),r=t("59de");function o(e){return e&&e.__esModule?e:{default:e}}function a(e,n,t,u,r,o,a){try{var i=e[o](a),s=i.value}catch(c){return void t(c)}i.done?n(s):Promise.resolve(s).then(u,r)}function i(e){return function(){var n=this,t=arguments;return new Promise((function(u,r){var o=e.apply(n,t);function i(e){a(o,u,r,i,s,"next",e)}function s(e){a(o,u,r,i,s,"throw",e)}i(void 0)}))}}var s={mixins:[r.avatar],computed:{userInfo:function(){return this.vuex_user.avatar&&-1==this.vuex_user.avatar.indexOf("data:image/svg+xml;base64")&&(this.form.avatar=this.vuex_user.avatar),this.form.username=this.vuex_user.username,this.form.nickname=this.vuex_user.nickname,this.form.bio=this.vuex_user.bio,this.vuex_user}},onShow:function(){e.$off("uAvatarCropper",this.upload)},onReady:function(){this.$refs.uForm.setRules(this.rules)},data:function(){return{labelPosition:"left",url:"",form:{username:"",nickname:"",bio:""},rules:{username:[{required:!0,message:"请输入用户名",trigger:"blur"}],nickname:[{required:!0,message:"请输入昵称",trigger:"blur"}]}}},methods:{submit:function(){var e=this;this.$refs.uForm.validate(function(){var n=i(u.default.mark((function n(t){var r;return u.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(!t){n.next=8;break}return n.next=3,e.$api.getUserProfile(e.form);case 3:r=n.sent,e.$u.toast(r.msg),r.code&&setTimeout((function(){e.$Router.back(1)}),800),n.next=9;break;case 8:case 9:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}())}}};n.default=s}).call(this,t("5486")["default"])}},[["4ea3","common/runtime","common/vendor"]]]);