Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuy-node
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
1
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
刘传洋
8 years ago
Commit
7149ddbe1f671846e7076ab99c73cee79ce310f7
1 parent
331fc3e7
commit show
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
16 additions
and
9 deletions
apps/home/models/comment.js
apps/home/views/action/comment.hbs
public/img/home/comment-order.jpg
public/js/home/comment.page.js
public/scss/home/_comment.css
apps/home/models/comment.js
View file @
7149ddb
...
...
@@ -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,
order
Id
:
orderId
,
order
Num
:
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
);
...
...
apps/home/views/action/comment.hbs
View file @
7149ddb
...
...
@@ -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>
...
...
public/img/home/comment-order.jpg
0 → 100644
View file @
7149ddb
11.4 KB
public/js/home/comment.page.js
View file @
7149ddb
...
...
@@ -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
;
}
...
...
public/scss/home/_comment.css
View file @
7149ddb
...
...
@@ -38,6 +38,10 @@
}
.comment
.title
{
background-image
:
resolve
(
"home/comment.png"
);
&.comment-order
{
background-image
:
resolve
(
"home/comment-order.png"
);
}
}
.me-comment
{
...
...
Please
register
or
login
to post a comment