Authored by 王水玲

评论回复

... ... @@ -108,7 +108,8 @@ function getCommentList(uid, isComment, page, limit) {
sourceUrl: helpers.image(cm.url, 400, 400),
height: cm.height,
weight: cm.weight,
reply: cm.reply
reply: cm.reply,
replyTitle: cm.replyTitle
};
});
... ...
... ... @@ -137,7 +137,7 @@
</div>
{{/if}}
{{# reply}}
<p class="comment-reply">客服回复:{{.}}</p>
<p class="comment-reply"><b>{{../replyTitle}}</b>{{.}}</p>
{{/ reply}}
<p class="color-gray">评论时间:{{createTime}}</p>
</div>
... ... @@ -174,9 +174,9 @@
<i class="view view-only">查看</i>
</div>
</div>
{{# reply}}
<p class="comment-reply">客服回复:{{.}}</p>
{{/ reply}}
\{{# reply}}
<p class="comment-reply"><b>\{{../replyTitle}}</b>\{{.}}</p>
\{{/ reply}}
<p class="color-gray">评论时间:\{{createTime}}</p>
</div>
</script>
... ...
... ... @@ -161,7 +161,8 @@ const indexComment = (req, res, next) => {
comfort: _.get(item, 'size', 'MIDDLE'),
height: _.get(item, 'height', ''),
weight: _.get(item, 'weight', ''),
reply: _.get(item, 'reply')
reply: _.get(item, 'reply'),
replyTitle: _.get(item, 'replyTitle')
};
})
});
... ...
... ... @@ -6,43 +6,50 @@
<span class="star-{{star}} active"></span>
</span>
</div>
<dl class="pull-right">
{{#if color}}<dd>颜色:{{color}}</dd>{{/if}}
{{#if size}}<dd>{{skuTitle}}{{size}}</dd>{{/if}}
{{#if height}}<dd>身高:{{height}} 厘米</dd>{{/if}}
{{#if weight}}<dd>体重:{{weight}} 公斤</dd>{{/if}}
<dd>尺码符合度:
{{#if_cond comfort "===" "MIDDLE"}}合适{{/if_cond}}
{{#if_cond comfort "===" "SMALL"}}偏小{{/if_cond}}
{{#if_cond comfort "===" "BIG"}}偏大{{/if_cond}}
</dd>
</dl>
<!-- <div style="clear:both"></div> -->
<div class="comment-detail">
<p class="comment">{{comment}}</p>
{{#if url}}
<div class="img-preview">
<a class="img-thumb" href="javascript:void(0);">
<img src="{{image2 url w=70 h=100 mode=1}}" />
</a>
<div class="img-detail">
<dl class="toolbar">
<dd data-role="preview-close"><i class="iconfont">&#xe6cf;</i>收起</dd>
<dd data-role="preview-left"><i class="iconfont">&#xe6d1;</i>向左旋转</dd>
<dd data-role="preview-right"><i class="iconfont">&#xe6d2;</i>向右旋转</dd>
</dl>
<div class="img-wrap">
<img src="{{image2 url w=345 h=345}}" />
<div class="comment-cont">
<dl class="pull-right">
{{#if color}}<dd>颜色:{{color}}</dd>{{/if}}
{{#if size}}<dd>{{skuTitle}}{{size}}</dd>{{/if}}
{{#if height}}<dd>身高:{{height}} 厘米</dd>{{/if}}
{{#if weight}}<dd>体重:{{weight}} 公斤</dd>{{/if}}
<dd>尺码符合度:
{{#if_cond comfort "===" "MIDDLE"}}合适{{/if_cond}}
{{#if_cond comfort "===" "SMALL"}}偏小{{/if_cond}}
{{#if_cond comfort "===" "BIG"}}偏大{{/if_cond}}
</dd>
</dl>
<!-- <div style="clear:both"></div> -->
<div class="comment-detail">
<p class="comment">{{comment}}</p>
{{#if url}}
<div class="img-preview">
<a class="img-thumb" href="javascript:void(0);">
<img src="{{image2 url w=70 h=100 mode=1}}" />
</a>
<div class="img-detail">
<dl class="toolbar">
<dd data-role="preview-close"><i class="iconfont">&#xe6cf;</i>收起</dd>
<dd data-role="preview-left"><i class="iconfont">&#xe6d1;</i>向左旋转</dd>
<dd data-role="preview-right"><i class="iconfont">&#xe6d2;</i>向右旋转</dd>
</dl>
<div class="img-wrap">
<img src="{{image2 url w=345 h=345}}" />
</div>
</div>
</div>
</div>
{{/if}}
{{# reply}}
<p class="comment-reply">客服回复:{{.}}</p>
{{/ reply}}
<span class="comment-date">{{date}}</span>
{{/if}}
{{#unless reply}}
<p class="comment-date">{{date}}</p>
{{/unless}}
</div>
</div>
{{# reply}}
<p class="comment-reply"><b>{{../replyTitle}}</b>{{.}}</p>
<p class="comment-date">{{../date}}</p>
{{/ reply}}
</li>
{{/each}}
... ...
... ... @@ -339,7 +339,12 @@
.comment-reply {
background: #f2f2f2;
padding: 10px;
padding: 15px;
color: #999;
b {
font-weight: bold;
}
}
}
... ...
... ... @@ -1569,6 +1569,9 @@
}
.comment-detail {
float: left;
width: 700px;
.comment-date {
font-size: 14px;
color: #b0b0b0;
... ... @@ -1629,16 +1632,28 @@
vertical-align: top;
}
}
}
.comment-reply {
width: 710px;
padding: 10px;
background: #f2f2f2;
line-height: 20px;
margin-bottom: 10px;
.comment-reply {
width: 850px;
padding: 15px;
background: #f0f0f0;
line-height: 20px;
margin-bottom: 10px;
font-size: 14px;
color: #999;
b {
font-weight: bold;
}
}
.comment-cont {
height: auto;
overflow: hidden;
word-break: break-word;
}
dl {
line-height: 1.5;
color: #999;
... ...