Showing
8 changed files
with
49 additions
and
47 deletions
@@ -2,7 +2,8 @@ | @@ -2,7 +2,8 @@ | ||
2 | {{#if fontColor}}color:{{fontColor}};{{/if}} | 2 | {{#if fontColor}}color:{{fontColor}};{{/if}} |
3 | {{#if lineHeight}}line-height:{{lineHeight}};{{/if}} | 3 | {{#if lineHeight}}line-height:{{lineHeight}};{{/if}} |
4 | {{#if fontSize}}font-size:{{fontSize}};{{/if}} | 4 | {{#if fontSize}}font-size:{{fontSize}};{{/if}} |
5 | - font-weight:{{bold}};"> | 5 | + {{#if alignType}}text-align:{{alignType}};{{/if}} |
6 | + font-weight:{{bold}};{{#isEqualOr alignType 'left'}}text-indent: 2em;{{/isEqualOr}}"> | ||
6 | {{# contentEdit}} | 7 | {{# contentEdit}} |
7 | <p style="{{#if ../contentSpace}}margin-bottom:{{../contentSpace}};{{/if}}">{{.}}</p> | 8 | <p style="{{#if ../contentSpace}}margin-bottom:{{../contentSpace}};{{/if}}">{{.}}</p> |
8 | {{/ contentEdit}} | 9 | {{/ contentEdit}} |
1 | {{# list}} | 1 | {{# list}} |
2 | <div class="product"> | 2 | <div class="product"> |
3 | - <a href=""> | 3 | + <a href="/product/seckill/show_{{{productSkn}}}.html"> |
4 | <div class="img-box"> | 4 | <div class="img-box"> |
5 | <img src="{{image2 defaultImages w=160 h=216}}" alt="{{productName}}"> | 5 | <img src="{{image2 defaultImages w=160 h=216}}" alt="{{productName}}"> |
6 | <div class="product-brand" style=" | 6 | <div class="product-brand" style=" |
@@ -9,29 +9,21 @@ | @@ -9,29 +9,21 @@ | ||
9 | ">{{productName}}</div> | 9 | ">{{productName}}</div> |
10 | </div> | 10 | </div> |
11 | <div class="product-info"> | 11 | <div class="product-info"> |
12 | - <div class="seckill-status | ||
13 | - {{#if over}} | ||
14 | - status-over | ||
15 | - {{else if wait}} | ||
16 | - status-wait | ||
17 | - {{else}} | ||
18 | - status-go | ||
19 | - {{/if}} | ||
20 | - "> | 12 | + <div class="seckill-status {{#if over}}status-over{{else if wait}}status-wait{{else}}status-go{{/if}}"> |
21 | <div class="price" | 13 | <div class="price" |
22 | style="{{#if ../productStyle.priceFontColor}}color:{{../productStyle.priceFontColor}};{{/if}}"> | 14 | style="{{#if ../productStyle.priceFontColor}}color:{{../productStyle.priceFontColor}};{{/if}}"> |
23 | - <span class="seckill-price">{{secKillPrice}}元</span> | 15 | + <span class="seckill-price">¥{{secKillPrice}}</span> |
24 | <span class="market-price">¥{{marketPrice}}</span> | 16 | <span class="market-price">¥{{marketPrice}}</span> |
25 | </div> | 17 | </div> |
26 | <div class="status-type"> | 18 | <div class="status-type"> |
27 | {{#if over}} | 19 | {{#if over}} |
28 | 已抢光 | 20 | 已抢光 |
29 | {{else if wait}} | 21 | {{else if wait}} |
30 | - 即将开抢 | 22 | + 即将开始 |
31 | {{else}} | 23 | {{else}} |
32 | - 去抢购 | 24 | + 立即抢 |
33 | {{/if}} | 25 | {{/if}} |
34 | - </div> | 26 | + </div> |
35 | </div> | 27 | </div> |
36 | </div> | 28 | </div> |
37 | </a> | 29 | </a> |
@@ -7,8 +7,6 @@ const cookie = require('yoho-cookie'); | @@ -7,8 +7,6 @@ const cookie = require('yoho-cookie'); | ||
7 | const shopTmpl = require('hbs/activity/feature/shop-group.hbs'); | 7 | const shopTmpl = require('hbs/activity/feature/shop-group.hbs'); |
8 | const seckillTabTpl = require('hbs/activity/feature/seckill-tab.hbs'); | 8 | const seckillTabTpl = require('hbs/activity/feature/seckill-tab.hbs'); |
9 | const seckillProductTpl = require('hbs/activity/feature/seckill-product.hbs'); | 9 | const seckillProductTpl = require('hbs/activity/feature/seckill-product.hbs'); |
10 | -const loading = require('js/plugin/loading'); | ||
11 | -const tip = require('js/plugin/tip'); | ||
12 | 10 | ||
13 | require('scss/feature.scss'); | 11 | require('scss/feature.scss'); |
14 | 12 | ||
@@ -744,7 +742,7 @@ function loadSeckillList() { | @@ -744,7 +742,7 @@ function loadSeckillList() { | ||
744 | 742 | ||
745 | $.ajax({ | 743 | $.ajax({ |
746 | url: '/product/seckill/list' | 744 | url: '/product/seckill/list' |
747 | - }).done(function(result) { | 745 | + }).then(function(result) { |
748 | let dateList = []; | 746 | let dateList = []; |
749 | 747 | ||
750 | if (result && result.activitys) { | 748 | if (result && result.activitys) { |
@@ -765,11 +763,9 @@ function loadSeckillList() { | @@ -765,11 +763,9 @@ function loadSeckillList() { | ||
765 | 763 | ||
766 | if (result && result.products) { | 764 | if (result && result.products) { |
767 | viewSeckillProduct(result.products || []); | 765 | viewSeckillProduct(result.products || []); |
766 | + } else { | ||
767 | + $('.seckill').addClass('hide'); | ||
768 | } | 768 | } |
769 | - }).error(function() { | ||
770 | - | ||
771 | - }).always(function() { | ||
772 | - | ||
773 | }); | 769 | }); |
774 | } | 770 | } |
775 | 771 | ||
@@ -777,20 +773,15 @@ function refreshProductList(activityId, time) { | @@ -777,20 +773,15 @@ function refreshProductList(activityId, time) { | ||
777 | $.ajax({ | 773 | $.ajax({ |
778 | url: '/product/seckill/get-product-list', | 774 | url: '/product/seckill/get-product-list', |
779 | data: { | 775 | data: { |
780 | - uid: yoho.isLogin(), // only app use; | ||
781 | activityId: activityId, | 776 | activityId: activityId, |
782 | startTime: time | 777 | startTime: time |
783 | - }, | ||
784 | - success: function(data) { | ||
785 | - if (data && data.products) { | ||
786 | - viewSeckillProduct(data.products || []); | ||
787 | - } | ||
788 | - }, | ||
789 | - error: function() { | ||
790 | - tip.show('网络断开连接了~'); | ||
791 | } | 778 | } |
792 | - }).always(function() { | ||
793 | - loading.hideLoading(); | 779 | + }).then(function(data) { |
780 | + if (data && data.products) { | ||
781 | + viewSeckillProduct(data.products || []); | ||
782 | + } else { | ||
783 | + $('.seckill').addClass('hide'); | ||
784 | + } | ||
794 | }); | 785 | }); |
795 | } | 786 | } |
796 | 787 |
@@ -83,12 +83,14 @@ | @@ -83,12 +83,14 @@ | ||
83 | } | 83 | } |
84 | 84 | ||
85 | .seckill-status { | 85 | .seckill-status { |
86 | - height: 28px; | 86 | + width: 160px; |
87 | + height: 30px; | ||
87 | color: #fff; | 88 | color: #fff; |
88 | background-size: cover; | 89 | background-size: cover; |
89 | background-repeat: no-repeat; | 90 | background-repeat: no-repeat; |
90 | padding-left: 7px; | 91 | padding-left: 7px; |
91 | box-sizing: border-box; | 92 | box-sizing: border-box; |
93 | + overflow: hidden; | ||
92 | } | 94 | } |
93 | 95 | ||
94 | .status-over { | 96 | .status-over { |
@@ -104,27 +106,29 @@ | @@ -104,27 +106,29 @@ | ||
104 | } | 106 | } |
105 | 107 | ||
106 | .price { | 108 | .price { |
107 | - font-size: 12px; | 109 | + font-size: 17px; |
108 | float: left; | 110 | float: left; |
109 | - width: 50%; | ||
110 | - | ||
111 | - span { | ||
112 | - float: left; | ||
113 | - } | 111 | + width: 83px; |
114 | } | 112 | } |
115 | 113 | ||
116 | .market-price { | 114 | .market-price { |
115 | + font-size: 11px; | ||
117 | text-decoration: line-through; | 116 | text-decoration: line-through; |
118 | - transform: scale(0.8); | 117 | + transform: scale(0.75); |
119 | display: inline-block; | 118 | display: inline-block; |
119 | + margin-left: -6px; | ||
120 | } | 120 | } |
121 | 121 | ||
122 | .status-type { | 122 | .status-type { |
123 | - width: 50%; | 123 | + width: 76px; |
124 | text-align: center; | 124 | text-align: center; |
125 | display: inline-block; | 125 | display: inline-block; |
126 | border: none; | 126 | border: none; |
127 | font-size: 15px; | 127 | font-size: 15px; |
128 | + position: relative; | ||
129 | + top: 1px; | ||
130 | + left: -2px; | ||
131 | + transform: scale(0.9); | ||
128 | } | 132 | } |
129 | } | 133 | } |
130 | } | 134 | } |
@@ -137,7 +141,7 @@ | @@ -137,7 +141,7 @@ | ||
137 | } | 141 | } |
138 | 142 | ||
139 | .product { | 143 | .product { |
140 | - width: 192px; | 144 | + width: 195px; |
141 | margin-right: 7px; | 145 | margin-right: 7px; |
142 | 146 | ||
143 | &:last-child { | 147 | &:last-child { |
@@ -145,13 +149,28 @@ | @@ -145,13 +149,28 @@ | ||
145 | } | 149 | } |
146 | 150 | ||
147 | .img-box { | 151 | .img-box { |
148 | - width: 192px; | 152 | + width: 195px; |
149 | height: 244px; | 153 | height: 244px; |
150 | } | 154 | } |
151 | 155 | ||
152 | .seckill-status { | 156 | .seckill-status { |
153 | - height: 36px; | ||
154 | - line-height: 36px; | 157 | + width: 195px; |
158 | + height: 37px; | ||
159 | + line-height: 37px; | ||
160 | + } | ||
161 | + | ||
162 | + .price { | ||
163 | + width: 105px; | ||
164 | + font-size: 20px; | ||
165 | + } | ||
166 | + | ||
167 | + .market-price { | ||
168 | + font-size: 13px; | ||
169 | + } | ||
170 | + | ||
171 | + .status-type { | ||
172 | + font-size: 18px; | ||
173 | + width: 85px; | ||
155 | } | 174 | } |
156 | } | 175 | } |
157 | } | 176 | } |
-
Please register or login to post a comment