Authored by 郭成尧

Merge branch 'release/4.6' of git.yoho.cn:fe/yohobuy-node into release/4.6

... ... @@ -53,10 +53,10 @@
¥{{.}}
</span>
{{/ salesPrice}}
{{#vip}}<span class="vip-tag"> VIP </span><strong>更优惠</strong>{{/vip}}
{{#vip1}}<span class="vip-1"> </span>{{/vip1}}
{{#vip2}}<span class="vip-2"> </span>{{/vip2}}
{{#vip3}}<span class="vip-3"> </span>{{/vip3}}
{{#vip}}<span class="vip-tag vip-span"><span> VIP </span></span><strong>更优惠</strong>{{/vip}}
{{#vip1}}<span class="vip-1 vip-span"></span>{{/vip1}}
{{#vip2}}<span class="vip-2 vip-span"></span>{{/vip2}}
{{#vip3}}<span class="vip-3 vip-span"></span>{{/vip3}}
</p>
</div>
</div>
... ...
... ... @@ -32,17 +32,28 @@
<p class="few-tag">即将售罄</p>
{{/ isFew}}
{{# isSaleOut}}
<div class="sale-out">
<span class="sale-out-tip">已抢光</span>
</div>
{{/ isSaleOut}}
{{#if showColBtn}}
<span class="col-btn iconfont{{#if coled}} coled{{/if}}">&#xe616;</span>
{{/if}}
</div>
<div class="good-detail-text">
<a href="{{url}}" target="_blank">{{{productName}}}</a>
{{!-- {{# brandName}} --}}
{{#if isSaleOut}}
<a href="javascript:;">{{{productName}}}</a>
<p class="brand">
<a href="javascript:;">{{brandName}}</a>
</p>
{{^}}
<a href="{{url}}" target="_blank">{{{productName}}}</a>
<p class="brand">
<a href="{{brandUrl}}">{{brandName}}</a>
</p>
{{!-- {{/ brandName}} --}}
{{/if}}
<p class="price">
{{# marketPrice}}
<span class="market-price">¥{{.}}</span>
... ... @@ -50,14 +61,19 @@
<span class="sale-price{{#unless marketPrice}}prime-cost{{/unless}}">
¥{{salesPrice}}
</span>
{{#vip}}<span class="vip-tag"> VIP </span><strong>更优惠</strong>{{/vip}}
{{#vip1}}<span class="vip-1"> </span>{{/vip1}}
{{#vip2}}<span class="vip-2"> </span>{{/vip2}}
{{#vip3}}<span class="vip-3"> </span>{{/vip3}}
{{# discount}}
<span class="discount">{{.}}</span>
{{/ discount}}
{{#vip}}<span class="vip-tag vip-span"><span> VIP </span></span><strong>更优惠</strong>{{/vip}}
{{#vip1}}<span class="vip-1 vip-span"></span>{{/vip1}}
{{#vip2}}<span class="vip-2 vip-span"></span>{{/vip2}}
{{#vip3}}<span class="vip-3 vip-span"></span>{{/vip3}}
</p>
<div class="goodsList hide">
{{#goodsList}}
<div class="list" imgUrl = "{{image imagesUrl 220 300}}" url = "{{goodsId}}" cover = "{{cover1}}"></div>
<div class="list" imgUrl="{{image imagesUrl 220 300}}" url="{{goodsId}}" cover="{{cover1}}"></div>
{{/goodsList}}
</div>
</div>
... ...
... ... @@ -94,3 +94,7 @@ exports.webSign = (params) => {
return params.key === md5(md5(webPrivateKey) + params.uid);
};
exports.makeToken = (string) => {
return md5(md5(string + '#@!@#'));
};
... ...
... ... @@ -15,7 +15,7 @@ var homePage = $('.home-page').data('page'),
require('../common');
require('../plugins/slider');
require('../plugins/logo-brand');
require('../product/index/logo-brand');
require('../plugins/accordion');
... ... @@ -27,7 +27,7 @@ $(document).on('mouseout', '.imgopacity a img', function() {
});
if ($.inArray(homePage, ['boys', 'girls', 'kids', 'lifestyle']) > -1) {
require('../plugins/new-arrivls')({
require('../product/index/new-arrivls')({
type: homePage,
url: '/common/getNewArrival',
count: (homePage === 'boys') || (homePage === 'lifestyle') ? 5 : 4,
... ...
... ... @@ -8,7 +8,7 @@ var $ = require('yoho-jquery'),
Handlebars = require('yoho-handlebars'),
lazyLoad = require('yoho-jquery-lazyload');
(function($) {
(function() {
var LogoBrand = function(element, options) {
this.$element = $(element);
this.options = $.extend({}, $.fn.logoBrand.defaults, options);
... ... @@ -153,4 +153,4 @@ var $ = require('yoho-jquery'),
showNum: 16,
url: '/boys/getBrand'
};
})($);
}());
... ...
... ... @@ -112,7 +112,7 @@ module.exports = function(data) {
delete data.count;
delete data.rows;
loadAjax = function(url, data, count) {
loadAjax = function() {
var options = {
type: 'POST',
... ... @@ -154,14 +154,14 @@ module.exports = function(data) {
};
load.on('after', function(p) {
load.on('after', function() {
data.pageCount = count * rows[1];
loadAjax(url, data);
});
load.on('before', function(p) {
load.on('before', function() {
load.tpl = '{{#each this}}';
... ...
... ... @@ -4,9 +4,9 @@
* @date: 2016/06/3
*/
var product = require('../../plugins/product');
var product = require('../index/product');
require('../../plugins/filter');
require('../../plugins/sort-pager');
product.init(4);
... ...
var $ = require('yoho-jquery'),
lazyLoad = require('yoho-jquery-lazyload'),
product = require('../plugins/product');
product = require('./index/product');
var limitTime = [];
... ...
... ... @@ -6,7 +6,7 @@
.good-detail-img {
width: 100%;
height: 100%;
height: 315px;
position: relative;
.good-thumb,
... ... @@ -29,6 +29,24 @@
text-align: center;
bottom: 0;
}
.sale-out {
width: 100%;
height: 100%;
text-align: center;
top: 0;
position: absolute;
background: resolve('product/sale-out-bg.png');
}
.sale-out-tip {
width: 110px;
height: 110px;
margin-top: 105px;
display: inline-block;
background: resolve('product/sale-out-tip.png') no-repeat center center;
text-indent: -9999px;
}
}
.good-detail-text {
... ... @@ -47,7 +65,6 @@
> .price {
margin-top: 5px;
text-align: center;
}
.brand {
... ... @@ -63,57 +80,42 @@
margin-right: 15px;
}
span.vip-tag {
background-image: resolve("sale/vip.png");
background-repeat: no-repeat;
background-size: 100% 90%;
width: 40px;
.discount {
font-size: 12px;
line-height: 22px;
color: #fff;
font-style: italic;
margin-right: 10px;
margin-left: 10px;
width: 30px;
padding: 0 6px 0 16px;
background: resolve('product/discount-tag.png') no-repeat;
display: inline-block;
}
span.vip-1 {
background-image: resolve("product/silver-small.png");
.vip-span {
background-repeat: no-repeat;
width: 30px;
display: inline-block;
height: 12px;
background-size: 100% 100%;
width: 35px;
height: 15px;
line-height: 15px;
color: #fff;
font-style: italic;
margin-right: 10px;
margin-left: 10px;
position: absolute;
padding-right: 5px;
padding-left: 5px;
font-weight: bold;
}
span.vip-2 {
.vip-tag {
background-image: resolve("sale/vip.png");
}
.vip-1 {
background-image: resolve("product/silver-small.png");
}
.vip-2 {
background-image: resolve("product/golden-small.png");
background-repeat: no-repeat;
width: 30px;
display: inline-block;
height: 12px;
color: #fff;
font-style: italic;
margin-right: 10px;
margin-left: 10px;
position: absolute;
}
span.vip-3 {
.vip-3 {
background-image: resolve("product/platinum-small.png");
background-repeat: no-repeat;
width: 30px;
display: inline-block;
height: 12px;
color: #fff;
font-style: italic;
margin-right: 10px;
margin-left: 10px;
position: absolute;
}
}
.col-btn {
... ...
... ... @@ -34,7 +34,6 @@
display: block;
}
.slide-wrapper {
height: 100%;
}
... ... @@ -418,66 +417,6 @@
color: #565656;
font-size: 13px;
}
span.vip-tag {
background-image: resolve("sale/vip.png");
background-repeat: no-repeat;
background-size: 100% 90%;
width: 40px;
color: #fff;
font-style: italic;
margin-right: 5px;
margin-left: 5px;
width: 30px;
}
span.vip-1 {
background-image: resolve("product/silver-small.png");
background-repeat: no-repeat;
width: 30px;
display: inline-block;
height: 12px;
color: #fff;
font-style: italic;
margin-right: 5px;
margin-left: 5px;
position: absolute;
}
span.vip-2 {
background-image: resolve("product/golden-small.png");
background-repeat: no-repeat;
width: 30px;
display: inline-block;
height: 12px;
color: #fff;
font-style: italic;
margin-right: 5px;
margin-left: 5px;
position: absolute;
}
span.vip-3 {
background-image: resolve("product/platinum-small.png");
background-repeat: no-repeat;
width: 30px;
display: inline-block;
height: 12px;
color: #fff;
font-style: italic;
margin-right: 5px;
margin-left: 5px;
position: absolute;
}
.price-sale {
margin-left: 10px;
padding-left: 10px;
width: 36px;
height: 20px;
line-height: 20px;
background: url('../assets/images/furniture/sale-tag-bg.png?1450667948');
color: #fff;
}
}
}
... ... @@ -496,6 +435,55 @@
height: 77px;
}
}
.good-info {
.good-detail-text {
> a {
margin-top: 16px;
line-height: 1.5;
display: block;
text-align: center;
@mixin ellipsis;
}
> .price {
margin-top: 5px;
text-align: center;
}
.brand {
display: none;
}
.market-price {
text-decoration: line-through;
margin-right: 15px;
color: #444;
font-weight: bold;
}
> .price {
margin-top: 5px;
font-weight: bold;
}
.vip-span {
background-repeat: no-repeat;
background-size: 100% 100%;
width: 35px;
height: 15px;
color: #fff;
font-style: italic;
margin-right: 10px;
margin-left: 10px;
padding-right: 5px;
padding-left: 5px;
font-weight: bold;
}
}
}
}
.sale-discount-page {
... ... @@ -514,9 +502,10 @@
display: inline-block;
margin-right: 10px;
padding: 0 10px;
height: 25px;
vertical-align: center;
font-weight: lighter;
line-height: 16px;
vertical-align: text-bottom;
line-height: 25px;
color: #fff;
background: #ff575c;
}
... ... @@ -555,4 +544,13 @@
.pager {
float: right;
}
.good-info {
.good-detail-text {
> .price {
margin-top: 5px;
text-align: center;
}
}
}
}
... ...
... ... @@ -184,6 +184,15 @@
margin-right: 40px;
}
}
.good-info {
.good-detail-text {
> .price {
margin-top: 5px;
text-align: center;
}
}
}
}
.min-screen .new-sale-page .new-brands .brands-wrap {
... ...