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
biao
9 years ago
Commit
a201ad11e4b1f6ff7cc7fb0098132c487a58c0d0
1 parent
31dd877a
show stander bottom when there is fixed bottom element on page
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
6 deletions
static/js/common.js
static/js/home/home.js
static/js/product/detail/detail.js
static/js/common.js
View file @
a201ad1
...
...
@@ -106,6 +106,20 @@ function rePosFooter() {
}
}
/**
*
* add extra margin-bottom for footer to show yoho copyright when there is fixed bottom element on page
* @param {String} The jquery selecor of the fixed bottom element
* @return undefined
*/
function
reMarginFooter
(
fixedElement
)
{
var
fixedElH
=
$
(
fixedElement
).
outerHeight
();
if
(
fixedElement
){
$footer
.
css
(
'margin-bottom'
,
fixedElH
+
'px'
);
}
}
//页面通用底部位置及status设置
(
function
()
{
var
$op
=
$footer
.
children
(
'.op-row'
);
...
...
@@ -215,3 +229,5 @@ window.getUid = getUid;
window
.
getShoppingKey
=
getShoppingKey
;
window
.
rePosFooter
=
rePosFooter
;
window
.
reMarginFooter
=
reMarginFooter
;
...
...
static/js/home/home.js
View file @
a201ad1
...
...
@@ -221,9 +221,7 @@ $('.home-header .iconfont').on('touchstart', function() {
});
// 底部留出tab 的高度
$
(
'#yoho-footer'
).
css
({
'margin-bottom'
:
'2.5rem'
});
window
.
reMarginFooter
(
'.footer-tab'
);
//set cookie
exports
.
set
=
function
(
c
)
{
...
...
@@ -231,4 +229,4 @@ exports.set = function(c) {
expires
:
365
,
domain
:
'.m.yohobuy.com'
});
};
\ No newline at end of file
};
...
...
static/js/product/detail/detail.js
View file @
a201ad1
...
...
@@ -15,7 +15,8 @@ var goodsSwiper,
require
(
'./desc'
);
require
(
'./comments-consults'
);
//add extra marign-bottom for footer to show the yoho copyright
window
.
reMarginFooter
(
'.cart-bar'
);
lazyLoad
(
$
(
'img.lazy'
));
...
...
@@ -46,4 +47,4 @@ $('.goodsDiscount .dropdown').on('click', function() {
$discountFolder
.
slideUp
();
}
});
require
(
'./like'
);
\ No newline at end of file
require
(
'./like'
);
...
...
Please
register
or
login
to post a comment