Authored by 王水玲

活动模版秒杀

... ... @@ -2,7 +2,8 @@
{{#if fontColor}}color:{{fontColor}};{{/if}}
{{#if lineHeight}}line-height:{{lineHeight}};{{/if}}
{{#if fontSize}}font-size:{{fontSize}};{{/if}}
font-weight:{{bold}};">
{{#if alignType}}text-align:{{alignType}};{{/if}}
font-weight:{{bold}};{{#isEqualOr alignType 'left'}}text-indent: 2em;{{/isEqualOr}}">
{{# contentEdit}}
<p style="{{#if ../contentSpace}}margin-bottom:{{../contentSpace}};{{/if}}">{{.}}</p>
{{/ contentEdit}}
... ...
{{# list}}
<div class="product">
<a href="">
<a href="/product/seckill/show_{{{productSkn}}}.html">
<div class="img-box">
<img src="{{image2 defaultImages w=160 h=216}}" alt="{{productName}}">
<div class="product-brand" style="
... ... @@ -9,29 +9,21 @@
">{{productName}}</div>
</div>
<div class="product-info">
<div class="seckill-status
{{#if over}}
status-over
{{else if wait}}
status-wait
{{else}}
status-go
{{/if}}
">
<div class="seckill-status {{#if over}}status-over{{else if wait}}status-wait{{else}}status-go{{/if}}">
<div class="price"
style="{{#if ../productStyle.priceFontColor}}color:{{../productStyle.priceFontColor}};{{/if}}">
<span class="seckill-price">{{secKillPrice}}</span>
<span class="seckill-price">¥{{secKillPrice}}</span>
<span class="market-price">¥{{marketPrice}}</span>
</div>
<div class="status-type">
{{#if over}}
已抢光
{{else if wait}}
即将开
即将开
{{else}}
去抢购
立即抢
{{/if}}
</div>
</div>
</div>
</div>
</a>
... ...

509 Bytes | W: | H:

520 Bytes | W: | H:

  • 2-up
  • Swipe
  • Onion skin

614 Bytes | W: | H:

628 Bytes | W: | H:

  • 2-up
  • Swipe
  • Onion skin

465 Bytes | W: | H:

480 Bytes | W: | H:

  • 2-up
  • Swipe
  • Onion skin
... ... @@ -7,8 +7,6 @@ const cookie = require('yoho-cookie');
const shopTmpl = require('hbs/activity/feature/shop-group.hbs');
const seckillTabTpl = require('hbs/activity/feature/seckill-tab.hbs');
const seckillProductTpl = require('hbs/activity/feature/seckill-product.hbs');
const loading = require('js/plugin/loading');
const tip = require('js/plugin/tip');
require('scss/feature.scss');
... ... @@ -744,7 +742,7 @@ function loadSeckillList() {
$.ajax({
url: '/product/seckill/list'
}).done(function(result) {
}).then(function(result) {
let dateList = [];
if (result && result.activitys) {
... ... @@ -765,11 +763,9 @@ function loadSeckillList() {
if (result && result.products) {
viewSeckillProduct(result.products || []);
} else {
$('.seckill').addClass('hide');
}
}).error(function() {
}).always(function() {
});
}
... ... @@ -777,20 +773,15 @@ function refreshProductList(activityId, time) {
$.ajax({
url: '/product/seckill/get-product-list',
data: {
uid: yoho.isLogin(), // only app use;
activityId: activityId,
startTime: time
},
success: function(data) {
if (data && data.products) {
viewSeckillProduct(data.products || []);
}
},
error: function() {
tip.show('网络断开连接了~');
}
}).always(function() {
loading.hideLoading();
}).then(function(data) {
if (data && data.products) {
viewSeckillProduct(data.products || []);
} else {
$('.seckill').addClass('hide');
}
});
}
... ...
... ... @@ -58,7 +58,6 @@
.text-edit {
word-break: break-all;
text-indent: 2em;
margin: 0 20px;
box-sizing: border-box;
... ...
... ... @@ -83,12 +83,14 @@
}
.seckill-status {
height: 28px;
width: 160px;
height: 30px;
color: #fff;
background-size: cover;
background-repeat: no-repeat;
padding-left: 7px;
box-sizing: border-box;
overflow: hidden;
}
.status-over {
... ... @@ -104,27 +106,29 @@
}
.price {
font-size: 12px;
font-size: 17px;
float: left;
width: 50%;
span {
float: left;
}
width: 83px;
}
.market-price {
font-size: 11px;
text-decoration: line-through;
transform: scale(0.8);
transform: scale(0.75);
display: inline-block;
margin-left: -6px;
}
.status-type {
width: 50%;
width: 76px;
text-align: center;
display: inline-block;
border: none;
font-size: 15px;
position: relative;
top: 1px;
left: -2px;
transform: scale(0.9);
}
}
}
... ... @@ -137,7 +141,7 @@
}
.product {
width: 192px;
width: 195px;
margin-right: 7px;
&:last-child {
... ... @@ -145,13 +149,28 @@
}
.img-box {
width: 192px;
width: 195px;
height: 244px;
}
.seckill-status {
height: 36px;
line-height: 36px;
width: 195px;
height: 37px;
line-height: 37px;
}
.price {
width: 105px;
font-size: 20px;
}
.market-price {
font-size: 13px;
}
.status-type {
font-size: 18px;
width: 85px;
}
}
}
... ...