Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
2
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
Lynnic
9 years ago
Commit
3aa4b50c119569ead4314533c0f5df860cf17c51
1 parent
a09ca062
更新
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
12 deletions
static/js/product/detail/detail.js
static/js/product/detail/detail.js
View file @
3aa4b50
...
...
@@ -30,21 +30,23 @@ goodsSwiper = new Swiper('.banner-swiper', {
//初始化tab
(
function
()
{
commentsNum
=
$
(
'#nav-tab .comments-num'
).
html
()
-
0
;
var
consultsNum
=
$
(
'#nav-tab .consults-num'
).
html
()
-
0
;
var
consultsNum
=
$
(
'#nav-tab .consults-num'
).
html
()
-
0
;
commentsNum
=
$
(
'#nav-tab .comments-num'
).
html
()
-
0
;
$
(
'#nav-tab li'
).
each
(
function
()
{
$
(
this
).
removeClass
(
'focus'
);
});
});
$
(
'#feedback-content .content'
).
each
(
function
()
{
$
(
this
).
addClass
(
'hide'
);
$
(
this
).
addClass
(
'hide'
);
});
if
(
0
!=
commentsNum
)
{
if
(
0
!==
commentsNum
)
{
$
(
'#nav-tab .comment-nav'
).
addClass
(
'focus'
);
$
(
'#feedback-content .comment-content'
).
removeClass
(
'hide'
);
}
else
if
(
0
!=
consultsNum
)
{
}
else
if
(
0
!==
consultsNum
)
{
$
(
'#nav-tab .consult-nav'
).
addClass
(
'focus'
);
$
(
'#feedback-content .consult-content'
).
removeClass
(
'hide'
);
}
...
...
@@ -53,9 +55,9 @@ goodsSwiper = new Swiper('.banner-swiper', {
$
(
'#nav-tab li'
).
on
(
'click'
,
function
()
{
var
index
=
$
(
this
).
index
();
if
(
$
(
this
).
hasClass
(
'comment-nav'
)
&&
0
==
commentsNum
)
{
if
(
$
(
this
).
hasClass
(
'comment-nav'
)
&&
0
===
commentsNum
)
{
alert
(
'暂无商品评价'
);
}
else
{
}
else
{
if
(
!
$
(
this
).
hasClass
(
'focus'
))
{
$
(
'#nav-tab li'
).
each
(
function
()
{
...
...
@@ -67,14 +69,14 @@ $('#nav-tab li').on('click', function() {
$
(
this
).
addClass
(
'focus'
);
$
(
'#feedback-content .content:eq('
+
index
+
')'
).
removeClass
(
'hide'
);
}
}
}
});
$
(
'.goodsDiscount .dropdown'
).
on
(
'click'
,
function
()
{
if
(
$
(
'.goodsDiscount .discount-folder'
).
is
(
':hidden'
))
{
$
(
'.goodsDiscount .dropdown'
).
on
(
'click'
,
function
()
{
if
(
$
(
'.goodsDiscount .discount-folder'
).
is
(
':hidden'
))
{
$
(
'.goodsDiscount .discount-folder'
).
slideDown
();
}
else
{
}
else
{
$
(
'.goodsDiscount .discount-folder'
).
slideUp
();
}
});
...
...
Please
register
or
login
to post a comment