Authored by 徐炜

Merge branch 'feature/sale-optim' into release/wap-optim4

... ... @@ -86,6 +86,7 @@ let index = (req, res, next) => {
}
res.render('sale/index', Object.assign(params.renderData, {
content: result,
localCss: true,
floorHeader: {
title: {
title: '最新降价'
... ...
{{#data}}
{{#if ../discountActivity}}
{{#if ../discountActivity}}
{{> common/floor-header-more}}
{{/if}}
<ul class="discount-list">
{{/if}}
<ul class="discount-list">
{{#list}}
<li>
<a href="/product/sale/discount/detail?id={{id}}&channel={{@root.channel}}">
<img class="lazy" data-original="{{image2 cover_url w=640 h=250 q=60}}" />
{{#within @index 3}}
<img src="{{image2 cover_url w=640 h=250 q=60}}"/>
{{^}}
<img class="lazy" data-original="{{image2 cover_url w=640 h=250 q=60}}"/>
{{/within}}
<p class="discount-cont">
<span class="discount-title">{{title}}</span>
<span class="discount-time {{#if warn_color}}red-color{{/if}}">{{time}}</span>
... ... @@ -14,5 +18,5 @@
</a>
</li>
{{/list}}
</ul>
</ul>
{{/data}}
... ...
... ... @@ -4,6 +4,8 @@
* @date: 2016/5/17
*/
require('../../scss/product/sale/_index.css');
var $ = require('yoho-jquery'),
Swiper = require('yoho-swiper'),
ellipsis = require('yoho-mlellipsis'),
... ...
... ... @@ -3,3 +3,10 @@
@import "sale";
@import "discount";
@import "discount-detail";
@import "../../layout/_swiper.css";
@import "../../channel/_banner-top.css";
@import "../../channel/_floor-header.css";
@import "../../channel/_discount-list.css";
@import "../../common/_good.css";
@import "../../common/_filter.css";
... ...
... ... @@ -70,5 +70,19 @@ module.exports = {
} else {
return opt.inverse(this);
}
},
/**
* 小于某zhi
*
* @param variable
* @param number
*/
within: function(variable, number, opt) {
if (variable < number) {
return opt.fn(this);
} else {
return opt.inverse(this);
}
}
};
... ...