myDetail.js 2.9 KB

1
  1. (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pageMy/myDetail/myDetail"],{"057c":function(t,e,a){"use strict";a.r(e);var n=a("aec0"),i=a("e308");for(var r in i)["default"].indexOf(r)<0&&function(t){a.d(e,t,(function(){return i[t]}))}(r);a("42f2");var o=a("828b"),s=Object(o["a"])(i["default"],n["b"],n["c"],!1,null,null,null,!1,n["a"],void 0);e["default"]=s.exports},"42f2":function(t,e,a){"use strict";var n=a("896f"),i=a.n(n);i.a},"5c4f":function(t,e,a){"use strict";(function(t){var n=a("47a9");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n(a("ed46")),r=a("4f1b"),o={data:function(){return{user:{}}},onShow:function(){this.user=this.$store.getters.user,this.user.organizedName=this.$store.getters.organization&&this.$store.getters.organization.name,this.init()},methods:{updateAvatar:function(){var e=this;t.chooseImage({count:1,success:function(a){t.showLoading(),t.uploadFile({url:i.default.baseUrl+"/file/filenode/-1",filePath:a.tempFilePaths[0],name:"uploadFile",success:function(a){if(200!=a.statusCode)return t.hideLoading(),e.$toast("上传失败");var n=JSON.parse(a.data);if(200!=n.code)return t.hideLoading(),e.$toast("上传失败");var i=JSON.parse(a.data).data.node.url;(0,r.updateUserDetails)({id:e.$store.getters.user.userId,portrait:i}).then((function(a){if(t.hideLoading(),200!=a.code)return e.$toast("修改失败");e.$toast("修改成功"),e.init()}))},fail:function(){t.hideLoading(),e.$toast("上传失败")}})}})},init:function(){var t=this;(0,r.getUserInfoById)(this.user.userId).then((function(e){200==e.code&&(t.user=e.data,t.user["userName"]=e.data.name,t.user["userId"]=e.data.id,t.user.organizedName=e.data.mgrOrganization&&e.data.mgrOrganization.name,t.$store.dispatch("app/changeUser",e.data))}))},logout:function(){var e=this;t.showModal({title:"有极提示",content:"是否退出登录",success:function(a){a.confirm&&(e.$chat.disConnect(),t.removeStorageSync("token"),t.removeStorageSync("chatToken"),t.removeStorageSync("vuex_state"),e.$store.dispatch("app/changeOrganization",{}),e.$store.dispatch("app/changeProject",{}),e.$store.dispatch("app/changeUser",{}),e.$store.dispatch("app/changeIdentity",{}),t.removeTabBarBadge({index:1}),e.$toast("退出成功"),setTimeout((function(){e.$navigateBack()}),400))}})}}};e.default=o}).call(this,a("df3c")["default"])},"896f":function(t,e,a){},aec0:function(t,e,a){"use strict";a.d(e,"b",(function(){return n})),a.d(e,"c",(function(){return i})),a.d(e,"a",(function(){}));var n=function(){var t=this.$createElement;this._self._c},i=[]},b64a:function(t,e,a){"use strict";(function(t,e){var n=a("47a9");a("7748");n(a("3240"));var i=n(a("057c"));t.__webpack_require_UNI_MP_PLUGIN__=a,e(i.default)}).call(this,a("3223")["default"],a("df3c")["createPage"])},e308:function(t,e,a){"use strict";a.r(e);var n=a("5c4f"),i=a.n(n);for(var r in n)["default"].indexOf(r)<0&&function(t){a.d(e,t,(function(){return n[t]}))}(r);e["default"]=i.a}},[["b64a","common/runtime","common/vendor"]]]);