Authored by yyq

Merge branch 'release/1.0' of git.yoho.cn:fe/yoho-blk into release/1.0

... ... @@ -160,7 +160,7 @@ const _processHeadData = (list) => {
isLike: data.isPraise,
isCollected: data.isFavor,
likeNum: data.praiseNum,
weixinUrl: `http://guang.m.yohobuy.com/info/index?id=${data.id}`
weixinUrl: `http://m.yohoblk.com/${data.id}.html`
};
}
... ... @@ -229,6 +229,7 @@ const _getRelatedData = (idList) => {
productSkn: data.product_skn
});
});
return productList;
} else {
logger.error('推荐商品 cood 不是 200');
... ... @@ -358,7 +359,6 @@ const _processContentData = (list) => {
delete related.relatedGroup[key];
}
});
}
... ...
... ... @@ -103,8 +103,9 @@ const list = {
data.filter.groupSort = DataHelper.sortConvert(sortData.data.sort);
retData.filter = DataHelper.filterHandle(data.filter, q);
retData.filter.showPrice = data.total > 10;
retData.filter.showInfo = (retData.filter.style && retData.filter.style.length > 0)
|| (data.standard && data.standard.length > 0); //eslint-disable-line
// retData.filter.showInfo = (retData.filter.style && retData.filter.style.length > 0)
// || (data.standard && data.standard.length > 0); //eslint-disable-line
}
retData.navPath = {
... ...
... ... @@ -35,24 +35,24 @@ function _paramHanlde(obj) {
// obj.standard = JSON.stringify(standards);
// }
let _gender;
if (obj.yh_channel) {
switch (obj.yh_channel) {
case 'men':
_gender = '1,3';
break;
case 'women':
_gender = '2,3';
break;
default:
break;
}
}
// let _gender;
//
// if (obj.yh_channel) {
// switch (obj.yh_channel) {
// case 'men':
// _gender = '1,3';
// break;
// case 'women':
// _gender = '2,3';
// break;
// default:
// break;
// }
// }
if (obj.gender || _gender) {
obj.gender = obj.gender || _gender;
}
// if (obj.gender || _gender) {
// obj.gender = obj.gender || _gender;
// }
return obj;
}
... ...
... ... @@ -157,15 +157,16 @@ const ShopService = {
}
info.resources = resources;
info.menus = shopMenu(domain, resources.navigationBar);
} else {
}
if (info.brandId) {
let brandInfo = yield BrandService.getBrandInfo(info.brandId, uid);
info.name = brandInfo.brandName;
info.name = info.name || brandInfo.brandName;
// info.info = brandInfo.brandIntro;
info.btnName = '品牌介绍';
info.isFavorite = brandInfo.isFavorite === 'Y';
info.banner = info.brandBanner;
info.isFavorite = info.isFavorite || (brandInfo.isFavorite === 'Y');
info.banner = info.banner || info.brandBanner;
}
return info;
})();
... ...
... ... @@ -171,7 +171,7 @@
<div class="style-body nano">
<div class="nano-content">
{{#each style}}
<div class="input-radio" data-value="{{styleId}}">
<div class="input-radio {{#if checked}}default-check{{/if}}" data-value="{{styleId}}">
{{> icon/radio }}
<label>{{styleName}}</label>
</div>
... ...
... ... @@ -48,7 +48,8 @@ module.exports = {
name: 'error',
level: 'error',
filename: 'logs/error.log',
handleExceptions: true
handleExceptions: true,
maxFiles: 7
},
udp: { // send by udp
measurement: 'yohoblk_pc_log',
... ... @@ -110,10 +111,10 @@ if (isProduction) {
Object.assign(module.exports, {
appName: 'www.yohoblk.com for test',
domains: {
singleApi: 'http://192.168.102.31:8092/brower',
singleApi: process.env.TEST_SINGLEAPI || 'http://192.168.102.31:8092/brower',
api: process.env.TEST_API || 'http://testapi.yoho.cn:28078/',
service: process.env.TEST_SERVICE || 'http://testservice.yoho.cn:28077/',
search: 'http://192.168.102.216:8080/yohosearch/'
search: process.env.TEST_SEARCH || 'http://192.168.102.216:8080/yohosearch/'
},
useOneapm: true,
useCache: true,
... ...
... ... @@ -254,3 +254,12 @@ if ($('.chapter-right').find('a').text() === '') {
}
$('.comments-list').find('li:last').css('border-bottom', 'none');
// $('.good-info').find('.price')
$('.good-info').each(function() {
var $this = $(this).find('.price');
if ($this.text().indexOf('.') < 0) {
$this.html($this.text() + '.00');
}
});
... ...
... ... @@ -342,6 +342,10 @@ var YohoListPage = {
$('.style-body .input-radio', this.rootDoc).check({
type: 'radio'
});
$('.style-body .input-radio.default-check', this.rootDoc).check({
type: 'radio',
checked: true
});
YohoListPage.mulitStyle = false;
$('.style-mulit-btn .btn').addClass('white');
},
... ... @@ -357,6 +361,7 @@ var YohoListPage = {
filterBrand: function(letter) {
$('.yoho-product-list .brand-list .input-radio').each(function() {
var first = $(this).data('word').toString(); // eslint-disable-line
var name = $(this).find('label').text().toLowerCase();
first = first.toLowerCase();
if (letter === '0-9') {
... ... @@ -366,7 +371,7 @@ var YohoListPage = {
$(this).show();
}
} else {
if (!letter || first === letter) {
if (!letter || first === letter || name.indexOf(letter) === 0) {
$(this).show();
} else {
$(this).hide();
... ... @@ -449,7 +454,7 @@ var YohoListPage = {
},
go: function(q) {
var qs = $.extend(common.queryString(), q);
var qs = $.extend(common.queryString(), q, {page: q.page || 1});
location.search = $.param(qs);
},
... ...
... ... @@ -37,6 +37,8 @@ var balanceTpl = require('../../tpl/shopping/balance.hbs');
var pkgCache = {};
var suredCoin = 0;
var $pkgList;
require('yoho-jquery-placeholder');
... ... @@ -218,8 +220,10 @@ $coinSure.click(function() {
return;
}
suredCoin = getCoinUsed();
// 切换显示
compute(getCoinUsed());
compute(suredCoin);
toggleCoinPanel();
});
... ... @@ -257,7 +261,7 @@ $('.print-price-radio').check({
$('#balance-list').on('click', '#submit-order', function() {
var reqParam = {
address_id: $('.address.focus').data('id'),
use_yoho_coin: getCoinUsed(),
use_yoho_coin: suredCoin,
remark: $('#remark-content').val(),
isPrintPrice: $printPrice.printPrice
};
... ...
... ... @@ -385,13 +385,14 @@
}
.goods-img-list {
margin: 2px 10px;
margin: 2px 0 2px 10px;
float: left;
.goods-img-col {
display: inline-block;
vertical-align: top;
width: 60px;
margin-right: 10px;
}
img {
... ...