(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/index/index"],{3963:function(e,t,n){"use strict";n.r(t);var o=n("9d7f"),i=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"]=i.a},"5f1e":function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return i})),n.d(t,"a",(function(){}));var o=function(){var e=this,t=e.$createElement,n=(e._self._c,e.pageShow?e.__get_style([e.pageStyle]):null),o=e.pageShow&&!e.errorNetwork?e.sortList.children&&e.sortList.children.length:null,i=e.pageShow&&!e.errorNetwork&&o?e.sortList.children&&e.sortList.children.length:null,a=e.pageShow&&!e.errorNetwork&&o?0==e.goodList.length&&e.loaded:null,s=e.pageShow&&!e.errorNetwork&&e.isFooter?e.__get_style([e.pdHeights]):null;e.$mp.data=Object.assign({},{$root:{s0:n,g0:o,g1:i,g2:a,s1:s}})},i=[]},"90bc":function(e,t,n){"use strict";n.r(t);var o=n("5f1e"),i=n("3963");for(var a in i)["default"].indexOf(a)<0&&function(e){n.d(t,e,(function(){return i[e]}))}(a);n("ba5d");var s=n("828b"),c=Object(s["a"])(i["default"],o["b"],o["c"],!1,null,null,null,!1,o["a"],void 0);t["default"]=c.exports},"956f":function(e,t,n){"use strict";(function(e,t){var o=n("47a9");n("7561");o(n("3240"));var i=o(n("90bc"));e.__webpack_require_UNI_MP_PLUGIN__=n,t(i.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])},"9d7f":function(e,t,n){"use strict";(function(e,o){var i=n("47a9");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n("7ca3")),s=i(n("cef6")),c=(i(n("b1bb")),n("a230")),r=n("6975"),u=n("93e7"),d=n("8f59"),l=n("ce7e"),h=n("4bab"),g=n("7ba4"),f=n("bad7");function p(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;t0?e.setTabBarBadge({index:3,text:this.cartNum>99?"99+":this.cartNum+""}):e.hideTabBarRedDot({index:3}),e.removeStorageSync("form_type_cart"),this.isLogin&&this.getCoupon()},onReady:function(){},methods:m(m({},(0,d.mapMutations)(["SET_AUTOPLAY"])),{},{getCopyRight:function(){var t=this;(0,c.copyRight)().then((function(n){var o=n.data;e.setStorageSync("wechatStatus",o.wechat_status),t.site_config=o.record_No,o.copyrightContext||o.copyrightImage||(o.copyrightImage="/static/images/support.png"),e.setStorageSync("copyNameInfo",o.copyrightContext),e.setStorageSync("copyImageInfo",o.copyrightImage),e.setStorageSync("MPSiteData",JSON.stringify({site_logo:o.site_logo,site_name:o.site_name}))})).catch((function(e){return t.$util.Tips({title:e.msg})}))},getOptions:function(e){if(e.scene){var t=this.$util.getUrlParams(decodeURIComponent(e.scene));t.spid&&(b.globalData.spid=t.spid)}e.spid&&(b.globalData.spid=e.spid)},reconnect:function(){var e=this;this.diyData(),(0,r.getShare)().then((function(t){e.shareInfo=t.data}))},goICP:function(){e.navigateTo({url:"/pages/annex/web_view/index?url=https://beian.miit.gov.cn/"})},bindHeighta:function(e){},bindHeight:function(t){e.hideLoading(),this.domOffsetTop=t.top},goGoodsDetail:function(t){(0,h.goShopDetail)(t,this.uid).catch((function(n){e.navigateTo({url:"/pages/goods_details/index?id=".concat(t.id)})}))},changeSort:function(e,t){this.curSort!=t&&(this.curSort=t,this.sid=e.id,this.goodList=[],this.goodPage=1,this.loaded=!1,this.getGoodsList())},bindSortId:function(e){this.styleConfig=[],1==e.type?this.getProductList(e.classPage):(this.sortList=[],this.getMicroPage(e.microPage,!0))},getMicroPage:function(t,n){var o=this,i=this;i.styleConfig=[],e.showLoading({title:"加载中..."}),(0,c.getDiy)(t).then((function(t){e.hideLoading();t.data;var n=i.objToArr(t.data.value);n=n.filter((function(e){return!e.isHide})),n.forEach((function(e,t){["headerSerch","homeComb"].includes(e.name)&&n.splice(t,1)})),o.styleConfig=n})).catch((function(e){return i.$util.Tips({title:e})}))},getProductList:function(e){var t=this;this.curSort=0,this.loaded=!1,this.sortAll.length>0?(this.sortAll.forEach((function(n,o){n.id==e&&(t.$set(t,"sortList",n),t.sid=n.children.length?n.children[0].id:"")})),this.goodList=[],this.goodPage=1,this.$nextTick((function(){""!=t.sortList&&t.getGoodsList()}))):(0,l.getCategoryList)().then((function(n){t.sortAll=n.data,n.data.forEach((function(n,o){n.id==e&&(t.sortList=n,t.sid=n.children.length?n.children[0].id:"")})),t.goodList=[],t.goodPage=1,t.$nextTick((function(){""!=t.sortList&&t.getGoodsList()}))}))},getGoodsList:function(){var e=this;this.loading||this.loaded||(this.loading=!0,(0,l.getProductslist)({sid:this.sid,keyword:"",priceOrder:"",salesOrder:"",news:0,page:this.goodPage,limit:10,cid:this.sortList.id}).then((function(t){e.loading=!1,e.loaded=t.data.length<10,e.goodPage++,e.goodList=e.goodList.concat(t.data)})))},getNewCoupon:function(){var t=this,n=e.getStorageSync("oldUser")||0;n||(0,c.getCouponNewUser)().then((function(n){var o=n.data;o.show?o.list.length&&(t.isCouponShow=!0,t.couponObj=o,e.setStorageSync("oldUser",1)):e.setStorageSync("oldUser",1)}))},getCoupon:function(){var t=this,n=e.getStorageSync("tagDate")||"",o=(new Date).toLocaleDateString();n===o?this.getNewCoupon():(0,c.getCouponV2)().then((function(n){var o=n.data;o.list.length?(t.isCouponShow=!0,t.couponObj=o,e.setStorageSync("tagDate",(new Date).toLocaleDateString())):t.getNewCoupon()}))},couponClose:function(){this.isCouponShow=!1,e.getStorageSync("oldUser")||this.getNewCoupon()},onLoadFun:function(){this.isShowAuth=!1},getTemlIds:function(){var e=o.getStorageSync(u.SUBSCRIBE_MESSAGE);e||(0,c.getTemlIds)().then((function(e){e.data&&o.setStorageSync(u.SUBSCRIBE_MESSAGE,JSON.stringify(e.data))}))},objToArr:function(e){var t=Object.keys(e).sort(),n=t.map((function(t){return e[t]}));return n},setDiyData:function(t){var n=this;this.errorNetwork=!1,t.is_bg_color&&(this.bgColor=t.color_picker),t.is_bg_pic&&(this.bgPic=t.bg_pic,this.bgTabVal=t.bg_tab_val),this.pageShow=t.is_show,e.setNavigationBarTitle({title:t.title});var o=[],i=this.objToArr(t.value);i.forEach((function(t,i,a){"homeComb"!==t.name||t.isHide||(n.showHomeComb=!0,n.homeCombData=t,t.searchConfig.tabVal&&(n.positionTop=e.getSystemInfoSync().statusBarHeight+43)),"headerSerch"!=t.name||t.isHide||(n.isHeaderSerch=!0,n.headerSerchCombData=t),"tabNav"!=t.name||t.isHide||(n.showCateNav=!0,n.cateNavData=t),t.isHide||o.push(t)})),o.sort((function(e,t){return e.timestamp-t.timestamp})),this.styleConfig=o},getDiyData:function(){var t=this;(0,c.getDiy)(0).then((function(n){e.setStorageSync("diyData",JSON.stringify(n.data)),t.setDiyData(n.data)})).catch((function(e){}))},diyData:function(){var t=this,n=e.getStorageSync("diyData");n?(0,c.getDiyVersion)(0).then((function(o){var i=e.getStorageSync("diyVersion");o.data.version+"0"===i?t.setDiyData(JSON.parse(n)):(e.setStorageSync("diyVersion",o.data.version+"0"),t.getDiyData())})):this.getDiyData()},changeLogin:function(){this.getIsLogin()},getIsLogin:function(){(0,g.toLogin)()},changeBarg:function(t){this.isLogin?e.navigateTo({url:"/pages/activity/goods_bargain_details/index?id=".concat(t.id,"&spid=").concat(this.$store.state.app.uid)}):this.getIsLogin()},goDetail:function(t){(0,h.goShopDetail)(t,this.$store.state.app.uid).catch((function(n){e.navigateTo({url:"/pages/goods_details/index?id=".concat(t.id)})}))},newDataStatus:function(e,t){this.isFooter=!!e,this.pdHeight=t}}),onReachBottom:function(){this.getGoodsList()},onPageScroll:function(t){t.scrollTop>10?this.isScrolled=!0:this.isScrolled=!1,e.$emit("scroll"),e.$emit("onPageScroll",t.scrollTop)},onShareAppMessage:function(){var e=this.uid?this.uid:0;return this.shareInfo.img?{title:this.shareInfo.title,path:"/pages/index/index?spid="+e,imageUrl:this.shareInfo.img,desc:this.shareInfo.synopsis}:{title:this.shareInfo.title,path:"/pages/index/index?spid="+e}},onShareTimeline:function(){return{title:this.shareInfo.title,path:"/pages/index/index",imageUrl:this.shareInfo.img,desc:this.shareInfo.synopsis}}};t.default=v}).call(this,n("df3c")["default"],n("3223")["default"])},ba5d:function(e,t,n){"use strict";var o=n("eb72"),i=n.n(o);i.a},eb72:function(e,t,n){}},[["956f","common/runtime","common/vendor"]]]);