Authored by zhangxiaoru

评价取厂家颜色

... ... @@ -100,16 +100,18 @@ let _processComment = (data) => {
};
if (data && data.pageResponse) {
let descColor;
let color, size;
_.forEach(data.pageResponse.list, (item) => {
if (item.goods) {
descColor = item.goods.factory_goods_name ? `${item.goods.factory_goods_name}/${item.goods.size_name}` : `${item.goods.color_name}/${item.goods.size_name}`;
color = item.goods.factory_goods_name ? item.goods.factory_goods_name : item.goods.color_name;
size = item.goods.size_name;
};
result.comments.push({
userName: item.userInfo ? item.userInfo.nickName : '',
desc: descColor ? descColor : '',
color: color || '',
size: size || '',
content: item.content,
time: helpers.dateFormat('YYYY-MM-DD HH:mm:ss', new Date(item.createTime * 1000))
});
... ...
<div class="goods-comments-page yoho-page">
<div class="goods-comments" id="goods-comments">
{{# comments}}
<div class="comment-item">
<div class="comment-item clearfix">
<div class="user-info clearfix">
<span class="user-name">{{userName}}</span>
<span class="goods-spec">&nbsp;购买了&nbsp;&nbsp;{{desc}}</span>
<span class="goods-spec">
购买了<b>{{color}}</b>
</span>
<span class="goods-size">/{{size}}</span>
</div>
<p class="detail-content">{{content}}</p>
<span class="comment-time">{{time}}</span>
</div>
... ...
... ... @@ -9,14 +9,14 @@
<div id="feedback-content" >
<div class="comment-content content ">
{{#if commentsNum}}
<div class="comment-content-main content-main">
<div class="comment-content-main content-main clearfix">
{{# comments}}
<span class="user-name">
{{userName}}
</span>
<span class="goods-spec">
<p class="goods-spec">
购买了{{desc}}
</span>
</>
<p class="detail-content">
{{content}}
</p>
... ...
... ... @@ -9,14 +9,17 @@
<div id="feedback-content" >
<div class="comment-content content ">
{{#if commentsNum}}
<div class="comment-content-main content-main">
<div class="comment-content-main content-main clearfix">
<div class="user-info clearfix">
{{# comments}}
<span class="user-name">
{{userName}}
</span>
<span class="goods-spec">
购买了{{desc}}
购买了<b>{{color}}</b>
</span>
<span class="goods-size">/{{size}}</span>
</div>
<p class="detail-content">
{{content}}
</p>
... ...
... ... @@ -114,6 +114,25 @@
color: $mainFontC;
}
.user-info {
max-width: 100%;
}
.goods-spec {
max-width: 45%;
display: inline-block;
overflow: hidden;
height: 62px;
float: left;
white-space: nowrap;
text-overflow: ellipsis;
}
.goods-size {
float: left;
line-height: 62px;
}
.goods-spec,
.comment-time {
font-size: 24px;
... ...
... ... @@ -696,6 +696,26 @@ $basicBtnC: #eb0313;
color: $mainFontC;
padding-left: 28px;
padding-right: 18px;
float: left;
}
.user-info {
max-width: 100%;
}
.goods-spec {
max-width: 45%;
display: inline-block;
overflow: hidden;
height: 62px;
float: left;
white-space: nowrap;
text-overflow: ellipsis;
}
.goods-size {
float: left;
line-height: 62px;
}
.goods-spec,
... ...