UNPKG

lixin-web

Version:

vue and bootstrap

208 lines (205 loc) 9.99 kB
<!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="UTF-8"> <title>永信娱乐线路检测中心</title> <meta name="viewport" content="width=device-width, initial-scale=1.0,user-scalable=no"> <!-- inject:icon --><!-- endinject --> <!-- build:css dist/css/lx.min.css --> <!--<link rel="stylesheet" href="dist/css/lx.min.css">--> <!-- endbuild --> <!--[if IE 9]><script src="module/respond.matchmedia.addListener.min.js"></script> <![endif]--> <!-- build:remove --> <script src="dist/js/layout.bundle.js"></script> <!-- endbuild --> <style> .bar{ display: none; } a:hover{text-decoration: none;} .head{height: 86px;background: #2ba7e7;color: #fff;font-size: 32px;line-height: 86px;} .head .center-block{width: 388px;padding-left: 66px;background: url("img/sample/console/logo2.png") no-repeat 0 16px;} .body{background: url("img/sample/console/pingbg.jpg") no-repeat center;height: 754px;background-size: auto;position: relative;} .body .container{background: url("img/sample/console/pingtime.png") no-repeat center 84px; height: 754px;} .body .container .tip{font-size: 20px;color: #fff;width: 440px;padding-top: 10px;} .body .container .urllist{margin-top: 160px;color: #fff;margin-left: 20px;} .body .container .urllist li{float: left;margin: 0 20px;list-style: none;} .body .container .urllist li a{display: block;width: 94px;height: 26px;border: 1px solid #78d640;line-height: 26px;text-align: center;border-radius: 16px;margin-top: 8px;color: #78d640;} .body .container .timelist{margin-left: 66px;} .body .container .timelist li{list-style: none;width: 134px;color: #fff;font-size: 26px;float: left;text-align: center;} .body .container .timelist li:first-child{margin-top: 344px;color: #b0a1e9;} .body .container .timelist li:nth-child(2){margin-top: 294px;color: #b0a1e9;} .body .container .timelist li:nth-child(3){margin-top: 246px;color: #78d640;} .body .container .timelist li:nth-child(4){margin-top: 216px;color: #78d640;} .body .container .timelist li:nth-child(5){margin-top: 180px;color: #64c4c9;} .body .container .timelist li:nth-child(6){margin-top: 142px;color: #64c4c9;} .body .container .timelist li:nth-child(7){margin-top: 104px;color: #ecba6e;} .body .container .timelist li:nth-child(8){margin-top: 62px;color: #ecba6e;} .body .container .ipt{width: 212px;height: 40px;line-height: 40px;text-align: center;cursor: pointer;background: #ecc800;border-radius: 20px;margin-top: 30px;} .description{padding-top: 15px;font-size: 12px;} .description i{margin-right: 4px;color: red;} .description .browser{background: url("img/sample/console/browserlogo.jpg") no-repeat;width: 532px;height: 118px;margin-top: 16px;} .foot{height: 40px;background: #eee;line-height: 40px;font-size: 12px;} .foot .center-block{width: 428px;} </style> </head> <body> <div class="bar"></div> <div class="container-fluid head"> <div class="container"> <div class="center-block">永信娱乐线路检测中心</div> </div> </div> <div class="container-fluid body"> <div class="container"> <div class="tip center-block">温馨提示:反应时间越小,网站速度越快越在前面</div> <div class="clearfix"> <ul class="timelist clearfix"> <li>0</li> <li>0</li> <li>0</li> <li>0</li> <li>0</li> <li>0</li> <li>0</li> <li>0</li> </ul> <ul class="urllist"> <li class="text-center"> <span>lx66.com</span> <a href="http://lx66.com">进入网站</a> </li> <li class="text-center"> <span>lx66.com</span> <a href="http://lx66.com">进入网站</a> </li> <li class="text-center"> <span>lx66.com</span> <a href="http://lx66.com">进入网站</a> </li> <li class="text-center"> <span>lx66.com</span> <a href="http://lx66.com">进入网站</a> </li> <li class="text-center"> <span>lx66.com</span> <a href="http://lx66.com">进入网站</a> </li> <li class="text-center"> <span>lx66.com</span> <a href="http://lx66.com">进入网站</a> </li> <li class="text-center"> <span>lx66.com</span> <a href="http://lx66.com">进入网站</a> </li> <li class="text-center"> <span>lx66.com</span> <a href="http://lx66.com">进入网站</a> </li> </ul> </div> <div class="ipt center-block" id="refresh">刷新检测</div> </div> </div> <div class="container-fluid description"> <div class="container"> <div class="row"> <div class="col-md-7"> <p>为了保证最佳使用体验,请保证您的屏幕分辨率在 1280 及以上若使用,IE浏览器请使用 IE9 及以上版本。</p> <div class="browser"></div> </div> <div class="col-md-5"> <p><i>*</i>如果我们的检测中心对您有帮助,请按 Ctrl+D收藏</p> <P><i>*</i>如果您在访问我们域名时被跳转到其它网站,那是您当地电信运营商dns被劫持,您可以通过修改电脑本地dns来解决。</P> <P> 如果检测后不能登录请按以下方式操作:<br> 1、打开IE浏览器,选择:工具-> Internet选项-> 再选择 (删除历史浏览记录)-> 删除-> 重启IE<br> 2、如果出现卡顿,请在您打开本界面选择其它线路看看。<br> </P> </div> </div> </div> </div> <div class="container-fluid foot"> <div class="container"> <div class="center-block">Copyright © 2015 www.GameLOGO.com Corporation, All Rights Reserved.</div> </div> </div> <div class="footer hide"> <!-- inject:footer:html --><!-- endinject --> </div> <!-- build:remove --><script type="text/javascript">load("footer"); </script><!-- endbuild --> <script src="dist/js/commons.bundle.js"></script> <script src="dist/js/lx.bundle.js"></script> <script src="module/common-all.js"></script> <script> /** * Creates and loads an image element by url. * @param {String} url * @return {Promise} promise that resolves to an image element or * fails to an Error. */ var request_image = function(url) { return new Promise(function(resolve, reject) { var img = new Image(); img.onload = function() { resolve(img); }; img.onerror = function() { reject(url); }; img.src = url + '?random-no-cache=' + Math.floor((1 + Math.random()) * 0x10000).toString(16); }); }; /** * Pings a url. * @param {String} url * @param {Number} multiplier - optional, factor to adjust the ping by. 0.3 works well for HTTP servers. * @return {Promise} promise that resolves to a ping (ms, float). */ var ping = function(url, multiplier) { return new Promise(function(resolve, reject) { var start = (new Date()).getTime(); var response = function() { var delta = ((new Date()).getTime() - start); delta *= (multiplier || 1); resolve(delta); }; request_image(url).then(response).catch(response); // Set a timeout for max-pings, 5s. setTimeout(function() { reject(Error('Timeout')); }, 5000); }); }; </script> <script> 'use strict'; $.post('/api/utils/domain-urls',{},Will.successRes(function(URL){ URL.forEach(function (element) { console.log(element) }); URL = ["http://g2.jxlm77.com ","http://g1.jxlm77.com","http://g6.jxlm88.com","http://g5.jxlm88.com","http://lx1.lxc188.com","http://lx.huilifeng365.com"]; function line() { var result = []; Promise.all(URL.map(function(i,k){ return ping(i.trim()).then(function(speed) { result.push({speed:Math.max(Math.floor(speed/2),parseInt(10 + Math.random() * 10)),url:URL[k]}) }).catch(function() { result.push({speed:parseInt(1000 + Math.random() * 100),url:URL[k]}) }) })) .then(function () { result.sort(function (a,b) { return a.speed > b.speed }).forEach(function (i,idx) { /*console.log(i) console.log(idx)*/ $('.timelist li')[idx].innerHTML = i.speed; $('.urllist li span')[idx].innerHTML = i.url.substring(7); $('.urllist li a')[idx].href = i.url; }); }) } line(); document.querySelector('#refresh').onclick = line; })); </script> </body> </html>