Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYWAP
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
Lynnic
9 years ago
Commit
c858cb1c8dbd0612ddc27a161fdef15cc558e3c4
1 parent
41376416
商品详情页 评价列表页面修改 -- code reviewed LiangZhifeng
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
41 additions
and
29 deletions
docs/data-structure.md
static/js/product/detail/comments-consults.js
static/sass/product/_comments-consults.scss
static/sass/product/_detail.scss
template/m.yohobuy.com/actions/product/detail/comments.phtml
template/m.yohobuy.com/partials/product/feedback-tab.phtml
docs/data-structure.md
View file @
c858cb1
...
...
@@ -1113,7 +1113,8 @@
'feedbacks' : {
'commentsNum' : 0,
'consultsNum' : 1,
'link' : '',
'commentsUrl' : '',
'consultsUrl' : '',
'comments' : [
{
'userName' : 'Lynnic',
...
...
@@ -1243,6 +1244,20 @@
'id' : '',
'preferenceUrl' :''
}
### 评价列表页面
{
'comments':{
'list' :
[
{
'userName':'',
'desc':'',
'content':'',
'time':''
}
...
]
}
}
### 咨询列表页面
{
'link' : '咨询表单跳转url',
...
...
static/js/product/detail/comments-consults.js
View file @
c858cb1
...
...
@@ -9,10 +9,7 @@ var $ = require('jquery'),
var
commentsNum
,
consultsNum
;
var
consultFooterEle
=
$
(
'.consult-content-footer'
)[
0
],
consultFooterHammer
=
consultFooterEle
&&
new
Hammer
(
consultFooterEle
),
navtabEle
=
document
.
getElementById
(
'nav-tab'
),
var
navtabEle
=
document
.
getElementById
(
'nav-tab'
),
navtabHammer
=
navtabEle
&&
new
Hammer
(
navtabEle
),
gotoConsultEle
=
document
.
getElementById
(
'goto-consult'
),
...
...
@@ -66,12 +63,6 @@ if (navtabHammer) {
});
}
if
(
consultFooterHammer
)
{
consultFooterHammer
.
on
(
'tap'
,
function
()
{
location
.
href
=
$
(
consultFooterEle
).
data
(
'href'
);
});
}
if
(
gotoConsultHammer
)
{
gotoConsultHammer
.
on
(
'tap'
,
function
()
{
location
.
href
=
$
(
gotoConsultEle
).
data
(
'href'
);
...
...
static/sass/product/_comments-consults.scss
View file @
c858cb1
...
...
@@ -168,9 +168,6 @@
&
.focus
{
color
:
#000
;
}
.comments-num
{
display
:
none
;
}
}
.comment-nav
{
border-right
:
1px
solid
#ccc
;
...
...
@@ -286,17 +283,16 @@
.comment-content-footer
,
.consult-content-footer
{
display
:
block
;
min-height
:
pxToRem
(
88px
);
text-align
:
center
;
background-color
:
#fff
;
border-bottom
:
1px
solid
$borderC
;
line-height
:
pxToRem
(
88px
);
font-size
:
pxToRem
(
28px
);
a
{
color
:
#b0b0b0
;
.iconfont
{
font-size
:
inherit
;
}
color
:
#b0b0b0
;
.iconfont
{
font-size
:
inherit
;
}
}
...
...
static/sass/product/_detail.scss
View file @
c858cb1
...
...
@@ -250,8 +250,15 @@ $basicBtnC:#eb0313;
padding-right
:
pxToRem
(
28px
);
border-bottom
:
1px
solid
$borderC
;
background-color
:
$pageBgC
;
display
:
flex
;
align-items
:
center
;
@include
flexbox
((
box-flex
:
1
.0
,
display
:
box
,
box-align
:
center
)
,
$version
:
1
);
@include
flexbox
((
display
:
flex
,
align-items
:
center
));
span
{
// display: table-cell;
display
:
-
webkit-box
;
...
...
template/m.yohobuy.com/actions/product/detail/comments.phtml
View file @
c858cb1
...
...
@@ -8,7 +8,7 @@
{
{userName
}
}
</span>
<span
class=
"goods-spec"
>
{
{desc
}
}
购买了
{
{desc
}
}
</span>
<p
class=
"detail-content"
>
{
{content
}
}
...
...
template/m.yohobuy.com/partials/product/feedback-tab.phtml
View file @
c858cb1
<ul id="nav-tab" class="nav-tab clearfix">
<li class="comment-nav tap-hightlight">商品评价
<span class="comments-num">{{commentsNum}}</span>
</li>
<li class="comment-nav tap-hightlight">商品评价
(<span class="comments-num">{{commentsNum}}</span>)
</li>
<li class="consult-nav tap-hightlight">购买咨询(<span class="consults-num">{{consultsNum}}</span>)</li>
</ul>
<div id="feedback-content" >
...
...
@@ -21,6 +21,10 @@
</span>
{{/ comments}}
</div>
<a class="comment-content-footer tap-hightlight" href="{{commentsUrl}}">
查看更多
<span class="iconfont"></span>
</a>
{{^}}
<div class="comment-content-main content-main no-item">
<span class="iconfont"></span>暂无评论
...
...
@@ -46,17 +50,16 @@
</div>
{{/ consults}}
</div>
<div class="consult-content-footer tap-hightlight" data-href="{{link}}">
<a href="javascript:;">
查看更多
<span class="iconfont"></span></a>
</div>
<a class="consult-content-footer tap-hightlight" href="{{consultsUrl}}">
查看更多
<span class="iconfont"></span>
</a>
{{else}}
<div class="consult-content-main content-main no-item">
<span class="iconfont"></span>暂无咨询
</div>
<div class="consult-content-footer tap-hightlight" data-href="{{
l
ink}}">
<div class="consult-content-footer tap-hightlight" data-href="{{
commentsL
ink}}">
<a href="javascript:;">
我要咨询
<span class="iconfont"></span></a>
...
...
Please
register
or
login
to post a comment