(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/index/index"],{71:function(e,n,t){"use strict";(function(e,n){var o=t(4);t(26);o(t(25));var r=o(t(72));e.__webpack_require_UNI_MP_PLUGIN__=t,n(r.default)}).call(this,t(1)["default"],t(2)["createPage"])},72:function(e,n,t){"use strict";t.r(n);var o=t(73),r=t(75);for(var c in r)["default"].indexOf(c)<0&&function(e){t.d(n,e,(function(){return r[e]}))}(c);var i,a=t(36),s=Object(a["default"])(r["default"],o["render"],o["staticRenderFns"],!1,null,"57280228",null,!1,o["components"],i);s.options.__file="pages/index/index.vue",n["default"]=s.exports},73:function(e,n,t){"use strict";t.r(n);var o=t(74);t.d(n,"render",(function(){return o["render"]})),t.d(n,"staticRenderFns",(function(){return o["staticRenderFns"]})),t.d(n,"recyclableRender",(function(){return o["recyclableRender"]})),t.d(n,"components",(function(){return o["components"]}))},74:function(e,n,t){"use strict";var o;t.r(n),t.d(n,"render",(function(){return r})),t.d(n,"staticRenderFns",(function(){return i})),t.d(n,"recyclableRender",(function(){return c})),t.d(n,"components",(function(){return o}));try{o={tnTabbar:function(){return t.e("tuniao-ui/components/tn-tabbar/tn-tabbar").then(t.bind(null,187))}}}catch(a){if(-1===a.message.indexOf("Cannot find module")||-1===a.message.indexOf(".vue"))throw a;console.error(a.message),console.error("1. 排查组件名称拼写是否正确"),console.error("2. 排查组件是否符合 easycom 规范，文档：https://uniapp.dcloud.net.cn/collocation/pages?id=easycom"),console.error("3. 若组件不符合 easycom 规范，需手动引入，并在 components 中注册该组件")}var r=function(){var e=this,n=e.$createElement;e._self._c},c=!1,i=[];r._withStripped=!0},75:function(e,n,t){"use strict";t.r(n);var o=t(76),r=t.n(o);for(var c in o)["default"].indexOf(c)<0&&function(e){t.d(n,e,(function(){return o[e]}))}(c);n["default"]=r.a},76:function(e,n,t){"use strict";(function(e,o){var r=t(4);Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var c=r(t(58)),i=function(){t.e("pages/home/home").then(function(){return resolve(t(194))}.bind(null,t)).catch(t.oe)},a=function(){t.e("pages/comm/comm").then(function(){return resolve(t(201))}.bind(null,t)).catch(t.oe)},s=function(){t.e("pages/discovery/discovery").then(function(){return resolve(t(208))}.bind(null,t)).catch(t.oe)},u=function(){t.e("pages/mine/mine").then(function(){return resolve(t(213))}.bind(null,t)).catch(t.oe)},l={components:{Home:i,Comm:a,Discovery:s,Mine:u},data:function(){return{tabbarList:[{title:"我要什么",activeIcon:"home-smile-fill",inactiveIcon:"home-smile"},{title:"我有什么",activeIcon:"shop-fill",inactiveIcon:"shop"},{title:"供需发布平台",activeIcon:"add-fill",inactiveIcon:"add-circle"},{title:"我的",activeIcon:"my-fill",inactiveIcon:"my"}],currentIndex:0,tabberPageLoadFlag:[]}},onLoad:function(e){var n=Number(e.index||0);this.tabberPageLoadFlag=this.tabbarList.map((function(e,t){return n===t})),this.switchTabbar(n)},onShow:function(){3===this.currentIndex&&this.$refs.mine&&this.$refs.mine.getContentRectInfo(),1===this.currentIndex&&this.$refs.comm&&this.$refs.comm.fetchData()},methods:{switchTabbar:function(e){var n,t;(this._switchTabbarPage(e),1!==e)&&(null===(n=this.$refs)||void 0===n||null===(t=n.commRef)||void 0===t||t.stopAllVideo())},getOpenId:function(n){c.default.post("/wxma/code2Session",{code:n,platType:"slb",mpType:"engineer"}).then((function(n){console.error(n),n.success&&e.setStorageSync("userMap",JSON.stringify(n.resultMap))}))},loginByCode:function(n){var t=this;e.setStorageSync("loginStatus","false"),o.getUserInfo({success:function(o){console.error(o),c.default.post("/slbMpAutoLogin",{code:n,appType:"ma",encryptedData:o.encryptedData,iv:o.iv},{login:!1,warn:!1,loading:!1}).then((function(n){console.error(n),n.success?(e.setStorageSync("loginStatus","true"),e.setStorageSync("userMap",JSON.stringify(n.resultMap)),e.setStorageSync("userNo",n.resultMap.accountName)):(console.error(12345),e.setStorageSync("loginStatus","false"),e.login({success:function(e){console.error(e),t.getOpenId(e.code)},fail:function(n){console.error(n),e.hideLoading()}})),console.error(n)}))}})},tabbarPageScrollLower:function(e){0===this.currentIndex&&this.$refs.home.loadMore(),1===this.currentIndex&&this.$refs.comm.loadMore(),2===this.currentIndex&&this.$refs.discovery.getRandomData&&this.$refs.discovery.getRandomData()},_switchTabbarPage:function(e){var n=this.tabberPageLoadFlag[e];void 0!==n&&(!1===n&&(this.tabberPageLoadFlag[e]=!0),this.currentIndex=e)}}};n.default=l}).call(this,t(2)["default"],t(1)["default"])}},[[71,"common/runtime","common/vendor"]]]);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/index/index.js.map