(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/shopping/index"],{"1ad1":function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=n("f5b2"),c=n("2d6b"),i={data:function(){return{divHeight:"0px",allCates:[],cates:[],subCates:[],statusBarHeight:t.getStorageSync("menuInfo").statusBarHeight,cateSelect:0,advs:[]}},onLoad:function(){t.showShareMenu({withShareTicket:!0,menus:["shareAppMessage","shareTimeline"]}),this.getProductCate()},onShow:function(){var e=this;setTimeout((function(){var n=t.createSelectorQuery().select(".top-content");n.boundingClientRect((function(t){console.log(t.height),e.divHeight="calc(100% - "+t.height+"px)"})).exec()}),500),this.getAdv()},methods:{divHeight:function(){return"height:calc(100% - ${this.top}px);"},toSearch:function(){t.navigateTo({url:"../home/productSearch"})},handleAdvClick:function(e){console.log(e),1==e.showType?(t.setStorageSync("url",e.advUrl),t.navigateTo({url:"../home/h5"})):2==e.showType?t.navigateTo({url:e.advUrl}):3==e.showType&&(t.setStorageSync("content",e.content),t.navigateTo({url:"../home/content"}))},getAdv:function(){var t=this;(0,c.getAdv)({advType:2}).then((function(e){200==e.code&&(t.advs=e.data)}),(function(t){}))},getProductCate:function(){var e=this;(0,a.getProductCate)({}).then((function(n){200==n.code?(e.allCates=n.data,e.cates=e.allCates.filter((function(t){return 0==t.pid})),null!=e.cates&&e.cates.length>0&&(e.cateSelect=e.cates[0].cateId,e.getSubCate())):t.showToast({icon:"none",title:"请求失败"})}),(function(t){}))},choseCate:function(t){this.cateSelect=t.cateId,this.getSubCate()},getSubCate:function(){var t=this;this.subCates=this.allCates.filter((function(e){return e.pid==t.cateSelect})),console.log(this.subCates)},showProductList:function(e){t.navigateTo({url:"./productList?cateId="+e.cateId+"&pid="+e.pid})},goSearch:function(e){null!=e.detail.value&&""!=e.detail.value&&this.utils.addHisSearch(e.detail.value),t.navigateTo({url:"../home/productList?searchValue="+e.detail.value})}}};e.default=i}).call(this,n("df3c")["default"])},"1be2":function(t,e,n){},"1d48":function(t,e,n){"use strict";n.r(e);var a=n("4880"),c=n("68d4");for(var i in c)["default"].indexOf(i)<0&&function(t){n.d(e,t,(function(){return c[t]}))}(i);n("e175");var o=n("828b"),u=Object(o["a"])(c["default"],a["b"],a["c"],!1,null,null,null,!1,a["a"],void 0);e["default"]=u.exports},4880:function(t,e,n){"use strict";n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return c})),n.d(e,"a",(function(){}));var a=function(){var t=this.$createElement;this._self._c},c=[]},"68d4":function(t,e,n){"use strict";n.r(e);var a=n("1ad1"),c=n.n(a);for(var i in a)["default"].indexOf(i)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(i);e["default"]=c.a},e175:function(t,e,n){"use strict";var a=n("1be2"),c=n.n(a);c.a},f2d5:function(t,e,n){"use strict";(function(t,e){var a=n("47a9");n("584a");a(n("3240"));var c=a(n("1d48"));t.__webpack_require_UNI_MP_PLUGIN__=n,e(c.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])}},[["f2d5","common/runtime","common/vendor"]]]);