Showing
7 changed files
with
78 additions
and
13 deletions
@@ -10,7 +10,7 @@ | @@ -10,7 +10,7 @@ | ||
10 | </div> | 10 | </div> |
11 | </div> | 11 | </div> |
12 | 12 | ||
13 | - <div class="out-product-list"> | 13 | + <div class="out-product-list less-than-3"> |
14 | <div class="product-list"> | 14 | <div class="product-list"> |
15 | <div class="product"> | 15 | <div class="product"> |
16 | <a href=""> | 16 | <a href=""> |
@@ -19,12 +19,12 @@ | @@ -19,12 +19,12 @@ | ||
19 | <div class="product-brand">MADNESS</div> | 19 | <div class="product-brand">MADNESS</div> |
20 | </div> | 20 | </div> |
21 | <div class="product-info"> | 21 | <div class="product-info"> |
22 | - <div class="seckill-status" style="background: url()"> | 22 | + <div class="seckill-status status-0"> |
23 | <div class="price"> | 23 | <div class="price"> |
24 | <span class="seckill-price">9元</span> | 24 | <span class="seckill-price">9元</span> |
25 | <span class="market-price">¥199</span> | 25 | <span class="market-price">¥199</span> |
26 | </div> | 26 | </div> |
27 | - <span class="status">立即抢</span> | 27 | + <div class="status-type">立即抢</div> |
28 | </div> | 28 | </div> |
29 | </div> | 29 | </div> |
30 | </a> | 30 | </a> |
@@ -41,7 +41,7 @@ | @@ -41,7 +41,7 @@ | ||
41 | <span class="seckill-price">9元</span> | 41 | <span class="seckill-price">9元</span> |
42 | <span class="market-price">¥199</span> | 42 | <span class="market-price">¥199</span> |
43 | </div> | 43 | </div> |
44 | - <span class="status">立即抢</span> | 44 | + <div class="status-type">立即抢</div> |
45 | </div> | 45 | </div> |
46 | </div> | 46 | </div> |
47 | </a> | 47 | </a> |
@@ -53,17 +53,17 @@ | @@ -53,17 +53,17 @@ | ||
53 | <div class="product-brand">MADNESS</div> | 53 | <div class="product-brand">MADNESS</div> |
54 | </div> | 54 | </div> |
55 | <div class="product-info"> | 55 | <div class="product-info"> |
56 | - <div class="seckill-status" style="background: url()"> | 56 | + <div class="seckill-status status-0"> |
57 | <div class="price"> | 57 | <div class="price"> |
58 | <span class="seckill-price">9元</span> | 58 | <span class="seckill-price">9元</span> |
59 | <span class="market-price">¥199</span> | 59 | <span class="market-price">¥199</span> |
60 | </div> | 60 | </div> |
61 | - <span class="status">立即抢</span> | 61 | + <div class="status-type">立即抢</div> |
62 | </div> | 62 | </div> |
63 | </div> | 63 | </div> |
64 | </a> | 64 | </a> |
65 | </div> | 65 | </div> |
66 | - <div class="product"> | 66 | + {{!-- <div class="product"> |
67 | <a href=""> | 67 | <a href=""> |
68 | <div class="img-box"> | 68 | <div class="img-box"> |
69 | <img src="//img13.static.yhbimg.com/goodsimg/2011/07/28/09/02489383d3937a4ee4706ab7f516482e7b.jpg?imageMogr2/thumbnail/160x216/position/center/quality/85/format/webp" alt=""> | 69 | <img src="//img13.static.yhbimg.com/goodsimg/2011/07/28/09/02489383d3937a4ee4706ab7f516482e7b.jpg?imageMogr2/thumbnail/160x216/position/center/quality/85/format/webp" alt=""> |
@@ -75,12 +75,11 @@ | @@ -75,12 +75,11 @@ | ||
75 | <span class="seckill-price">9元</span> | 75 | <span class="seckill-price">9元</span> |
76 | <span class="market-price">¥199</span> | 76 | <span class="market-price">¥199</span> |
77 | </div> | 77 | </div> |
78 | - <span class="status">立即抢</span> | 78 | + <div class="status-type">立即抢</div> |
79 | </div> | 79 | </div> |
80 | </div> | 80 | </div> |
81 | </a> | 81 | </a> |
82 | - </div> | 82 | + </div> --}} |
83 | </div> | 83 | </div> |
84 | </div> | 84 | </div> |
85 | - | ||
86 | </div> | 85 | </div> |
public/img/activity/seckill/seckill-0.png
0 → 100644
![](/fe/yohobuywap-node/raw/3c7bc52a9ee0941f03d60d99e2b13897368d17b1/public/img/activity/seckill/seckill-0.png)
509 Bytes
![](/fe/yohobuywap-node/raw/b3c14099ad7c8ce33d11c0bd26169bb0103ed7f4/public/img/activity/seckill/seckill-3.png)
437 Bytes
@@ -700,6 +700,26 @@ function miniProgramHandleInit() { | @@ -700,6 +700,26 @@ function miniProgramHandleInit() { | ||
700 | } | 700 | } |
701 | } | 701 | } |
702 | 702 | ||
703 | +function loadSeckillList() { | ||
704 | + $.ajax({ | ||
705 | + url: '/product/seckill/list' | ||
706 | + }).done(function(result) { | ||
707 | + console.log(result); | ||
708 | + }).error(function() { | ||
709 | + | ||
710 | + }).always(function() { | ||
711 | + | ||
712 | + }); | ||
713 | +} | ||
714 | + | ||
715 | +function seckillInit() { | ||
716 | + loadSeckillList(); | ||
717 | + | ||
718 | + $(document).on('click', '.seckill-tab .tab-item', function() { | ||
719 | + $(this).addClass('actived').siblings().removeClass('actived'); | ||
720 | + }); | ||
721 | +} | ||
722 | + | ||
703 | $(function() { | 723 | $(function() { |
704 | if ($('.over').length) { | 724 | if ($('.over').length) { |
705 | // 过期/删除 状态的 活动 | 725 | // 过期/删除 状态的 活动 |
@@ -758,6 +778,9 @@ $(function() { | @@ -758,6 +778,9 @@ $(function() { | ||
758 | // 点赞楼层 | 778 | // 点赞楼层 |
759 | likedActivityInit(); | 779 | likedActivityInit(); |
760 | 780 | ||
781 | + // 秒杀 | ||
782 | + seckillInit(); | ||
783 | + | ||
761 | // 小程序相关处理 | 784 | // 小程序相关处理 |
762 | if (!window.WeixinJSBridge || !window.WeixinJSBridge.invoke) { | 785 | if (!window.WeixinJSBridge || !window.WeixinJSBridge.invoke) { |
763 | document.addEventListener('WeixinJSBridgeReady', miniProgramHandleInit, false); | 786 | document.addEventListener('WeixinJSBridgeReady', miniProgramHandleInit, false); |
@@ -5,7 +5,7 @@ | @@ -5,7 +5,7 @@ | ||
5 | width: 100%; | 5 | width: 100%; |
6 | overflow-x: scroll; | 6 | overflow-x: scroll; |
7 | white-space: nowrap; | 7 | white-space: nowrap; |
8 | - height: 48px; | 8 | + height: 58px; |
9 | 9 | ||
10 | .tab-item { | 10 | .tab-item { |
11 | background: #ef8e88; | 11 | background: #ef8e88; |
@@ -47,10 +47,10 @@ | @@ -47,10 +47,10 @@ | ||
47 | .out-product-list { | 47 | .out-product-list { |
48 | height: 248px; | 48 | height: 248px; |
49 | overflow: hidden; | 49 | overflow: hidden; |
50 | + margin-top: 15px; | ||
50 | } | 51 | } |
51 | 52 | ||
52 | .product-list { | 53 | .product-list { |
53 | - margin-top: 15px; | ||
54 | overflow-x: scroll; | 54 | overflow-x: scroll; |
55 | white-space: nowrap; | 55 | white-space: nowrap; |
56 | height: 258px; | 56 | height: 258px; |
@@ -89,11 +89,20 @@ | @@ -89,11 +89,20 @@ | ||
89 | .seckill-status { | 89 | .seckill-status { |
90 | height: 28px; | 90 | height: 28px; |
91 | color: #fff; | 91 | color: #fff; |
92 | + background-size: contain; | ||
93 | + background-repeat: no-repeat; | ||
94 | + padding-left: 7px; | ||
95 | + box-sizing: border-box; | ||
96 | + } | ||
97 | + | ||
98 | + .status-0 { | ||
99 | + background-image: url("img/activity/seckill/seckill-0.png"); | ||
92 | } | 100 | } |
93 | 101 | ||
94 | .price { | 102 | .price { |
95 | - display: inline-block; | ||
96 | font-size: 12px; | 103 | font-size: 12px; |
104 | + float: left; | ||
105 | + width: 50%; | ||
97 | } | 106 | } |
98 | 107 | ||
99 | .market-price { | 108 | .market-price { |
@@ -101,6 +110,40 @@ | @@ -101,6 +110,40 @@ | ||
101 | transform: scale(0.9); | 110 | transform: scale(0.9); |
102 | display: inline-block; | 111 | display: inline-block; |
103 | } | 112 | } |
113 | + | ||
114 | + .status-type { | ||
115 | + width: 50%; | ||
116 | + text-align: center; | ||
117 | + display: inline-block; | ||
118 | + border: none; | ||
119 | + } | ||
120 | + } | ||
121 | + } | ||
122 | + | ||
123 | + .less-than-3 { | ||
124 | + height: 280px; | ||
125 | + | ||
126 | + .product-list { | ||
127 | + height: 280px; | ||
128 | + } | ||
129 | + | ||
130 | + .product { | ||
131 | + width: 192px; | ||
132 | + margin-right: 7px; | ||
133 | + | ||
134 | + &:last-child { | ||
135 | + margin-right: 0; | ||
136 | + } | ||
137 | + | ||
138 | + .img-box { | ||
139 | + width: 192px; | ||
140 | + height: 244px; | ||
141 | + } | ||
142 | + | ||
143 | + .seckill-status { | ||
144 | + height: 36px; | ||
145 | + line-height: 36px; | ||
146 | + } | ||
104 | } | 147 | } |
105 | } | 148 | } |
106 | } | 149 | } |
-
Please register or login to post a comment