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
王水玲
6 years ago
Commit
b4a1c43bf03558cca5b2db5d16dcc647912889eb
1 parent
9fac412a
评论添加回复展示
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
26 additions
and
2 deletions
apps/home/models/comment.js
apps/home/views/action/comment.hbs
apps/product/controllers/detail.js
public/hbs/product/comment-item.hbs
public/scss/home/_comment.css
public/scss/product/_detail.css
apps/home/models/comment.js
View file @
b4a1c43
...
...
@@ -107,7 +107,8 @@ 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
};
});
...
...
apps/home/views/action/comment.hbs
View file @
b4a1c43
...
...
@@ -136,6 +136,9 @@
</div>
</div>
{{/if}}
{{#
reply
}}
<p
class=
"comment-reply"
>
客服回复:
{{
.
}}
</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">客服回复:
{{
.
}}
</p>
{{/
reply
}}
<p class="color-gray">评论时间:\{{
createTime
}}
<
/p
>
<
/div
>
</script>
...
...
apps/product/controllers/detail.js
View file @
b4a1c43
...
...
@@ -160,7 +160,8 @@ 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'
)
};
})
});
...
...
public/hbs/product/comment-item.hbs
View file @
b4a1c43
...
...
@@ -38,6 +38,9 @@
</div>
</div>
{{/if}}
{{#
reply
}}
<p
class=
"comment-reply"
>
客服回复:
{{
.
}}
</p>
{{/
reply
}}
<span
class=
"comment-date"
>
{{
date
}}
</span>
</div>
</li>
...
...
public/scss/home/_comment.css
View file @
b4a1c43
...
...
@@ -336,6 +336,11 @@
margin-right
:
50px
;
}
}
.comment-reply
{
background
:
#f2f2f2
;
padding
:
10px
;
}
}
.comment-star
{
...
...
public/scss/product/_detail.css
View file @
b4a1c43
...
...
@@ -1629,6 +1629,14 @@
vertical-align
:
top
;
}
}
.comment-reply
{
width
:
710px
;
padding
:
10px
;
background
:
#f2f2f2
;
line-height
:
20px
;
margin-bottom
:
10px
;
}
}
dl
{
...
...
Please
register
or
login
to post a comment