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
242ded69a760e48fa77b577e843a913233c2811f
1 parent
b4a1c43b
评论回复
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
75 additions
and
46 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 @
242ded6
...
...
@@ -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
};
});
...
...
apps/home/views/action/comment.hbs
View file @
242ded6
...
...
@@ -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>
...
...
apps/product/controllers/detail.js
View file @
242ded6
...
...
@@ -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'
)
};
})
});
...
...
public/hbs/product/comment-item.hbs
View file @
242ded6
...
...
@@ -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"
>

</i>
收起
</dd>
<dd
data-role=
"preview-left"
><i
class=
"iconfont"
>

</i>
向左旋转
</dd>
<dd
data-role=
"preview-right"
><i
class=
"iconfont"
>

</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"
>

</i>
收起
</dd>
<dd
data-role=
"preview-left"
><i
class=
"iconfont"
>

</i>
向左旋转
</dd>
<dd
data-role=
"preview-right"
><i
class=
"iconfont"
>

</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
}}
...
...
public/scss/home/_comment.css
View file @
242ded6
...
...
@@ -339,7 +339,12 @@
.comment-reply
{
background
:
#f2f2f2
;
padding
:
10px
;
padding
:
15px
;
color
:
#999
;
b
{
font-weight
:
bold
;
}
}
}
...
...
public/scss/product/_detail.css
View file @
242ded6
...
...
@@ -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
;
...
...
Please
register
or
login
to post a comment