(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/shopping/index"],{258:function(t,e,n){"use strict";(function(t,e){var a=n(4);n(26);a(n(25));var c=a(n(259));t.__webpack_require_UNI_MP_PLUGIN__=n,e(c.default)}).call(this,n(1)["default"],n(2)["createPage"])},259:function(t,e,n){"use strict";n.r(e);var a=n(260),c=n(262);for(var o in c)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return c[t]}))}(o);n(265);var i,r=n(34),u=Object(r["default"])(c["default"],a["render"],a["staticRenderFns"],!1,null,null,null,!1,a["components"],i);u.options.__file="pages/shopping/index.vue",e["default"]=u.exports},260:function(t,e,n){"use strict";n.r(e);var a=n(261);n.d(e,"render",(function(){return a["render"]})),n.d(e,"staticRenderFns",(function(){return a["staticRenderFns"]})),n.d(e,"recyclableRender",(function(){return a["recyclableRender"]})),n.d(e,"components",(function(){return a["components"]}))},261:function(t,e,n){"use strict";var a;n.r(e),n.d(e,"render",(function(){return c})),n.d(e,"staticRenderFns",(function(){return i})),n.d(e,"recyclableRender",(function(){return o})),n.d(e,"components",(function(){return a}));var c=function(){var t=this,e=t.$createElement;t._self._c},o=!1,i=[];c._withStripped=!0},262:function(t,e,n){"use strict";n.r(e);var a=n(263),c=n.n(a);for(var o in a)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(o);e["default"]=c.a},263:function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=n(229),c=n(264),o={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()},onShareAppMessage:function(t){return{title:"丝路佳选",path:"/pages/common/launch",imageUrl:"https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20250814/3687aa8663c7479d9d75c2d203cbaa72.jpg"}},onShareTimeline:function(t){return{title:"丝路佳选",query:"",imageUrl:"https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20250814/3687aa8663c7479d9d75c2d203cbaa72.jpg"}},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,e={advType:2};(0,c.getAdv)(e).then((function(e){200==e.code&&(t.advs=e.data)}),(function(t){}))},getProductCate:function(){var e=this,n={};(0,a.getProductCate)(n).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=o}).call(this,n(2)["default"])},265:function(t,e,n){"use strict";n.r(e);var a=n(266),c=n.n(a);for(var o in a)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(o);e["default"]=c.a},266:function(t,e,n){}},[[258,"common/runtime","common/vendor"]]]); //# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/shopping/index.js.map