Authored by 刘传洋

comment

... ... @@ -74,7 +74,8 @@ exports.getCommentList = (uid, isComment, page, limit) => {
goodsId: v.goodsId,
erpSkuId: v.erpSkuId,
orderId: value.orderId,
orderCode: value.orderCode
orderCode: value.orderCode,
orderTime: value.createTime
};
if (v.commentDetailBoDetail && v.commentDetailBoDetail.length > 0) {
... ... @@ -164,7 +165,7 @@ exports.getCommentList4Order = (uid, orderId) => {
let order = {
// orderNum: value.orderCode,
// orderTime: value.createTime,
orderId: orderId,
orderNum: orderId,
goods: []
};
... ... @@ -180,7 +181,9 @@ exports.getCommentList4Order = (uid, orderId) => {
goodsId: v.goodsId,
erpSkuId: v.erpSkuId,
orderCode: v.orderCode,
orderId: v.orderId
orderId: v.orderId,
orderTime: _.get(v, 'orderCreateTime') ?
moment(_.get(v, 'orderCreateTime') * 1000).format('YYYY-MM-DD HH:mm:ss') : ''
};
order.goods.push(good);
... ...
... ... @@ -3,7 +3,7 @@
{{> navigation}}
<div class="me-main">
<div class="comment block">
<h2 class="title"></h2>
<h2 class="title {{#if isFromOrder}}comment-order{{/if}}"></h2>
{{#with comment}}
<div class="me-comment">
... ... @@ -45,7 +45,7 @@
</td>
<td>
<a href="{{href}}" class="name">{{name}}</a>
<div>下单时间{{../orderTime}}</div>
<div>下单时间{{orderTime}}</div>
</td>
<td style="width:50%" class="center">
<button class="btn active radius" data-role="showCommentForm">评价商品</button>
... ...
... ... @@ -76,13 +76,13 @@ $('.comment-add').on('click', '.btn-submit', function() {
return;
}
if (param.height && !/^\d*$/.test(param.height)) {
alert('身高必须为数字');
if (param.height && !/^\d{0,3}$/.test(param.height)) {
alert('身高必须为最大3位数的数字');
return;
}
if (param.weight && !/^\d*$/.test(param.weight)) {
alert('体重必须为数字');
if (param.weight && !/^\d{0,3}$/.test(param.weight)) {
alert('体重必须为最大3位数的数字');
return;
}
... ...
... ... @@ -38,6 +38,10 @@
}
.comment .title {
background-image: resolve("home/comment.png");
&.comment-order {
background-image: resolve("home/comment-order.jpg");
}
}
.me-comment {
... ...