Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (isFirstReadDone) {
var overPageDistance = (articleContent.offsetTop + articleContent.offsetHeight)
- viewport.getHeight();
if (overPageDistance < 0) {
// 正文内容不超过一屏
log.trace(['appArticleDetail', '{' + tpId + '}', '{' + contentId + '}', 'done']);
isFirstReadDone = false;
}
else if (scrollDistance >= overPageDistance) {
log.trace(['appArticleDetail', '{' + tpId + '}', '{' + contentId + '}', 'done']);
isFirstReadDone = false;
}
}
}
scrollHandle();
viewport.on('scroll', scrollHandle);
}
// $('.listArticle').on('click', function () {
// log.trace(['cambrian', 'listArticle']);
// });
// $('video').on('play', function () {
// log.trace(['cambrian', 'detailVideo']);
// });
// $('[data-role="j-recommend-download"]').on('click', function () {
// log.trace(['cambrian', 'recommendDownload']);
// });
})();
};
windowScroll: function (data, ele) {
storage.rm('usFlag');
// 滚动事件
viewport.on('scroll', function () {
if (storage.get('usFlag') === 'true') {
return false;
}
zxbjPage.method.scrollFun(data, ele);
});
},
changeHtml: function (obj, ele) {
windowScroll: function (data, ele) {
storage.rm('usFlag');
// 滚动事件
viewport.on('scroll', function () {
if (storage.get('usFlag') === 'true') {
return false;
}
zxbjPage.method.scrollFun(data, ele);
});
},
changeHtml: function (obj, ele) {
bindEvent: function () {
var that = this;
if (that.event === 'click') {
that.$btn && that.$btn.on('click', function () {
that.control();
});
} else {
var dis = that.bottomDistance;
viewport.on('scroll', function () {
if (viewport.getHeight() + viewport.getScrollTop() >= viewport.getScrollHeight() - dis) {
that.control();
}
});
}
},
control: function () {
bindEvent: function () {
var that = this;
if (that.event === 'click') {
that.$btn && that.$btn.on('click', function () {
that.control();
});
} else {
var dis = that.bottomDistance;
viewport.on('scroll', function () {
if (viewport.getHeight() + viewport.getScrollTop() >= viewport.getScrollHeight() - dis) {
that.$parentBox.is(':visible') && that.control();
}
});
}
},
control: function () {