You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
8.1 KiB
10 lines
8.1 KiB
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/goods_cate/template/template4"],{"0c3a":function(t,e,i){"use strict";var r=i("9827"),n=i.n(r);n.a},"2d27":function(t,e,i){"use strict";(function(t){var r=i("47a9");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=r(i("7ca3")),a=i("152a"),o=i("ce7e"),s=i("4bab"),c=(i("7ba4"),i("8f59")),u=r(i("8d64"));function l(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,r)}return i}function d(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?l(Object(i),!0).forEach((function(e){(0,n.default)(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):l(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var h=t.getSystemInfoSync().statusBarHeight,g={props:{level:{type:Number,default:2},isFooter:{type:Boolean,default:!1},pdHeight:{type:Number,default:0}},data:function(){return{statusBarHeight:h,showFilterDrawer:!1,navActive:0,categoryList:[],categoryErList:[],threeCateList:[],tempArr:[],loading:!1,loadend:!1,loadTitle:"加载更多",page:1,limit:10,cid:0,sid:0,tid:0,id:0,storeName:"",tabClick:0,attr:{cartAttr:!1,productAttr:[],productSelect:{}},attrValue:"",productValue:[],is_vip:0,cart_num:0,storeInfo:{},selectSku:{},skuArr:[],getHeight:this.$util.getWXStatusHeight()}},mixins:[u.default],components:{baseDrawer:function(){i.e("components/tui-drawer/tui-drawer").then(function(){return resolve(i("01c9"))}.bind(null,i)).catch(i.oe)},productWindow:function(){i.e("components/productWindow/index").then(function(){return resolve(i("3ffb"))}.bind(null,i)).catch(i.oe)},emptyPage:function(){i.e("components/emptyPage").then(function(){return resolve(i("bc18"))}.bind(null,i)).catch(i.oe)},cusPreviewImg:function(){i.e("components/cusPreviewImg/index").then(function(){return resolve(i("2d84"))}.bind(null,i)).catch(i.oe)}},computed:d(d({fixedTop:function(){return t.getSystemInfoSync().statusBarHeight}},(0,c.mapGetters)(["isLogin","uid","cartNum"])),{},{conHeights:function(){var t="".concat(2*this.pdHeight+104,"rpx");return{height:this.isFooter?t:"calc(100% - env(safe-area-inset-bottom))"}},listH:function(){var t="calc(100% - (".concat(this.fixedTop+96,"px + env(safe-area-inset-bottom)))");return{height:t}}}),mounted:function(){this.getAllCategory()},methods:{getCartNum:function(){var t=this;(0,a.getCartCounts)().then((function(e){t.$store.commit("indexData/setCartNum",e.data.count)}))},getAttrs:function(t){var e=this,i=this;(0,o.getAttr)(t,0).then((function(t){for(var r in i.$set(i.attr,"productAttr",t.data.productAttr),i.$set(i,"productValue",t.data.productValue),i.$set(i,"is_vip",t.data.storeInfo.is_vip),i.$set(i,"storeInfo",t.data.storeInfo),i.skuArr=[],t.data.productValue){var n=t.data.productValue[r];i.skuArr.push(n)}i.skuArr.length||(i.skuArr=[{image:e.storeInfo.image,suk:e.storeInfo.store_name,price:e.storeInfo.price}]),e.$set(e,"selectSku",i.skuArr[0]),i.DefaultSelect()}))},showImg:function(t){this.$refs.cusPreviewImg.open(this.selectSku.suk)},changeSwitch:function(t){var e=this,i=this.skuArr[t];this.$set(this,"selectSku",i);var r=i.suk.split(",");r.forEach((function(t,i){e.$set(e.attr.productAttr[i],"index",r[i])})),i&&(this.$set(this.attr.productSelect,"image",i.image),this.$set(this.attr.productSelect,"price",i.price),this.$set(this.attr.productSelect,"stock",i.stock),this.$set(this.attr.productSelect,"unique",i.unique),this.$set(this.attr.productSelect,"cart_num",1),this.$set(this.attr.productSelect,"vip_price",i.vip_price),this.$set(this,"attrValue",i.suk),this.$set(this,"attrTxt","已选择"))},getAllCategory:function(){var t=this,e=this;(0,o.getCategoryList)().then((function(i){if(i.data.length){i.data.map((function(e){t.$set(e,"showMore",!1),e.children&&e.children.length&&e.children.map((function(e){t.$set(e,"showMore",!1)}))}));var r=i.data;e.categoryTitle=r[0].cate_name,e.cid=r[0].id,e.sid=0,e.tid=0,e.navActive=0,e.tabClick=0,e.categoryList=r,e.categoryErList=i.data[0].children?i.data[0].children:[],e.page=1,e.loadend=!1,e.tempArr=[],e.productslist()}}))},productslist:function(){var t=this;t.loadend||t.loading||(t.loading=!0,t.loadTitle="",(0,o.getProductslist)({page:t.page,limit:t.limit,type:1,cid:t.cid,sid:t.sid,tid:t.tid}).then((function(e){var i=e.data,r=i.length<t.limit;t.tempArr=t.$util.SplitArray(i,t.tempArr),t.$set(t,"tempArr",t.tempArr),t.loading=!1,t.loadend=r,t.loadTitle=r?"没有更多内容啦~":"加载更多",t.page=t.page+1})).catch((function(e){t.loading=!1,t.loadTitle="加载更多"})))},tapNav:function(t,e){var i=this.categoryList[t];this.navActive=t,this.categoryTitle=i.cate_name,this.categoryErList=e.children?e.children:[],this.threeCateList=e.children[0].children?e.children[0].children:[],this.tabClick=0,this.tabLeft=0,this.cid=i.id,this.sid=0,this.tid=0},threeCateClick:function(t){this.tid=t.id},twoCateClick:function(t){this.sid=t.id},openShowMore:function(t){t.showMore=!t.showMore},getList:function(){this.page=1,this.loadend=!1,this.tempArr=[],this.productslist(),this.showFilterDrawer=!1,this.isFooter?this.$emit("toggleBar",!0):t.showTabBar()},reset:function(){this.cid=this.categoryList[0].id,this.sid=0,this.tid=0,this.navActive=0,this.categoryErList=this.categoryList[0].children?this.categoryList[0].children:[]},goDetail:function(e){(0,s.goShopDetail)(e,this.uid).catch((function(i){t.navigateTo({url:"/pages/goods_details/index?id=".concat(e.id,"&fromType=1")})}))},goSearch:function(){t.navigateTo({url:"/pages/goods/goods_search/index"})},goCart:function(){t.switchTab({url:"/pages/order_addcart/order_addcart"})},openDrower:function(){this.showFilterDrawer=!0,this.isFooter?this.$emit("toggleBar",!1):t.hideTabBar()},closeDrawer:function(){this.showFilterDrawer=!1,this.isFooter?this.$emit("toggleBar",!0):t.showTabBar()},sliceArr:function(t){return t.slice(0,3)}}};e.default=g}).call(this,i("df3c")["default"])},6628:function(t,e,i){"use strict";i.d(e,"b",(function(){return n})),i.d(e,"c",(function(){return a})),i.d(e,"a",(function(){return r}));var r={easyLoadimage:function(){return i.e("components/easy-loadimage/easy-loadimage").then(i.bind(null,"a9c6"))}},n=function(){var t=this,e=t.$createElement,i=(t._self._c,t.tempArr.length),r=!t.tempArr.length&&!t.loading,n=t.__get_style([t.conHeights]),a=t.__get_style([t.listH]),o=3==t.level?t.__map(t.categoryErList,(function(e,i){var r=t.__get_orig(e),n=e.children&&e.children.length,a=n?e.children&&e.children.length>3:null,o=n?t.sliceArr(e.children):null;return{$orig:r,g2:n,g3:a,l0:o}})):null,s=3!=t.level?t.__map(t.categoryList,(function(e,i){var r=t.__get_orig(e),n=e.children&&e.children.length>3,a=e.children&&e.children.length,o=a?t.sliceArr(e.children):null;return{$orig:r,g4:n,g5:a,l2:o}})):null;t._isMounted||(t.e0=function(e,i){var r=arguments[arguments.length-1].currentTarget.dataset,n=r.eventParams||r["event-params"];i=n.cate;return t.threeCateClick(i)},t.e1=function(e,i){var r=arguments[arguments.length-1].currentTarget.dataset,n=r.eventParams||r["event-params"];i=n.cate;return t.twoCateClick(i)}),t.$mp.data=Object.assign({},{$root:{g0:i,g1:r,s0:n,s1:a,l1:o,l3:s}})},a=[]},"8f35":function(t,e,i){"use strict";i.r(e);var r=i("2d27"),n=i.n(r);for(var a in r)["default"].indexOf(a)<0&&function(t){i.d(e,t,(function(){return r[t]}))}(a);e["default"]=n.a},9827:function(t,e,i){},bbe4:function(t,e,i){"use strict";i.r(e);var r=i("6628"),n=i("8f35");for(var a in n)["default"].indexOf(a)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(a);i("0c3a");var o=i("828b"),s=Object(o["a"])(n["default"],r["b"],r["c"],!1,null,"a0e1f8fa",null,!1,r["a"],void 0);e["default"]=s.exports}}]);
|
|
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
|
|
'pages/goods_cate/template/template4-create-component',
|
|
{
|
|
'pages/goods_cate/template/template4-create-component':(function(module, exports, __webpack_require__){
|
|
__webpack_require__('df3c')['createComponent'](__webpack_require__("bbe4"))
|
|
})
|
|
},
|
|
[['pages/goods_cate/template/template4-create-component']]
|
|
]);
|
|
|