Authored by ccbikai

Merge branch 'feature/product-detail' of git.yoho.cn:fe/yohobuywap-node into feature/product-detail

... ... @@ -75,9 +75,9 @@ const getSizeInfo = (sizeInfo) => {
dest.sizeInfo.detail.list = [];
// 参考尺码
let boyReference = !_.isEmpty(sizeInfo.productExtra.boyReference);
let girlReference = !_.isEmpty(sizeInfo.productExtra.girlReference);
let gender = !_.isEmpty(sizeInfo.productDescBo.gender) ? sizeInfo.productDescBo.gender : 3;
let boyReference = sizeInfo.productExtra.boyReference;
let girlReference = sizeInfo.productExtra.girlReference;
let gender = sizeInfo.productDescBo.gender ? sizeInfo.productDescBo.gender : 3;
let referenceName = '参考尺码';
if ((gender === 1 && boyReference) || (gender === 2 && girlReference)) {
... ... @@ -102,12 +102,14 @@ const getSizeInfo = (sizeInfo) => {
if (!_.isEmpty(sizeInfo.sizeInfoBo.sizeAttributeBos)) {
// [{param: attrName}] th
let sizeNameList = [];
temp = {};
temp.param = '吊牌尺码';
sizeNameList.push(temp);
// {id: [{param: str},......]} sizeBoGroup[id][0] 属性名, sizeBoGroup[id][index] 属性值
let sizeBoGroup = {};
_.forEach(sizeInfo.sizeInfoBo.sizeAttributeBos, function(attr) {
... ... @@ -126,13 +128,11 @@ const getSizeInfo = (sizeInfo) => {
if (boyReference && (gender === 1 || gender === 3)) {
temp = {};
temp.param = _.isEmpty(value.boyReferSize.referenceName) ?
' ' : value.boyReferSize.referenceName;
temp.param = value.boyReferSize.referenceName || '';
referenceList.push(temp);
} else if (girlReference && (gender === 2 || gender === 3)) {
temp = {};
temp.param = _.isEmpty(value.girlReferSize.referenceName) ?
' ' : value.girlReferSize.referenceName;
temp.param = value.girlReferSize.referenceName || '';
referenceList.push(temp);
} else {
showReference = false;
... ... @@ -140,7 +140,7 @@ const getSizeInfo = (sizeInfo) => {
_.forEach(value.sortAttributes, function(attr) {
temp = {};
temp.param = _.isEmpty(attr.sizeValue) ? ' ' : attr.sizeValue;
temp.param = attr.sizeValue || ' ';
sizeBoGroup[attr.id].push(temp);
});
});
... ... @@ -149,6 +149,7 @@ const getSizeInfo = (sizeInfo) => {
dest.sizeInfo.detail.list[0] = {};
dest.sizeInfo.detail.list[0].params = sizeNameList;
if (showReference) {
dest.sizeInfo.detail.list[1] = {};
dest.sizeInfo.detail.list[1].params = referenceList;
}
_.forEach(sizeBoGroup, function(value) {
... ...
... ... @@ -709,37 +709,38 @@ $basicBtnC: #eb0313;
a {
display: inline-block;
}
&.num-incart {
position: relative;
color: #444;
font-size: 47px;
}
.num-incart {
position: relative;
color: #444;
font-size: 47px;
}
&.favorite {
color: #ccc;
font-size: 34px;
}
.favorite {
color: #ccc;
font-size: 34px;
background-color: transparent;
}
&.favorite.liked {
color: $basicBtnC;
}
.favorite.liked {
color: $basicBtnC;
}
&.addto-cart,
&.sold-out {
margin: 0 100px 0 115px;
width: 260px;
height: 80px;
background-color: $basicBtnC;
color: #fff;
text-align: center;
font-size: 32px;
line-height: 80px;
}
.addto-cart,
.sold-out {
margin: 0 100px 0 115px;
width: 260px;
height: 80px;
background-color: $basicBtnC;
color: #fff;
text-align: center;
font-size: 32px;
line-height: 80px;
}
&.sold-out {
background-color: #f58189;
}
.sold-out {
background-color: #f58189;
}
.num-tag {
... ...