Authored by 王水玲

Merge branch 'feature/comment-reply' into 'release/6.8.4'

评论添加回复



See merge request !409
... ... @@ -107,7 +107,9 @@ function getCommentList(uid, isComment, page, limit) {
url: helpers.image(cm.url, 100, 100),
sourceUrl: helpers.image(cm.url, 400, 400),
height: cm.height,
weight: cm.weight
weight: cm.weight,
reply: cm.reply,
replyTitle: cm.replyTitle
};
});
... ...
... ... @@ -136,6 +136,9 @@
</div>
</div>
{{/if}}
{{# reply}}
<p class="comment-reply"><b>{{../replyTitle}}</b>{{.}}</p>
{{/ reply}}
<p class="color-gray">评论时间:{{createTime}}</p>
</div>
{{/each}}
... ... @@ -171,6 +174,9 @@
<i class="view view-only">查看</i>
</div>
</div>
\{{# reply}}
<p class="comment-reply"><b>\{{../replyTitle}}</b>\{{.}}</p>
\{{/ reply}}
<p class="color-gray">评论时间:\{{createTime}}</p>
</div>
</script>
... ...
... ... @@ -160,7 +160,9 @@ const indexComment = (req, res, next) => {
star: _.get(item, 'satisfied', 1),
comfort: _.get(item, 'size', 'MIDDLE'),
height: _.get(item, 'height', ''),
weight: _.get(item, 'weight', '')
weight: _.get(item, 'weight', ''),
reply: _.get(item, 'reply'),
replyTitle: _.get(item, 'replyTitle')
};
})
});
... ...
... ... @@ -6,40 +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}}
<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}}
... ...
... ... @@ -336,6 +336,16 @@
margin-right: 50px;
}
}
.comment-reply {
background: #f2f2f2;
padding: 15px;
color: #999;
b {
font-weight: bold;
}
}
}
.comment-star {
... ...
... ... @@ -1569,6 +1569,9 @@
}
.comment-detail {
float: left;
width: 700px;
.comment-date {
font-size: 14px;
color: #b0b0b0;
... ... @@ -1631,6 +1634,26 @@
}
}
.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;
... ...