diff --git a/components/diy_goodsGroup/diy_goodsGroup.js b/components/diy_goodsGroup/diy_goodsGroup.js index f6748d4..f40fad6 100644 --- a/components/diy_goodsGroup/diy_goodsGroup.js +++ b/components/diy_goodsGroup/diy_goodsGroup.js @@ -9,7 +9,7 @@ var regeneratorRuntime = require('../../utils/runtime.js'); var g_filter = require('./filter'); Component({ - properties: { + properties: { // 这里定义了innerText属性,属性值可以在组件使用时指定 object: { type: Object, @@ -62,6 +62,7 @@ Component({ is_get:0, is_retail_price:0, //是否显示零售价 + swiperHeight:0 // action_index:0, //选中的tab项 }, @@ -606,9 +607,21 @@ Component({ }); } } - + if (th.data.object.style==6) { + th.setSwiper_h() + } }, - + setSwiper_h(){ + var th=this + wx.createSelectorQuery().in(this).select('.swiper_h').boundingClientRect(rect => { + if (rect && rect.height) { + var sumHeigth=(rect.height+13)+'px' + th.setData({ + swiperHeight: sumHeigth + }) + } + }).exec(); + }, re_show: function () { if (this.data.object.goodscount * this.data.page < this.data.total) { this.setLoading()