(function(){ var data = [{"id":123,"title":"\u5e7f\u544a\u62db\u79df","icon":"https://wx2.shop/uploads/image/20261102/ef8bcf4db81643b54d4ae49fed3bb3fb.png","url":"http://91d.shop/"},{"id":121,"title":"pg2","icon":"https://wx2.shop/uploads/image/20261101/0110fcd06de0fd5baf747e41c17723ce.gif","url":"https://aass6p21.snackoften.com/?channel=21522237"},{"id":119,"title":"23","icon":"https://wx2.shop/uploads/image/20261101/8a08e94fc5a522074eafef4d1a4dc88a.gif","url":"https://www.vpq7g.com/"},{"id":118,"title":"\u6fb3\u95e8","icon":"https://wx2.shop/uploads/image/20261101/9767ff20945917322d20121139c0f9c2.gif","url":"https://pen-y0uo-1ili.amtk66.top/#amtk135"},{"id":117,"title":"\u5927\u53d1","icon":"https://wx2.shop/uploads/image/20261101/0f36fc6fd2707e84c9906c3749923387.gif","url":"https://8588kk09.skymakerlife.com/?channel=22311147"},{"id":116,"title":"pg\u5a31\u4e50\u57ce","icon":"https://wx2.shop/uploads/image/20261101/b89178ae3b42937dd387127627e32858.gif","url":"https://194d.2146613.cc/"},{"id":115,"title":"\u7ea2\u679c\u89c6\u9891","icon":"https://wx2.shop/uploads/image/20261101/2e9af89288c78c21c6d66489d21125b1.gif","url":"https://ttqqqjjjqqqqvipvipooowwdtvtv.hongguotuiguang.\u6709\u7f18\u7ea2\u679c\u7f51\u65d7\u8230\u5e97.com:3264/?channelCode=gg385"},{"id":114,"title":"\u5f69\u7968\u7f51","icon":"https://wx2.shop/uploads/image/20261101/9ba7204afad6b453a14daa519b00d732.gif","url":"https://149.104.142.203:8122/?93347711"},{"id":101,"title":"1","icon":"https://wx2.shop/uploads/image/20261031/20bc6f11b8ff54d179992ea58dbc3ae6.gif","url":"https://eyfxv.xxadtr.com/?158143"}]; var cls = 'hw_bs_4394'; var html = ''; html += '
'; document.write(html); var list = document.getElementById(cls+'_list'); var dotsBox = document.getElementById(cls+'_dots'); var len = data.length; var idx = 0; var PER_PAGE = 10; // 一次显示5条,修正 var timer = null; var startX = 0; function render(){ list.innerHTML = ''; for(var i=idx;i' : ''; list.innerHTML += ''+img+''; } list.style.transform = 'translateX(0)'; dotsBox.innerHTML = ''; var totalPages = Math.ceil(len / PER_PAGE); var currentPage = Math.floor(idx / PER_PAGE); for(var j=0;j= len) idx = 0; render(); } function prev(){ idx -= PER_PAGE; if(idx < 0) idx = Math.max(0, len - PER_PAGE); render(); } function resetTimer(){ clearInterval(timer); timer=setInterval(next, 4000); } render(); resetTimer(); var view = list.parentElement; view.onmouseenter = function(){ clearInterval(timer); }; view.onmouseleave = resetTimer(); document.getElementById(cls+'_prev').onclick = function(){ prev(); resetTimer(); }; document.getElementById(cls+'_next').onclick = function(){ next(); resetTimer(); }; list.addEventListener('touchstart', function(e){ startX = e.touches[0].pageX; }); list.addEventListener('touchend', function(e){ var dx = e.changedTouches[0].pageX - startX; if(Math.abs(dx) > 40){ dx < 0 ? next() : prev(); resetTimer(); } }); })();