SOURCE

console 命令行工具 X clear

                    
>
console
<!DOCTYPE html>
<html>

<head>
	<meta charset="utf-8">
	<meta http-equiv="content-type" content="text/html; charset=UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title>抽奖结果</title>
	<script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
	<script src="https://www.jq22.com/demo/jquerytpfd201807101010/js/ios-orientationchange-fix.js"></script>
	<script src="https://www.jq22.com/demo/jquerytpfd201807101010/js/jquery.swipebox.js"></script>
	<script src="https://cdn.staticfile.org/moment.js/2.29.3/moment.min.js"></script>
	<link href="https://www.jq22.com/demo/jquerytpfd201807101010/css/normalize.css" rel="stylesheet" type="text/css" />
	<link href="https://www.jq22.com/demo/jquerytpfd201807101010/css/default.css" rel="stylesheet" type="text/css" />
	<link href="https://www.jq22.com/demo/jquerytpfd201807101010/css/swipebox.css" rel="stylesheet" type="text/css" />
</head>

<body>
	<noscript>Please enable javascript.</noscript>
	<div id="root">
		<div style="background-color:black;padding:8px;">
			<img style="width:180px;" src="https://aseanlotto.com/static/media/asean-lotto@2x.c07a3cbd.png">
        </div>
        <div id="nav" class="flex_parent" style="background-color:#ff9900;text-align:center;">
            <a href="#" seq="1" class="flex_child">抽奖结果</a>
            <a href="#" seq="2" class="flex_child">导航二</a>
            <a href="#" seq="3" class="flex_child">导航三</a>
            <a href="#" seq="4" class="flex_child">联系我们</a>
        </div>
        
        <div style="width:35px;height:115px;border-radius: 12px;position: fixed;bottom: 200px;right: 5px;z-index: 9999;background:rgb(255,255,255,0.8)">
            <svg t="1692113217802" class="icon" viewBox="0 0 1220 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4082" width="32" height="32"><path d="M609.524 103.522c-222.89 0-403.712 178.472-403.712 398.78 0 220.31 180.823 398.782 403.712 398.782 222.889 0 403.712-178.473 403.712-398.781 0-220.309-180.823-398.781-403.712-398.781v48.762c196.1 0 354.95 156.785 354.95 350.019s-158.85 350.019-354.95 350.019-354.95-156.785-354.95-350.02c0-193.233 158.85-350.018 354.95-350.018v-48.762z" fill="#1296db" p-id="4083"></path><path d="M786.578 916.34c166.45-69.217 278.408-231.055 278.408-414.035 0-248.026-203.847-449.219-455.457-449.219-251.619 0-455.457 201.188-455.457 449.22 0 55.397 10.152 109.367 29.718 159.975 4.855 12.56-1.39 26.677-13.949 31.533-12.56 4.855-26.677-1.39-31.532-13.949a490.396 490.396 0 0 1-3.042-8.078c-1.85 0.077-3.711 0.116-5.581 0.116C58.06 671.903 0 614.597 0 543.903c0-65.005 49.09-118.69 112.68-126.91C153.65 182.56 360.56 4.324 609.528 4.324c248.962 0 455.877 178.24 496.85 412.67 63.583 8.225 112.669 61.907 112.669 126.909 0 70.694-58.06 128-129.686 128-1.89 0-3.771-0.04-5.642-0.119-47.536 129.702-148.34 235.841-279.493 290.027-1.161 33.464-29.012 60.24-63.2 60.24-34.925 0-63.237-27.944-63.237-62.416 0-34.471 28.312-62.415 63.237-62.415 17.892 0 34.048 7.333 45.551 19.12z" fill="#1296db" p-id="4084"></path><path d="M609.528 611.405c-58.933 0-112.056-10.644-158.472-28.342-16.123-6.147-30.211-12.702-42.138-19.208-6.926-3.777-11.447-6.59-13.437-7.972-19.24-13.373-44.428 5.446-37.059 27.688 35.296 106.527 136.054 179.913 251.106 179.913 115.05 0 215.796-73.384 251.092-179.913 7.37-22.243-17.82-41.062-37.06-27.687-1.99 1.383-6.51 4.195-13.434 7.972-11.926 6.505-26.012 13.06-42.133 19.207-46.413 17.698-99.533 28.342-158.465 28.342z" fill="#1296db" p-id="4085"></path></svg>
            <a target="_blank" href="https://www.instagram.com/kilatdomino02/">
                <img src="https://www.instagram.com/favicon.ico"  width="33" height="33">
            </a>
            <a target="_blank" href="https://api.whatsapp.com/send?phone=6282170253680&text=Hi%20SleekFlow,%20just%20visited%20your%20website.%20May%20I%20know%20more?">
                 <img src="https://static.whatsapp.net/rsrc.php/v3/yz/r/ujTY9i_Jhs1.png"  width="33" height="33">
            </a>
        </div>
        <div class="pswp"></div>

    <div id="result_card" >
        <br>
        <div style="width:100%;text-align:center;font-size:20px;font-weight:bolder;color:#ff9900;">抽奖结果</div>
        <div class="card" style="background:white;color:black;">
            <div class="desc"><strong>开奖时间:</strong> <span  id="lastTime">15/08/23 (周二) - 9:15 下午</span></div>
            <br>
            <div class="flex_parent">
                <div class="flex_child bolder">一等奖:</div>
                <div id="no1" class="flex_child" style="text-align:left;font-weight:bolder;color:red;"></div>
            </div>
            <div class="desc">说明:xxxxxxxxx</div>
            <br>
            <div class="flex_parent">
                <div class="flex_child bolder">二等奖:</div>
                <div id="no2" class="flex_child" style="text-align:left;font-weight:bolder;color:red;"></div>
            </div>
            <div class="desc">说明:xxxxxxxxx</div>
            <br>
            <div class="desc"><strong>下一期:</strong><span  id="nextTime">15/08/23 (周二) - 9:15 下午</span></div>
        </div>
    </div>  

    <div id="root_tab">
        <div id="tab1">
            <div class="card" style="font-size:12px;">
                <div class="title">抽奖规则:</div>
                1.1 发起者可以就摩点平台的众筹项目、创意项目发布抽奖活动。
                <br>
                1.2 发起者须保证抽奖活动的真实性,准确、清楚描述活动规则,并严格执行预定的活动规则,禁止随意修改活动规则,增加附加条件,但有利于抽奖活动参与者的除外。
                <br>
                1.3 发起者在抽奖活动开始前需明确公布奖项种类、参与条件、参与方式、开奖时间、开奖方式、奖金金额或者奖品价格、奖品品名、奖品种类、奖品数量。
            </div>
        </div>

        <div id="tab2"  class="card">
            <div class="title">抽奖规则二:</div>
            <div style="font-size:12px;">
                1.1 发起者可以就摩点平台的众筹项目、创意项目发布抽奖活动。
                <br>
                1.2 发起者须保证抽奖活动的真实性,准确、清楚描述活动规则,并严格执行预定的活动规则,禁止随意修改活动规则,增加附加条件,但有利于抽奖活动参与者的除外。
                <br>
                1.3 发起者在抽奖活动开始前需明确公布奖项种类、参与条件、参与方式、开奖时间、开奖方式、奖金金额或者奖品价格、奖品品名、奖品种类、奖品数量或者中奖概率、兑奖时间、兑奖条件、兑奖方式、奖品交付方式、弃奖条件、抽奖活动发起者及其联系方式等信息。
            </div>
        </div>

        <div id="tab3"  class="card">
            <div class="title">抽奖规则三:</div>
            <div style="font-size:12px;">
                1.1 发起者可以就摩点平台的众筹项目、创意项目发布抽奖活动。
                <br>
                1.2 发起者须保证抽奖活动的真实性,准确、清楚描述活动规则,并严格执行预定的活动规则,禁止随意修改活动规则,增加附加条件,但有利于抽奖活动参与者的除外。
                <br>
                1.3 发起者在抽奖活动开始前需明确公布奖项种类、参与条件、参与方式、开奖时间、开奖方式、奖金金额或者奖品价格、奖品品。
            </div>
        </div>
        <div id="tab4"  class="card">
            <div class="title">联系我们:</div>
            <div id="contact">
                <p>
                    <img src="https://static.whatsapp.net/rsrc.php/v3/yz/r/ujTY9i_Jhs1.png"  width="33" height="33">
                    <a href="https://api.whatsapp.com/send?phone=6282170253680&text=Hi%20SleekFlow,%20just%20visited%20your%20website.%20May%20I%20know%20more?" style="margin-left:10px;">+32332349786</a>
                </p>
                <p>
                    <img src="https://static.whatsapp.net/rsrc.php/v3/yz/r/ujTY9i_Jhs1.png"  width="33" height="33">
                    <a href="" style="margin-left:10px;">+32332349786</a>
                </p>
                <p>
                    <img src="https://static.whatsapp.net/rsrc.php/v3/yz/r/ujTY9i_Jhs1.png"  width="33" height="33">
                    <a href="" style="margin-left:10px;">+32332349786</a>
                </p>
                <p>
                    <img src="https://www.instagram.com/favicon.ico"  width="33" height="33">
                    <a href="https://www.instagram.com/kilatdomino02/" style="margin-left:10px;">kilatdomino02</a>
                </p>
            </div>
            <div class="title">抽奖规则四:</div>
            <div style="font-size:12px;">
                1.1 发起者可以就摩点平台的众筹项目、创意项目发布抽奖活动。
                <br>
                1.2 发起者须保证抽奖活动的真实性,准确、清楚描述活动规则,并严格执行预定的活动规则,禁止随意修改活动规则,增加附加条件,但有利于抽奖活动参与者的除外。
                <br>
                1.3 发起者在抽奖活动开始前需明确公布奖项种类、参与条件、参与方式、开奖时间、开奖方式、奖金金额或者奖品价格、奖品品。
            </div>
        </div>

    </div>

    <div class="card">
        <div class="title">官方介绍视频</div>
        <video src="https://mp4.vjshi.com/2021-07-05/142908b123f519cbf1b0242ca3562f31.mp4" controls width="100%"></video>
    </div>

    <div class="card" id="garllery">
        <div class="flex_parent">
            <a class="flex_child photo_card swipebox" href="https://pic.nximg.cn/pic/20190912/15204952_172010690085_4.jpg">
                <img src="https://pic.nximg.cn/pic/20190912/15204952_172010690085_4.jpg" style="width:100%">
                <div class="title"  style="width:100%">梯田风光</div>
            </a>
            <a class="flex_child photo_card swipebox" href="https://pic.nximg.cn/pic/20191005/12398452_171823808031_4.jpg" >
                <img src="https://pic.nximg.cn/pic/20191005/12398452_171823808031_4.jpg" style="width:100%">
                <div class="title"  style="width:100%">秋季美景</div>
            </a>
        </div>
    </div>
    

    <br><br><br>
</div>
<script>
    $(document).ready(function () {
        $('.swipebox').swipebox();
        $('#nav>a').on('click',e=>{
            $('#nav>a').css('background-color','rgb(255, 255, 255,0)');
            $(e.target).css('background-color','rgb(52, 60, 148)');
            $('div[id^=tab]').hide();
            let tabId=$(e.target).attr('seq');
            $(`div[id=tab${tabId}]`).show();
            tabId<=2?$('#result_card').show():$('#result_card').hide();
        });
        fillNo();
    });

   async function fillNo(){
        let {lastStamp,lastStr,no1Text,no2Text,nextStr}=localStorage.lastData?JSON.parse(localStorage.lastData):{};
        if(!lastStamp||Date.now()>lastStamp+86400000){
            let {kjsj,kjjgqq}=await reqResult();
            lastStamp=+new Date(kjsj + ' 21:15 GMT+0800');
            lastStr=moment(lastStamp).format('YYYY-MM-DD HH:mm')
            no1Text=kjjgqq.replace(/\D+/g,'');
            nextStr=moment(lastStamp).add(1, 'days').format('YYYY-MM-DD HH:mm');

            no2Text=permute(no1Text.split('')).reduce((t,a)=>{
                let text=a.join('');
                if(text!==no1Text&&t.indexOf(text)===-1) t.push(a.join(''));
                return t;
            },[]).join();

            localStorage.lastData=JSON.stringify({lastStamp,lastStr,no1Text,no2Text,nextStr});
        }

        $('#lastTime').text(lastStr);
        $('#no1').text(no1Text);
        $('#no2').text(no2Text);
        $('#nextTime').text(nextStr);
    }

    function reqResult(){
        return apifoxFetch('http://www.sxfc.gov.cn/chartstatic/json/kj_3d.json').then(r => r.json())
        .then(r=>r.zjxq[0]);
    }
    
    function apifoxFetch(url, req = {}) {
        let headers = Object.assign({
            Host: new URL(url).host,
        }, req.headers || {});
        return fetch("https://web-proxy.apifox.cn/api/v1/request", {
            "headers": {
                "api-h0": Object.keys(headers).map(key => `${strToHump(key)}=${headers[key]}`).join(', '),
                "api-o0": `method=${req.method || 'GET'}, timings=true, timeout=300000, rejectUnauthorized=false`,
                "api-u": url,
            },
            "body": req.body || null,
            "method": "POST",
            "mode": "cors",
            "credentials": "include"
        });

        function strToHump(str) {
            return str.split('-').map(s => s.charAt(0).toUpperCase() + s.substr(1)).join('-');
        }
    }

    function permute(nums) {
        const result = [];
        function generatePermutations(current, remaining) {
            if (remaining.length === 0) {
                result.push(current.slice());
                return;
            }

            for (let i = 0; i < remaining.length; i++) {
                const num = remaining[i];
                current.push(num);
                remaining.splice(i, 1);
                generatePermutations(current, remaining);
                current.pop();
                remaining.splice(i, 0, num);
            }
        }

        generatePermutations([], nums);
        return result;
    }

</script>
    <style>
        body{background-color: rgb(52, 60, 148);}
        #nav>a{color:white}
        .flex_parent{width:100%;display: flex;flex-direction: row;}
        .flex_child{flex:1;text-align:center}
        .card{margin:10px 15px;padding:10px;color:white;border-radius: 5px;}
        .desc{margin-top:5px;font-size:13px;color:gray;}
        .transparent{background-color: rgb(0, 0, 0,0);}
        .photo_card{height:100px;padding:0 3px;}
        .title{color:white;margin-bottom:5px;font-size:14px;font-weight:bolder}
        .bolder{font-weight:bolder;}
        #nav>a{padding:7px 0;}
        #nav>a:nth-child(1){background-color:rgb(52, 60, 148);}
        div[id^=tab]:nth-child(n+2){display:none;}
        #contact>p{display: flex;align-items: center;}
        p>a{text-decoration: underline;}
    </style>
</body>
</html>