// 配置参数
const itemsPerPage = 10; // 每页显示的文本条数
const pageStayDuration = 2000; // 每页停留时间,单位毫秒
const platforms = [
"CCCALFA.com",
"AAAALFA.com",
"111ALFA.com",
"333alfa.com",
"555alfa.com",
"666alfa.com",
"999alfa.com",
"OLAALFA.com",
"xuxa777.com",
"tampg.com",
"vult777.com",
"belapg.com",
"Liz777.bet",
"rbd777.com",
"OXXO777.COM",
"ampm777.com",
"LUPO777.com",
]; // 平台列表
// 生成随机数据
function generateMessages(count) {
const messages = [];
for (let i = 0; i < count; i++) {
// 随机生成1-10小时之前的时间
const hoursAgo = Math.floor(Math.random() * 10) + 11;
// 随机生成0-59分钟
const minutesAgo = Math.floor(Math.random() * 60);
// 随机生成0-59秒
const secondsAgo = Math.floor(Math.random() * 60);
// 计算最终时间
const time = new Date(new Date().getTime() - hoursAgo * 60 * 60 * 1000 - minutesAgo * 60 * 1000 - secondsAgo * 1000)
.toLocaleString('pt-BR', { hour12: false });
const memberId = `***${Math.floor(Math.random() * 1000).toString().padStart(3, '0')}**${Math.floor(Math.random() * 100).toString().padStart(2, '0')}`;
const platform = platforms[Math.floor(Math.random() * platforms.length)];
const profit = generateProfit(); // 使用权重生成盈利金额
messages.push({time, memberId, platform, profit});
}
return messages;
}
// 根据权重生成盈利金额
function generateProfit() {
const weights = { 'twoDigits': 3, 'threeDigits': 3, 'fourDigits': 3, 'fiveDigits': 1 };
const totalWeight = Object.values(weights).reduce((acc, weight) => acc + weight, 0);
const rand = Math.random() * totalWeight;
let sum = 0;
for (const [key, weight] of Object.entries(weights)) {
sum += weight;
if (rand <= sum) {
switch (key) {
case 'twoDigits':
return Math.floor(Math.random() * (99 - 50 + 1)) + 50;
case 'threeDigits':
return Math.floor(Math.random() * (999 - 100 + 1)) + 100;
case 'fourDigits':
return Math.floor(Math.random() * (9999 - 1000 + 1)) + 1000;
case 'fiveDigits':
return Math.floor(Math.random() * (99999 - 10000 + 1)) + 10000;
}
}
}
}
const messages = generateMessages(100); // 生成120条数据
function paginate(array, pageSize) {
return array.reduce((acc, value, index) => {
let pageIndex = Math.floor(index / pageSize);
if (!acc[pageIndex]) {
acc[pageIndex] = [];
}
acc[pageIndex].push(value);
return acc;
}, []);
}
function showPage(pages, pageIndex) {
const list = document.getElementById('slideList');
list.innerHTML = ''; // 清空当前页
pages[pageIndex].forEach(({time, memberId, platform, profit}) => {
const listItem = document.createElement('li');
listItem.className = 'slide-item';
listItem.innerHTML = `${time}${memberId}${platform}R$${profit}`;
list.appendChild(listItem);
});
// 循环显示下一页
setTimeout(() => {
const nextPageIndex = (pageIndex + 1) % pages.length;
showPage(pages, nextPageIndex);
}, pageStayDuration);
}
function toUrl(e){
window.open('https://' + $(e).text(), "_blank");
}
document.addEventListener("DOMContentLoaded", () => {
const pages = paginate(messages, itemsPerPage);
showPage(pages, 0);
});