1 line
2.9 KiB
JavaScript
1 line
2.9 KiB
JavaScript
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/userCenter/userCenter"],{2263:function(e,t,n){},"316b":function(e,t,n){"use strict";n.r(t);var o=n("c885"),u=n("720a");for(var a in u)["default"].indexOf(a)<0&&function(e){n.d(t,e,(function(){return u[e]}))}(a);n("42f4");var r=n("f0c5"),s=Object(r["a"])(u["default"],o["b"],o["c"],!1,null,"fa9d9dee",null,!1,o["a"],void 0);t["default"]=s.exports},"42f4":function(e,t,n){"use strict";var o=n("2263"),u=n.n(o);u.a},"720a":function(e,t,n){"use strict";n.r(t);var o=n("e3ba"),u=n.n(o);for(var a in o)["default"].indexOf(a)<0&&function(e){n.d(t,e,(function(){return o[e]}))}(a);t["default"]=u.a},"81c0":function(e,t,n){"use strict";(function(e,t){var o=n("4ea4");n("d913");o(n("66fd"));var u=o(n("316b"));e.__webpack_require_UNI_MP_PLUGIN__=n,t(u.default)}).call(this,n("bc2e")["default"],n("543d")["createPage"])},c885:function(e,t,n){"use strict";n.d(t,"b",(function(){return u})),n.d(t,"c",(function(){return a})),n.d(t,"a",(function(){return o}));var o={uNavbar:function(){return n.e("node-modules/uview-ui/components/u-navbar/u-navbar").then(n.bind(null,"ce19"))},uAvatar:function(){return n.e("node-modules/uview-ui/components/u-avatar/u-avatar").then(n.bind(null,"9286"))}},u=function(){var e=this.$createElement;this._self._c},a=[]},e3ba:function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n={data:function(){return{background:{backgroundColor:"transparent"},src:"/static/logo.png",userName:"",admin:"",userid:""}},mounted:function(){var t=this;e.getStorage({key:"userid",success:function(e){t.userid=e.data}}),this.queryUserInfo()},methods:{toChange_password:function(){e.navigateTo({url:"/pages/change_password/change_password?userid="+this.userid})},toSiteAdmin:function(){e.navigateTo({url:"/pages/siteAdmin/siteAdmin"})},toLogout:function(){this.$http({url:this.api.user_logout,method:"GET"}).then((function(t){console.log(t,"退出"),200==t.code&&(e.navigateTo({url:"/pages/login/login"}),e.removeStorage({key:"token",success:function(e){}}),e.removeStorage({key:"userid",success:function(e){}}))}))},uploadAvatar:function(){var t=this;e.chooseImage({count:1,sizeType:["original","compressed"],sourceType:["album","camera"],success:function(e){var n=e.tempFilePaths;t.$http({url:t.api.update_user,method:"put",data:{id:t.userid,nickName:"",phone:"",sex:"",projectName:"",projectColor:"",projectLogo:n[0]}}).then((function(e){200==e.code&&t.queryUserInfo()}))}})},queryUserInfo:function(){var t=this;e.getStorage({key:"userid",success:function(e){console.log(e),t.$http({url:t.api.sel_user,method:"GET",data:{userId:e.data}}).then((function(e){console.log(e),200==e.code&&(t.userName=e.data.username,t.admin=t.user_level(e.data.userType),t.src=e.data.projectLogo?e.data.projectLogo:t.src)}))}})},user_level:function(e){return"0"==e?"管理员":"普通用户"}}};t.default=n}).call(this,n("543d")["default"])}},[["81c0","common/runtime","common/vendor"]]]); |