diff --git a/components/diy_seckill/diy_seckill.js b/components/diy_seckill/diy_seckill.js index 761d6b7..950eea8 100644 --- a/components/diy_seckill/diy_seckill.js +++ b/components/diy_seckill/diy_seckill.js @@ -202,7 +202,8 @@ Component({ let item=all_array[i]; if(newTime > item.end_time) { all_array[i].status = 3; - }; + }; + all_array[i].residue=all_array[i].goods_num*1 - all_array[i].buy_num*1 } var arr = new Array(); @@ -220,9 +221,6 @@ Component({ } /*--熏染到前台--*/ - console.log('秒杀数据:'); - console.log(arr); - console.error('....................'); th.setData({ goods_array: arr }); if (th.data.object.style==6) { th.setSwiper_h() @@ -238,8 +236,6 @@ Component({ setSwiper_h(){ var th=this wx.createSelectorQuery().in(this).select('.swiper_h').boundingClientRect(rect => { - console.error('组件高度'); - console.log(rect) if (rect && rect.height) { var sumHeigth=(rect.height+13)+'px' th.setData({ @@ -328,11 +324,11 @@ Component({ url: "/pages/activity/seckill_list/seckill_list" }); }, + //加入购物车 + shoppingCart(){ + console.log('加入购物车'); + }, loadImg(g_id){ - console.log('图片加载------'); - console.error('秒杀组件---------'); - console.error(g_id); - console.log('..................................'); if (g_id.style==1) { let w='' switch (g_id.picture_scale) { diff --git a/components/diy_seckill/diy_seckill.wxml b/components/diy_seckill/diy_seckill.wxml index e259787..07332e5 100644 --- a/components/diy_seckill/diy_seckill.wxml +++ b/components/diy_seckill/diy_seckill.wxml @@ -20,7 +20,7 @@ - + @@ -41,12 +41,12 @@ ¥{{aitem.market_price}} - 已秒 10 - 还剩余20 + 已秒 {{aitem.buy_num}} + 还剩余{{aitem.residue}} - - + + {{object.button_content}} @@ -65,7 +65,7 @@ - + @@ -80,8 +80,8 @@ {{aitem.goods_name}} - 已秒 10 - 还剩余20 + 已秒 {{aitem.buy_num}} + 还剩余{{aitem.residue}} @@ -91,7 +91,7 @@ - + {{object.button_content}} @@ -110,7 +110,7 @@ - + @@ -125,8 +125,8 @@ {{aitem.goods_name}} - 已秒 10 - 20 + 已秒 {{aitem.buy_num}} + {{aitem.residue}} @@ -136,7 +136,7 @@ - + {{object.button_content}} @@ -156,7 +156,7 @@ - + @@ -173,8 +173,8 @@ {{aitem.goods_name}} - 已秒 10 - 20 + 已秒 {{aitem.buy_num}} + {{aitem.residue}} @@ -205,7 +205,7 @@ - + @@ -226,12 +226,12 @@ ¥{{aitem.market_price}} - 已秒 10 - 还剩余20 + 已秒 {{aitem.buy_num}} + 还剩余{{aitem.residue}} - + {{object.button_content}} @@ -243,7 +243,7 @@ - + @@ -258,8 +258,8 @@ {{aitem.goods_name}} - 已秒 10 - 还剩余20 + 已秒 {{aitem.buy_num}} + 还剩余{{aitem.residue}} @@ -269,7 +269,7 @@ - + {{object.button_content}} @@ -281,7 +281,7 @@ - + @@ -296,8 +296,8 @@ {{aitem.goods_name}} - 已秒 10 - 还剩余20 + 已秒 {{aitem.buy_num}} + 还剩余{{aitem.residue}} @@ -307,7 +307,7 @@ - + {{object.button_content}} @@ -328,7 +328,7 @@ - + @@ -343,8 +343,8 @@ {{aitem.goods_name}} - 已秒 10 - 还剩余20 + 已秒 {{aitem.buy_num}} + 还剩余{{aitem.residue}} @@ -354,7 +354,7 @@ - + {{object.button_content}} diff --git a/pages/index/index/index.wxml b/pages/index/index/index.wxml index 6244df8..4d9af6a 100644 --- a/pages/index/index/index.wxml +++ b/pages/index/index/index.wxml @@ -480,7 +480,7 @@ - + diff --git a/pages/template/index.wxml b/pages/template/index.wxml index 0c62bce..7ca759f 100644 --- a/pages/template/index.wxml +++ b/pages/template/index.wxml @@ -38,7 +38,7 @@ - +