Authored by hongweigao

Merge branch 'master' into feature/studentsTwo

... ... @@ -86,7 +86,7 @@ exports.suggest4Old = (req, res, next) => {
exports.serachFilterBrands = (req, res, next) => {
search.getBrands4Filter(Object.assign({}, req.query, {
keyword: req.query.query
keyword: req.query.query || ''
})).then(result => {
let dest = {
code: 200,
... ...
... ... @@ -108,6 +108,11 @@ exports.getBrands4Filter = (params) => {
nparams.price = nmp.join(',');
}
// 生成路径包含callback 导致多次调用多个 callback问题
if (params && params.callback) {
delete params.callback;
}
return searchApi.getBrands4Filter(Object.assign({}, params, nparams)).then(result => {
let dest = [];
... ...
... ... @@ -78,7 +78,7 @@
</p>
<div class="hideList hide">
{{#goods_list}}
<li data-src="{{image images_url 280 374}}" data-url="{{../url}}"></li>
<li data-src="{{image images_url 280 374}}" data-url="{{../url}}" data-status="{{status}}"></li>
{{/goods_list}}
</div>
</div>
... ...
{
"name": "yohobuy-node",
"version": "5.0.1",
"version": "5.0.2",
"private": true,
"description": "A New Yohobuy Project With Express",
"repository": {
... ...
... ... @@ -104,7 +104,10 @@ exports.init = function(num) {
event.target.find('.hideList > li').each(function() {
pic = $(this).data();
pic.coverImg = pic.src;
pics.push(pic);
if (+pic.status) { // 过滤下架商品
pics.push(pic);
}
});
colorList = createColorList(pics, _from);
... ...
... ... @@ -4,7 +4,8 @@ const fp = require('lodash/fp');
const camelCase = global.yoho.camelCase;
const helpers = global.yoho.helpers;
const images = require(`${global.utils}/images`);
// const images = require(`${global.utils}/images`);
// NOTE: 这里修改了图片质量的参数
helpers.image = _.flow(helpers.image, fp.replace(/\/quality\/\d*$/, '/quality/90'));
... ... @@ -393,7 +394,7 @@ exports.processProduct = (productData, options) => {
result.id = productData.product_skn;
result.product_id = productData.product_id;
result.thumb = images.getImageUrl(productData.default_images, options.width, options.height);
result.thumb = helpers.image(productData.default_images, options.width, options.height);
result.name = productData.product_name;
result.price = !productData.market_price ? false : productData.market_price;
result.salePrice = productData.sales_price;
... ...