(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/index/index"],{"2dfd":function(t,e,n){},5700:function(t,e,n){"use strict";n.r(e);var o=n("99fd"),i=n.n(o);for(var a in o)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return o[t]}))}(a);e["default"]=i.a},"7a81":function(t,e,n){"use strict";(function(t,e){var o=n("4ea4");n("59a4");o(n("66fd"));var i=o(n("bbf4"));t.__webpack_require_UNI_MP_PLUGIN__=n,e(i.default)}).call(this,n("bc2e")["default"],n("543d")["createPage"])},"99fd":function(t,e,n){"use strict";(function(t,o){var i=n("4ea4");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n("9523")),s=i(n("5c3b")),c=(i(n("50f8")),n("3c98")),r=n("5679"),u=n("401c"),d=n("26cb"),l=n("f8b7"),h=n("3e4f"),g=n("8e8a"),f=n("865e");function p(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function m(t){for(var e=1;e0?t.setTabBarBadge({index:3,text:this.cartNum>99?"99+":this.cartNum+""}):t.hideTabBarRedDot({index:3}),t.removeStorageSync("form_type_cart"),this.isLogin&&this.getCoupon(),this.getdiyProduct()},onReady:function(){},methods:m(m({},(0,d.mapMutations)(["SET_AUTOPLAY"])),{},{getdiyProduct:function(){var e=this;(0,l.diyProduct)().then((function(n){t.setStorageSync("diyProduct",JSON.stringify(n.data.product_detail)),t.setStorageSync("product_video_status",JSON.stringify(n.data.product_video_status)),e.$eventHub.$emit("product_video_status",n.data.product_video_status),e.product_video_status=n.data.product_video_status}))},getCopyRight:function(){var e=this;(0,c.copyRight)().then((function(n){var o=n.data;t.setStorageSync("wechatStatus",o.wechat_status),e.site_config=o.record_No,o.copyrightContext||o.copyrightImage||(o.copyrightImage="/static/images/support.png"),t.setStorageSync("copyNameInfo",o.copyrightContext),t.setStorageSync("copyImageInfo",o.copyrightImage),t.setStorageSync("MPSiteData",JSON.stringify({site_logo:o.site_logo,site_name:o.site_name}))})).catch((function(t){return e.$util.Tips({title:t.msg})}))},getOptions:function(t){if(t.scene){var e=this.$util.getUrlParams(decodeURIComponent(t.scene));e.spid&&(v.globalData.spid=e.spid)}t.spid&&(v.globalData.spid=t.spid)},reconnect:function(){var t=this;this.diyData(),this.getIndexData(),(0,r.getShare)().then((function(e){t.shareInfo=e.data}))},goICP:function(){t.navigateTo({url:"/pages/annex/web_view/index?url=https://beian.miit.gov.cn/"})},bindHeighta:function(t){},bindHeight:function(e){t.hideLoading(),this.domOffsetTop=e.top},goGoodsDetail:function(e){(0,h.goShopDetail)(e,this.uid).then((function(n){t.navigateTo({url:"/pages/goods_details/index?id=".concat(e.id)})}))},get_host_product:function(){var t=this;t.hotScroll||(0,l.getProductHot)(t.hotPage,t.hotLimit).then((function(e){t.hotPage++,t.hotScroll=e.data.length0?(this.sortAll.forEach((function(n,o){n.id==t&&(e.$set(e,"sortList",n),e.sid=n.children.length?n.children[0].id:"")})),this.goodList=[],this.goodPage=1,this.$nextTick((function(){""!=e.sortList&&e.getGoodsList()}))):(0,l.getCategoryList)().then((function(n){e.sortAll=n.data,n.data.forEach((function(n,o){n.id==t&&(e.sortList=n,e.sid=n.children.length?n.children[0].id:"")})),e.goodList=[],e.goodPage=1,e.$nextTick((function(){""!=e.sortList&&e.getGoodsList()}))}))},getGoodsList:function(){var t=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(e){t.loading=!1,t.loaded=e.data.length<10,t.goodPage++,t.goodList=t.goodList.concat(e.data)})))},getNewCoupon:function(){var e=this,n=t.getStorageSync("oldUser")||0;n||(0,c.getCouponNewUser)().then((function(n){var o=n.data;o.show?o.list.length&&(e.isCouponShow=!0,e.couponObj=o,t.setStorageSync("oldUser",1)):t.setStorageSync("oldUser",1)}))},getCoupon:function(){var e=this,n=t.getStorageSync("tagDate")||"",o=(new Date).toLocaleDateString();n===o?this.getNewCoupon():(0,c.getCouponV2)().then((function(n){var o=n.data;o.list.length?(e.isCouponShow=!0,e.couponObj=o,t.setStorageSync("tagDate",(new Date).toLocaleDateString())):e.getNewCoupon()}))},couponClose:function(){this.isCouponShow=!1,t.getStorageSync("oldUser")||this.getNewCoupon()},getTemlIds:function(){var t=o.getStorageSync(u.SUBSCRIBE_MESSAGE);t||(0,c.getTemlIds)().then((function(t){t.data&&o.setStorageSync(u.SUBSCRIBE_MESSAGE,JSON.stringify(t.data))}))},objToArr:function(t){var e=Object.keys(t),n=e.map((function(e){return t[e]}));return n},setDiyData:function(e){var n=this;this.errorNetwork=!1,e.is_bg_color&&(this.bgColor=e.color_picker),e.is_bg_pic&&(this.bgPic=e.bg_pic,this.bgTabVal=e.bg_tab_val),this.pageShow=e.is_show,t.setNavigationBarTitle({title:e.title});var o=[],i=this.objToArr(e.value);i.forEach((function(t,e,i){"headerSerch"==t.name&&(n.isHeaderSerch=!0),"pageFoot"==t.name&&i.splice(e,1),t.name,o=i})),o.sort((function(t,e){return t.timestamp-e.timestamp})),this.styleConfig=o,this.showSkeleton=!1},getDiyData:function(){var e=this;(0,c.getDiy)(0).then((function(n){t.setStorageSync("diyData",JSON.stringify(n.data)),e.setDiyData(n.data)})).catch((function(t){}))},diyData:function(){var e=this,n=t.getStorageSync("diyData");n?(0,c.getDiyVersion)(0).then((function(o){var i=t.getStorageSync("diyVersion");o.data.version+"0"===i?e.setDiyData(JSON.parse(n)):(t.setStorageSync("diyVersion",o.data.version+"0"),e.getDiyData())})):this.getDiyData()},getIndexData:function(){},changeBarg:function(e){this.isLogin?t.navigateTo({url:"/pages/activity/goods_bargain_details/index?id=".concat(e.id,"&spid=").concat(this.$store.state.app.uid)}):(0,g.toLogin)()},goDetail:function(e){(0,h.goShopDetail)(e,this.$store.state.app.uid).then((function(n){t.navigateTo({url:"/pages/goods_details/index?id=".concat(e.id)})}))}}),onReachBottom:function(){0==this.isSortType||this.getGoodsList()},onPageScroll:function(t){t.scrollTop>10?this.isScrolled=!0:this.isScrolled=!1},onShareAppMessage:function(){var t=this.uid?this.uid:0;return{title:this.shareInfo.title,path:"/pages/index/index?spid="+t,imageUrl:this.shareInfo.img,desc:this.shareInfo.synopsis}},onShareTimeline:function(){return{title:this.shareInfo.title,path:"/pages/index/index",imageUrl:this.shareInfo.img,desc:this.shareInfo.synopsis}}};e.default=b}).call(this,n("543d")["default"],n("bc2e")["default"])},b2c0:function(t,e,n){"use strict";n.d(e,"b",(function(){return o})),n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){}));var o=function(){var t=this,e=t.$createElement,n=(t._self._c,t.pageShow&&!t.errorNetwork&&1==t.isSortType?t.sortList.children&&t.sortList.children.length:null),o=t.pageShow&&!t.errorNetwork&&1==t.isSortType?t.goodList.length:null,i=t.pageShow&&!t.errorNetwork&&1==t.isSortType?0==t.goodList.length&&t.loaded:null;t.$mp.data=Object.assign({},{$root:{g0:n,g1:o,g2:i}})},i=[]},bbf4:function(t,e,n){"use strict";n.r(e);var o=n("b2c0"),i=n("5700");for(var a in i)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(a);n("ed71");var s=n("f0c5"),c=Object(s["a"])(i["default"],o["b"],o["c"],!1,null,null,null,!1,o["a"],void 0);e["default"]=c.exports},ed71:function(t,e,n){"use strict";var o=n("2dfd"),i=n.n(o);i.a}},[["7a81","common/runtime","common/vendor"]]]);