|
|
var $ = require('yoho-jquery'),
|
|
|
lazyLoad = require('yoho-jquery-lazyload');
|
|
|
|
|
|
var prompt = $('.fraud-prompt'), fraudTip, scrollVal, onePageH, diff, MyMar;
|
|
|
|
|
|
require('../common');
|
|
|
|
|
|
lazyLoad($('img.lazy'));
|
...
|
...
|
@@ -14,3 +16,25 @@ require('../channel/maybe-like')(getGender()); |
|
|
if ($('#goods-list').length === 0) {
|
|
|
$('.maybe-like').hide();
|
|
|
}
|
|
|
|
|
|
if ($('.fraud-tip').height() > $('.fraud-prompt').height()) {
|
|
|
var speed = 40;
|
|
|
|
|
|
$('.fraud-prompt').append('<div class="fraud-tip">' + $('.fraud-tip').html() + '</div>');
|
|
|
|
|
|
fraudTip = $('.fraud-tip').eq(1);
|
|
|
|
|
|
function Marquee() {
|
|
|
prompt.scrollTop(prompt.scrollTop() + 1);
|
|
|
|
|
|
scrollVal = prompt.scrollTop();
|
|
|
onePageH = fraudTip[0].offsetTop;
|
|
|
diff = onePageH - scrollVal;
|
|
|
|
|
|
if (diff <= 0) {
|
|
|
prompt.scrollTop(Math.abs(diff));
|
|
|
}
|
|
|
}
|
|
|
|
|
|
MyMar = setInterval(Marquee, speed);
|
|
|
} |
|
|
\ No newline at end of file |
...
|
...
|
|