1 line
7.2 KiB
JavaScript
1 line
7.2 KiB
JavaScript
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/index/index"],{"6a29":function(e,t,n){"use strict";var o=n("c492"),r=n.n(o);r.a},"771f":function(e,t,n){"use strict";n.r(t);var o=n("8af0"),r=n("c0b3");for(var a in r)["default"].indexOf(a)<0&&function(e){n.d(t,e,(function(){return r[e]}))}(a);n("6a29");var i=n("828b"),u=Object(i["a"])(r["default"],o["b"],o["c"],!1,null,null,null,!1,o["a"],void 0);t["default"]=u.exports},"8af0":function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"c",(function(){return a})),n.d(t,"a",(function(){return o}));var o={uSticky:function(){return n.e("components/uview-ui/components/u-sticky/u-sticky").then(n.bind(null,"fb61"))},uNavbar:function(){return n.e("components/uview-ui/components/u-navbar/u-navbar").then(n.bind(null,"816a"))},uIcon:function(){return n.e("components/uview-ui/components/u-icon/u-icon").then(n.bind(null,"8f08"))},uSearch:function(){return n.e("components/uview-ui/components/u-search/u-search").then(n.bind(null,"79b4"))},uTabs:function(){return n.e("components/uview-ui/components/u-tabs/u-tabs").then(n.bind(null,"f427"))},indexHome:function(){return n.e("components/index-home/index-home").then(n.bind(null,"02f8"))},goodsColumn:function(){return Promise.all([n.e("common/vendor"),n.e("components/goods-column/goods-column")]).then(n.bind(null,"ae6e"))},cateHome:function(){return Promise.all([n.e("common/vendor"),n.e("components/cate-home/cate-home")]).then(n.bind(null,"1183"))},privacyPopup:function(){return n.e("components/privacy-popup/privacy-popup").then(n.bind(null,"8561"))},tabbar:function(){return Promise.all([n.e("common/vendor"),n.e("components/tabbar/tabbar")]).then(n.bind(null,"f8dc"))},uNoNetwork:function(){return n.e("components/uview-ui/components/u-no-network/u-no-network").then(n.bind(null,"18a7"))}},r=function(){var e=this.$createElement,t=(this._self._c,this.__get_style([this.headerStyle])),n=this.__get_style([this.headerStyle]),o=this.__get_style([this.positionTop]);this.$mp.data=Object.assign({},{$root:{a0:{use:!1,toTop:{bottom:"300rpx"}},s0:t,s1:n,s2:o}})},a=[]},"98b8":function(e,t,n){"use strict";(function(e,t){var o=n("47a9");n("3712");o(n("3240"));var r=o(n("771f"));e.__webpack_require_UNI_MP_PLUGIN__=n,t(r.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])},c0b3:function(e,t,n){"use strict";n.r(t);var o=n("e114"),r=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"]=r.a},c492:function(e,t,n){},e114:function(e,t,n){"use strict";(function(e,o){var r=n("47a9");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n("7eb4")),i=r(n("af34")),u=r(n("7ca3")),c=r(n("ee10")),s=r(n("cc11")),f=r(n("8462")),l=n("8f59"),d=n("c2cb"),p=n("7a03"),h=n("fcc3");n("0aec");function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach((function(t){(0,u.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}getApp();var b={name:"首页"},g={mixins:[f.default,s.default],data:function(){return{offPrompt:!0,active:0,navBg:0,goodsList:[],homeData:{},navList:[],enable:!0,cateList:[b],showCateList:[],liveLists:[],showPrivacyPopup:!1}},onLoad:function(t){var n=this;return(0,c.default)(a.default.mark((function r(){return a.default.wrap((function(r){while(1)switch(r.prev=r.next){case 0:if(e.getPrivacySetting({success:function(e){console.log(e,"------"),e.needAuthorization&&(n.showPrivacyPopup=!0)},fail:function(e){console.log(e)}}),null===t||void 0===t||!t.refresh){r.next=4;break}return r.next=4,n.getHomeFun();case 4:o.$on("refreshhome",(function(){n.getHomeFun()})),n.getLiveListsFun();case 6:case"end":return r.stop()}}),r)})))()},onUnload:function(){o.$off("refreshhome")},onShow:function(){this.enable=0==this.active,this.getCartNum()},onHide:function(){},onReady:function(){this.offPromptFunc()},methods:m(m(m({},(0,l.mapActions)(["getCartNum","getUser","initLocationFunc"])),(0,l.mapMutations)(["setConfig"])),{},{handleRetry:function(){var e=this;return(0,c.default)(a.default.mark((function t(){var n,o,r;return a.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return console.log("网络重试刷"),t.next=3,(0,p.getConfig)();case 3:n=t.sent,o=n.code,r=n.data,1==o&&(e.setConfig(r),r.is_open_nearby&&e.initLocationFunc()),e.getUser();case 8:case"end":return t.stop()}}),t)})))()},offPromptFunc:function(){var e=this,t=8;this.offPrompt=setInterval((function(){t-=1,t<=0&&e.clearIntervalFunc()}),1e3)},clearIntervalFunc:function(){clearInterval(this.offPrompt),this.offPrompt=!1},getLevelOneListFun:function(){var e=this;return(0,c.default)(a.default.mark((function t(){var n,o,r;return a.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,(0,d.getLevelOneList)();case 2:n=t.sent,o=n.code,r=n.data,1==o&&(e.cateList=[b].concat((0,i.default)(r)),e.showCateList=[]);case 6:case"end":return t.stop()}}),t)})))()},getMenuFun:function(){var e=this;return(0,c.default)(a.default.mark((function t(){var n,o,r;return a.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,(0,d.getMenu)({type:1});case 2:n=t.sent,o=n.code,r=n.data,1==o&&(e.navList=r);case 6:case"end":return t.stop()}}),t)})))()},getHomeFun:function(){var e=this;return(0,c.default)(a.default.mark((function t(){var n,o,r;return a.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,(0,d.getHome)({city_id:e.cityInfo.id});case 2:n=t.sent,o=n.code,r=n.data,1==o&&(e.homeData=r);case 6:case"end":return t.stop()}}),t)})))()},getLiveListsFun:function(){var e=this;return(0,c.default)(a.default.mark((function t(){var n,o,r;return a.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,(0,h.getLiveLists)({page_size:6,page_no:1});case 2:n=t.sent,o=n.code,r=n.data,1==o&&(e.liveLists=r.list);case 6:case"end":return t.stop()}}),t)})))()},changeActive:function(e){this.active=e,this.enable=0==e,this.mescroll.optDown.use=0==e,this.showCateList[e]=!0},downCallback:function(){var e=this;return(0,c.default)(a.default.mark((function t(){return a.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.getLevelOneListFun();case 2:return t.next=4,e.getMenuFun();case 4:return t.next=6,e.getHomeFun();case 6:e.getLiveListsFun(),e.$refs.mescrollItem.getData(),e.mescroll.endSuccess(0,!1);case 9:case"end":return t.stop()}}),t)})))()}}),computed:m(m({},(0,l.mapGetters)(["sysInfo","inviteCode","appConfig","cityInfo"])),{},{navH:function(){return this.sysInfo.navHeight+"px"},positionTop:function(){return{height:"calc(100vh - 100rpx - ".concat(this.cateTop,")")}},cateTop:function(){return this.sysInfo.navHeight+o.upx2px(80)+"px"},headerStyle:function(){var e=this.active,t=this.cateList,n=this.appConfig,o=t[e].bg_image;return 0==e&&(o=n.index_setting.top_bg_image),o?{"background-image":"url(".concat(o,")")}:{}}})};t.default=g}).call(this,n("3223")["default"],n("df3c")["default"])}},[["98b8","common/runtime","common/vendor"]]]); |