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
Plain Diff
Browse Files
Authored by
biao
9 years ago
Commit
508294e79d09c7a78f4150925fa9adc137c0316e
2 parents
05c58e31
92a48ebe
merge detail page update. code review by XWG
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
12 deletions
static/js/product/detail/detail.js
static/js/product/detail/detail.js
View file @
508294e
...
...
@@ -12,13 +12,17 @@ var goodsSwiper,
$discountFolder
=
$
(
'.goodsDiscount .discount-folder'
),
$discountArrow
=
$
(
'.goodsDiscount .first-item span'
);
var
goodsDiscountHammer
=
new
Hammer
(
document
.
getElementById
(
'goodsDiscount'
));
var
goodsDiscountEl
=
document
.
getElementById
(
'goodsDiscount'
),
goodsDiscountHammer
=
goodsDiscountEl
&&
new
Hammer
(
goodsDiscountEl
);
require
(
'./desc'
);
require
(
'./comments-consults'
);
//add extra marign-bottom for footer to show the yoho copyright
window
.
reMarginFooter
(
'.cart-bar'
);
function
showFooter
()
{
window
.
reMarginFooter
(
'.cart-bar'
);
}
lazyLoad
(
$
(
'img.lazy'
));
...
...
@@ -40,15 +44,19 @@ if (0 === $('.goodsDiscount .discount-folder').children().length) {
}
//goods-discount下拉按钮点击事件
goodsDiscountHammer
.
on
(
'tap'
,
function
(
e
)
{
if
(
$discountFolder
.
is
(
':hidden'
))
{
$discountArrow
.
removeClass
(
'icon-down'
).
addClass
(
'icon-up'
).
html
(
''
);
$discountFolder
.
slideDown
();
}
else
{
$discountArrow
.
removeClass
(
'icon-up'
).
addClass
(
'icon-down'
).
html
(
''
);
$discountFolder
.
slideUp
();
}
return
false
;
});
if
(
goodsDiscountHammer
)
{
goodsDiscountHammer
.
on
(
'tap'
,
function
(
e
)
{
if
(
$discountFolder
.
is
(
':hidden'
))
{
$discountArrow
.
removeClass
(
'icon-down'
).
addClass
(
'icon-up'
).
html
(
''
);
$discountFolder
.
slideDown
();
}
else
{
$discountArrow
.
removeClass
(
'icon-up'
).
addClass
(
'icon-down'
).
html
(
''
);
$discountFolder
.
slideUp
();
}
return
false
;
});
}
require
(
'./like'
);
$
(
document
).
ready
(
showFooter
);
...
...
Please
register
or
login
to post a comment