diff --git a/components/diy_seckill/diy_seckill.js b/components/diy_seckill/diy_seckill.js index 04888f7..aa2d5ab 100644 --- a/components/diy_seckill/diy_seckill.js +++ b/components/diy_seckill/diy_seckill.js @@ -35,7 +35,9 @@ Component({ ylp_img: "https://mshopimg.yolipai.net/", imghost: os.imghost, timer: null, - user_id:0 + user_id:0, + img_width:100, + img_height:100 }, pageLifetimes: { @@ -45,7 +47,7 @@ Component({ var th = this; var g_id = this.data.object; //只有再会员登陆之后,才重新调用接口 - + console.log('秒杀组件------------'); if(this.data.user_id!=getApp().globalData.user_id){ this.data.user_id=getApp().globalData.user_id this.init(g_id); @@ -67,6 +69,7 @@ Component({ ready: function () { var g_id = this.data.object; + this.init(g_id); this.data.user_id=getApp().globalData.user_id; }, @@ -79,7 +82,7 @@ Component({ customMethod: function () { }, init: function (g_id) { var th = this; - + this.loadImg(g_id) getApp().getConfig2(function (e) { var swithc_list = e.switch_list; var sw_arr = JSON.parse(swithc_list); @@ -209,7 +212,10 @@ Component({ for (var i = 0; i < all_array.length; i += 3) { arr.push(all_array.slice(i, i + 3)); } - /*--熏染到前台--*/ + /*--熏染到前台--*/ + console.log('秒杀数据:'); + console.log(arr); + console.error('....................'); th.setData({ goods_array: arr }); }); @@ -285,7 +291,28 @@ Component({ wx.navigateTo({ url: "/pages/activity/seckill_list/seckill_list" }); + }, + 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) { + case 1: + w=`width:calc(100%-${g_id.page_margins*2}px);height:calc(100%-${g_id.page_margins*2}px)` + break; + + default: + break; + } + + + + } } + }, diff --git a/components/diy_seckill/diy_seckill.wxml b/components/diy_seckill/diy_seckill.wxml index e3820d0..7e47ebf 100644 --- a/components/diy_seckill/diy_seckill.wxml +++ b/components/diy_seckill/diy_seckill.wxml @@ -1,156 +1,185 @@ - - - - - 秒杀 + + + + + + {{object.column_name}} + + + + - - + + + + + + + + + + + + + + + 距结束时间 + {{aitem.djs.day}}天{{aitem.djs.hou}}:{{aitem.djs.min}}:{{aitem.djs.sec}} + + + {{aitem.goods_name}} + + + + {{aitem.price}} + ¥{{aitem.market_price}} + + + 已秒 10件, + 还剩余20 + + + + + {{object.button_content}} + + + + + + + + + + + + + + 秒杀 + + + + - + + + + + + + + + + + + + 即将开始 + + + + + 火热进行 + + + + + 已抢光 + + + + + 活动已结束 + + + + - - - - - - - - - - - - - 即将开始 + + + + - - - - - - - - 火热进行 - - - - - 已抢光 - - - - - 活动已结束 - - - - - + + {{aitem.djs.day}}天 + {{aitem.djs.hou}}时 + {{aitem.djs.min}}分 + {{aitem.djs.sec}}秒 + + - - - - {{aitem.djs.day}}天 - {{aitem.djs.hou}}时 - {{aitem.djs.min}}分 - {{aitem.djs.sec}}秒 + + {{aitem.goods_name}} + ¥{{aitem.price}} + ¥{{aitem.market_price}} - + + + + + + + + + + + - - {{aitem.goods_name}} - ¥{{aitem.price}} - ¥{{aitem.market_price}} + + - - - - - - + + {{aitem.title}} + + {{aitem.djs.day}} 天 + {{aitem.djs.hou}} : + {{aitem.djs.min}} : + {{aitem.djs.sec}} + + + ¥{{aitem.price}} + + + + + 正在预热 + + + + + + 已结束 + + + + + + 我要抢 + + - - - - - - - - - - + + + 已抢光 + + - - {{aitem.title}} - - {{aitem.djs.day}} 天 - {{aitem.djs.hou}} : - {{aitem.djs.min}} : - {{aitem.djs.sec}} - - ¥{{aitem.price}} - - - - - 正在预热 - - - - - - 已结束 - - - - - - 我要抢 - - - - - - 已抢光 - - - - - - - + + - - - - + + + \ No newline at end of file diff --git a/components/diy_seckill/diy_seckill.wxss b/components/diy_seckill/diy_seckill.wxss index c410259..620bd34 100644 --- a/components/diy_seckill/diy_seckill.wxss +++ b/components/diy_seckill/diy_seckill.wxss @@ -297,4 +297,117 @@ swiper { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; -} \ No newline at end of file +} + + +.new_item1{ + width: 100%; + overflow: hidden; +} +.new_item1_image{ + width: 100%; + /* max-width: 100%; + max-height: 100%; */ +} +.new_item1_time{ + height: 70rpx; + background: rgba(196, 24, 45, 1); + color: #fff; + font-size: 25rpx; + display: flex; + justify-content: space-between; + align-items: center; + padding: 0rpx 30rpx; + +} +.new_item1_time image{ + width: 188rpx; + height: 52rpx; +} +.new_item1_goods_name{ + padding: 10rpx; + font-size: 28rpx; + +} +.new_item1_price{ + display: flex; + padding: 10rpx; + align-items: center; + justify-content: space-between; +} +.clor{ + color: rgba(196, 24, 45, 1); +} +.new_item1_but{ + width: 130rpx; + height: 60rpx; + color: #fff; + background-color: rgba(196,24,45,1); + line-height: 60rpx; + text-align: center; + border-radius: 15rpx; +} +.new_item1_but1{ + border-radius: 50rpx !important; +} +.new_item1_but2{ + border-radius: 50rpx !important; + background-color: rgba(0, 0, 0, 0) !important; + color: rgba(196,24,45,1) !important; + border: 1rpx solid rgba(196,24,45,1) !important; +} +.new_item1_but3{ + background-color: rgba(0, 0, 0, 0) !important; + color: rgba(196,24,45,1) !important; + border: 1rpx solid rgba(196,24,45,1) !important; +} + + + + +.new_item1_box{ + padding-top: 17rpx; + width: 100%; + box-sizing: border-box; + overflow: hidden; +} + +.aborder{ + border: 1px solid #e8e8e8; +} +.bgf{ + background-color: #fff; +} +.boxsha{ + /* box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.25); */ + box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); +} +.but_radius85{ + border-radius:289rpx; +} +.but_radius5{ + border-radius:17px; +} +.imgBox{ + position: relative; +} +.imgBox_img{ + position: absolute; + left: 0; + top: 22rpx; + width: 74rpx; + height: 60rpx; +} + +.aspect_ratio1{ + aspect-ratio:1/1; +} +.aspect_ratio2{ + aspect-ratio:16/9; +} +.aspect_ratio3{ + aspect-ratio:3/2; +} +.aspect_ratio4{ + aspect-ratio:3/4; +}