(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/merchant/home/index"],{1116:function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n("fa02"),o=n("28e0"),a=n("9366"),c=n("8f59"),s=n("9592"),r=t.getSystemInfoSync().statusBarHeight+"px",d=getApp(),h={computed:(0,c.mapGetters)(["isLogin","uid","globalData","bottomNavigationIsCustom"]),components:{tuiSkeleton:function(){Promise.all([n.e("common/vendor"),n.e("components/base/tui-skeleton")]).then(function(){return resolve(n("caab"))}.bind(null,n)).catch(n.oe)},homeIndex:function(){Promise.all([n.e("common/vendor"),n.e("pages/merchant/home/components/homeIndex")]).then(function(){return resolve(n("7a53"))}.bind(null,n)).catch(n.oe)},couponAndClassify:function(){Promise.all([n.e("common/vendor"),n.e("pages/merchant/components/couponAndClassify/index")]).then(function(){return resolve(n("2fce"))}.bind(null,n)).catch(n.oe)}},data:function(){return{urlDomain:this.$Cache.get("imgHost"),isNoCommodity:!1,isScrolled:!1,showSkeleton:!0,isNodes:0,statusBarHeight:r,navIndex:0,site_name:"",configApi:{},theme:d.globalData.theme,imgHost:"",wxText:"点击添加到我的小程序，微信首页下拉即可访问商城。",isFixed:!0,domOffsetTop:50,domHeight:0,styleConfig:[],diyId:0,homeCombData:{},showHomeComb:!1,showHeaderSerch:!1,headerSerchCombData:{},bgPic:"",bgTabVal:"",windowHeight:0,pageStyle:{},isDefault:1,merchantInfo:{},merId:0,tabs:[{icon:"icon-ic_mall",name:"首页"},{icon:"icon-a-ic_Picturearrangement",name:"分类"},{icon:"icon-ic_coupon",name:"领券"}],tabActive:0}},onLoad:function(e){(e.hasOwnProperty("merId")||e.scene)&&(e.scene?this.merId=this.globalData.merId?this.globalData.merId:0:this.merId=e.merId?parseInt(e.merId):0),(e.hasOwnProperty("id")||e.scene)&&(e.scene?this.diyId=this.globalData.id?this.globalData.id:0:this.diyId=e.id?parseInt(e.id):0),e.sd&&this.$store.commit("Change_Spread",e.sd),this.getMerIndexInfo();var n=this;this.$nextTick((function(){t.getSystemInfo({success:function(t){n.windowHeight=t.windowHeight}})}))},onShareTimeline:function(){return{title:this.merchantInfo.name,imageUrl:this.merchantInfo.avatar,query:"merId=".concat(this.merId,"&sd=").concat(this.uid)}},onShareAppMessage:function(){return{title:this.merchantInfo.name,imageUrl:this.merchantInfo.avatar,path:"/pages/merchant/home/index?merId=".concat(this.merId,"&sd=").concat(this.uid)}},onPageScroll:function(e){var n=this;t.$emit("scroll"),e.scrollTop>this.domOffsetTop&&(this.isScrolled=!0),e.scrollTop<this.domOffsetTop&&this.$nextTick((function(){n.isScrolled=!1}))},methods:{handleCustomer:function(){(0,i.chatConfig)(this.merchantInfo)},getMerIndexInfo:function(){var e=this,n=this;(0,o.getMerIndexInfoApi)(this.merId).then((function(n){e.merchantInfo=n.data,t.setNavigationBarTitle({title:n.data.name}),e.$store.commit("MERCHANTJINFO",n.data),e.skeletonShow=!1})).catch((function(t){n.loading=!1,n.loadTitle="加载更多",e.skeletonShow=!1}))},handleChangetab:function(t){this.tabActive=t},reloadData:function(){this.showSkeleton=!1},shareApi:function(){var e=this;(0,a.getShare)().then((function(n){e.$set(e,"configApi",n.data),e.$set(e,"site_name",n.data.title),t.setNavigationBarTitle({title:e.site_name})}))},setOpenShare:function(t){if(this.$wechat.isWeixin()){var e={desc:t.synopsis,title:t.title,link:location.href,imgUrl:t.img};this.$wechat.wechatEvevt(["updateAppMessageShareData","updateTimelineShareData"],e)}},stopTouchMove:function(){return!0},goDetail:function(t){goProductDetail(t.id,0,"")}},onShow:function(){(0,s.silenceBindingSpread)(this.isLogin,this.globalData.spread)},mounted:function(){var e=this,n=t.createSelectorQuery().in(this);n.select("#home").boundingClientRect(),n.exec((function(t){e.domHeight=t[0].height}))},onReachBottom:function(){}};e.default=h}).call(this,n("df3c")["default"])},"118a":function(t,e,n){"use strict";var i=n("c739"),o=n.n(i);o.a},"151c":function(t,e,n){"use strict";n.r(e);var i=n("cdc9"),o=n("7b19");for(var a in o)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return o[t]}))}(a);n("118a"),n("9802");var c=n("828b"),s=Object(c["a"])(o["default"],i["b"],i["c"],!1,null,"677ab1c3",null,!1,i["a"],void 0);e["default"]=s.exports},"7b19":function(t,e,n){"use strict";n.r(e);var i=n("1116"),o=n.n(i);for(var a in i)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(a);e["default"]=o.a},9802:function(t,e,n){"use strict";var i=n("b11a"),o=n.n(i);o.a},b11a:function(t,e,n){},c739:function(t,e,n){},cdc9:function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){}));var i=function(){var t=this.$createElement;this._self._c},o=[]},dc31:function(t,e,n){"use strict";(function(t,e){var i=n("47a9");n("1d3c");i(n("3240"));var o=i(n("151c"));t.__webpack_require_UNI_MP_PLUGIN__=n,e(o.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])}},[["dc31","common/runtime","common/vendor"]]]);