pay.page.js
947 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
var $ = require('yoho-jquery'),
lazyLoad = require('yoho-jquery-lazyload');
var prompt = $('.fraud-prompt');
var fraudTip, scrollVal, onePageH, diff, MyMar;
require('../common');
lazyLoad($('img.lazy'));
function getGender() {
return window.cookie('_Channel') || 'boys';
}
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);
}