Authored by yyq

Merge branch 'feature/1215' into develop

... ... @@ -493,7 +493,9 @@ class featureModel extends global.yoho.BaseModel {
// 默认为非ufo商品
f.component[0].ufoProduct = f.component[0].ufoProduct || '0';
if (_.get(f, 'component[0].ufoProduct') === '1') {
let isUfoProduct = _.get(f, 'component[0].ufoProduct') === '1';
if (isUfoProduct) {
let searchCondition = f.component[0].searchCondition || {};
searchCondition.is_ufo = 'Y';
... ... @@ -504,18 +506,18 @@ class featureModel extends global.yoho.BaseModel {
}
f.component[0].searchCondition = searchCondition;
}
if (_.get(f, 'component[0].numOfOneRow') === '1') { // 一行一个商品或UFO商品展示销售数量
let showLastSoldTpl = '';
if (_.get(f, 'component[0].numOfOneRow') === '1' || isUfoProduct) { // 一行一个商品或UFO商品展示销售数量
let showLastSoldTpl = '';
if (_.get(f, 'component[0].ufoProduct') === '1') {
showLastSoldTpl = '{{soldNum}}人付款';
} else {
showLastSoldTpl = '累积销售{{soldNum}}件';
}
f.component[0].showLastSoldTpl = showLastSoldTpl;
if (isUfoProduct) {
showLastSoldTpl = '{{soldNum}}人付款';
} else {
showLastSoldTpl = '累积销售{{soldNum}}件';
}
f.component[0].showLastSoldTpl = showLastSoldTpl;
}
... ... @@ -800,7 +802,7 @@ class featureModel extends global.yoho.BaseModel {
}
});
cache.setAsync(key, JSON.stringify({
pass && cache.setAsync(key, JSON.stringify({
time: Date.parse(new Date())
}), 30 * 12 * 60 * 60);
... ...
... ... @@ -2,7 +2,7 @@
const _ = require('lodash');
const UfoApi = global.yoho.UfoAPI;
let _getProduct = function(o) {
let _getProduct = function(o, type) {
let plan = o.product_price_plan_list;
let res = {
small_sort_id: o.small_sort_id,
... ... @@ -23,7 +23,8 @@ let _getProduct = function(o) {
cn_alphabet: o.cn_alphabet,
default_images: o.default_images,
total_sales_num: o.total_sales_num || 0,
goods_id: Array.isArray(o.goods_list) && o.goods_list.length ? o.goods_list[0].goods_id : void 0
goods_id: Array.isArray(o.goods_list) && o.goods_list.length ? o.goods_list[0].goods_id : void 0,
type: type || 'yoho'
};
plan = _.sortBy(plan, item => {
... ... @@ -100,7 +101,7 @@ class individuationModel extends global.yoho.BaseModel {
}
ufoProductList(params) {
return this.get({
data: Object.assign({
data: Object.assign({
method: 'ufo.product.search.common.list'
}, params),
api: UfoApi
... ... @@ -110,9 +111,13 @@ class individuationModel extends global.yoho.BaseModel {
list.forEach(function(o) {
if (o) {
o.sales_price = o.price;
o.market_price = 0;
data.push(_getProduct(o));
Object.assign(o, {
product_id: o.id,
sales_price: o.price || '--',
market_price: 0,
total_sales_num: o.sales
});
data.push(_getProduct(o, 'ufo'));
}
});
... ...
... ... @@ -133,7 +133,7 @@ module.exports = {
notifyUrl: domains.service + 'payment/weixin_notify',
},
geetestJs: '//static.geetest.com/static/tools/gt.js',
jsSdk: 'https://cdn.yoho.cn/js-sdk/1.3.30/jssdk.js',
jsSdk: 'https://cdn.yoho.cn/js-sdk/1.3.31/jssdk.js',
redis: {
connect: {
host: '192.168.102.49',
... ...
... ... @@ -173,7 +173,7 @@
.buy-btn-icon {
width: auto;
height: 36px;
height: 40px;
position: absolute;
right: 12px;
bottom: 16px;
... ... @@ -915,7 +915,7 @@
height: 280px;
overflow: hidden;
img {
.product-detail-img {
height: 100% !important;
}
}
... ... @@ -937,6 +937,7 @@
.price {
height: auto;
line-height: 1.1;
}
.sale-price {
... ... @@ -989,6 +990,7 @@
}
.product-detail-text {
height: auto;
left: 210px;
bottom: 28px;
margin: 0;
... ... @@ -1020,6 +1022,10 @@
margin-right: 8px;
}
&:nth-of-type(3n) {
margin-right: 0;
}
.product-detail-imgbox {
height: 190px;
overflow: hidden;
... ...