Authored by 郭成尧

bottom-handle

... ... @@ -97,12 +97,13 @@ function diXuanFuInit() {
let $bottomFixClickArea = $('#bottomFixClickArea');
let $bottomPerShow = $('.per-show');
let href = '//activity.yoho.cn/featurebottombar/';
let currentClickElem;
let currentElemclickTimes = 0;
if (location.hostname === 'm.yohobuy.com') {
href = '//m.yohobuy.com/activity/featurebottombar/';
}
$bottomPerShow.css('bottom', $bottomFixClickArea.height());
$bottomFixClickArea.children().each((index, elem) => {
... ... @@ -112,11 +113,19 @@ function diXuanFuInit() {
$bottomShow.load(href + pageId + '.html');
$('#bottomClick' + pageId).on('click', () => {
$bottomPerShow.addClass('hide');
if ($bottomShow.hasClass('hide')) {
$bottomShow.removeClass('hide');
if (currentClickElem === pageId && currentElemclickTimes > 1) {
currentElemclickTimes = 0;
} else {
$bottomShow.removeClass('hide');
}
} else {
$bottomShow.addClass('hide');
}
currentClickElem = pageId;
currentElemclickTimes++;
});
});
... ...
... ... @@ -17,6 +17,14 @@
.per-show {
position: fixed;
.bottom-bar-item {
position: relative;
.anchor {
position: absolute;
}
}
}
.hide {
... ...