index.js 4.8 KB

12
  1. (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/my/index/index"],{89:function(e,n,t){"use strict";(function(e,n){var r=t(4);t(26);r(t(25));var o=r(t(90));e.__webpack_require_UNI_MP_PLUGIN__=t,n(o.default)}).call(this,t(1)["default"],t(2)["createPage"])},90:function(e,n,t){"use strict";t.r(n);var r=t(91),o=t(93);for(var i in o)["default"].indexOf(i)<0&&function(e){t.d(n,e,(function(){return o[e]}))}(i);t(95);var u,s=t(32),a=Object(s["default"])(o["default"],r["render"],r["staticRenderFns"],!1,null,null,null,!1,r["components"],u);a.options.__file="pages/my/index/index.vue",n["default"]=a.exports},91:function(e,n,t){"use strict";t.r(n);var r=t(92);t.d(n,"render",(function(){return r["render"]})),t.d(n,"staticRenderFns",(function(){return r["staticRenderFns"]})),t.d(n,"recyclableRender",(function(){return r["recyclableRender"]})),t.d(n,"components",(function(){return r["components"]}))},92:function(e,n,t){"use strict";var r;t.r(n),t.d(n,"render",(function(){return o})),t.d(n,"staticRenderFns",(function(){return u})),t.d(n,"recyclableRender",(function(){return i})),t.d(n,"components",(function(){return r}));try{r={uniIcons:function(){return Promise.all([t.e("common/vendor"),t.e("components/uni-icons/uni-icons")]).then(t.bind(null,1221))},uIcon:function(){return t.e("uview-ui/components/u-icon/u-icon").then(t.bind(null,1200))}}}catch(s){if(-1===s.message.indexOf("Cannot find module")||-1===s.message.indexOf(".vue"))throw s;console.error(s.message),console.error("1. 排查组件名称拼写是否正确"),console.error("2. 排查组件是否符合 easycom 规范,文档:https://uniapp.dcloud.net.cn/collocation/pages?id=easycom"),console.error("3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件")}var o=function(){var e=this,n=e.$createElement;e._self._c},i=!1,u=[];o._withStripped=!0},93:function(e,n,t){"use strict";t.r(n);var r=t(94),o=t.n(r);for(var i in r)["default"].indexOf(i)<0&&function(e){t.d(n,e,(function(){return r[e]}))}(i);n["default"]=o.a},94:function(e,n,t){"use strict";(function(e){var r=t(4);Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o=r(t(41)),i=r(t(43)),u={data:function(){return{usernames:"",userinfos:{},isLogin:!1}},methods:{getUserlogin:function(){var n=this;return(0,i.default)(o.default.mark((function t(){var r,i;return o.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(r=e.getStorageSync("session_key"),n.isLogin=!!r,n.isLogin){t.next=4;break}return t.abrupt("return");case 4:return t.next=6,n.$myRequest({url:"/api/api_gateway?method=user.login.user_login_info"});case 6:i=t.sent,console.log(i.children),n.usernames=i.username,n.getUsermsg(n.usernames),e.setStorage({key:"jurisdiction",data:JSON.stringify(i.children)});case 11:case"end":return t.stop()}}),t)})))()},getuserinfonew:function(){var e=this;return(0,i.default)(o.default.mark((function n(){var t;return o.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,e.$myRequest({url:"/api/v2/theme/home/info/"});case 2:t=n.sent,t.items&&t.items.logo_url?e.userinfos.image=t.items.logo_url:e.userinfos.image="";case 4:case"end":return n.stop()}}),n)})))()},getUsermsg:function(e){var n=this;return(0,i.default)(o.default.mark((function t(){var r;return o.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,n.$myRequest({url:"/api/api_gateway?method=home.homes.personal_center",data:{username:e}});case 2:r=t.sent,console.log(r),n.userinfos=r,n.getuserinfonew();case 6:case"end":return t.stop()}}),t)})))()},getlogout:function(){var e=this;return(0,i.default)(o.default.mark((function n(){return o.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,e.$myRequest({url:"/api/api_gateway?method=user.login.logout_user"});case 2:n.sent;case 3:case"end":return n.stop()}}),n)})))()},handleLogin:function(){console.log("---------------------- login"),e.navigateTo({url:"/pages/login/login"})},about:function(){e.navigateTo({url:"../about/about"})},error:function(e){this.userinfos.image="../../../static/images/my/f856c0422304bdd24a008f4d75b76e3.png"},userinfo:function(){e.navigateTo({url:"../user-info/user-info?data="+JSON.stringify(this.userinfos)})},outto:function(){var n=this;e.showModal({title:"提示",content:"是否退出登录",success:function(t){t.confirm?(n.getlogout(),e.removeStorage({key:"session_key"}),e.reLaunch({url:"../../login/login"})):t.cancel&&console.log("用户点击取消")}})}},onLoad:function(){this.getUserlogin()},onShow:function(){this.getUserlogin(),this.$forceUpdate()}};n.default=u}).call(this,t(2)["default"])},95:function(e,n,t){"use strict";t.r(n);var r=t(96),o=t.n(r);for(var i in r)["default"].indexOf(i)<0&&function(e){t.d(n,e,(function(){return r[e]}))}(i);n["default"]=o.a},96:function(e,n,t){}},[[89,"common/runtime","common/vendor"]]]);
  2. //# sourceMappingURL=../../../../.sourcemap/mp-weixin/pages/my/index/index.js.map