chenjunkai 5 năm trước cách đây
mục cha
commit
4339baa2ab

+ 5 - 0
model/ttyt.py

@@ -0,0 +1,5 @@
+import re
+tel = '13119657713'
+# ret = re.match(r"1[35678]\d{9}", tel)
+# 由于手机号位数大于11位也能匹配成功,所以修改如下:
+ret = re.match(r"^1[35678]\d{9}$", tel)

+ 0 - 156
web/lottery/css/demo.css

@@ -1,156 +0,0 @@
-html, body, div, span, applet, object, iframe,
-h1, h2, h3, h4, h5, h6, p, blockquote, pre,
-a, abbr, acronym, address, big, cite, code,
-del, dfn, em, img, ins, kbd, q, s, samp,
-small, strike, strong, sub, sup, tt, var,
-b, u, i, center,
-dl, dt, dd, ol, ul, li,
-fieldset, form, label, legend,
-table, caption, tbody, tfoot, thead, tr, th, td,
-article, aside, canvas, details, embed,
-figure, figcaption, footer, header, hgroup,
-menu, nav, output, ruby, section, summary,
-time, mark, audio, video {
-  margin: 0;
-  padding: 0;
-  border: 0;
-  font: inherit;
-  font-size: 100%;
-  vertical-align: baseline;
-}
-
-html {
-  line-height: 1;
-}
-
-
-ol, ul {
-  list-style: none;
-}
-
-table {
-  border-collapse: collapse;
-  border-spacing: 0;
-}
-
-caption, th, td {
-  text-align: left;
-  font-weight: normal;
-  vertical-align: middle;
-}
-
-q, blockquote {
-  quotes: none;
-}
-q:before, q:after, blockquote:before, blockquote:after {
-  content: "";
-  content: none;
-}
-
-a img {
-  border: none;
-}
-
-article, aside, details, figcaption, figure, footer, header, hgroup, main, menu, nav, section, summary {
-  display: block;
-}
-@media screen and (min-width:801px){
-html{
-	font-size:14.75px;
-}
-body{
-  width: 100%;
-  height: 947px;
-  background: url(../images/index_bg.png);
-  background-size:100% 100%; 
-}
-.turntable-bg {
-  width: 650px;
-  height: 600px;
-  margin: 0 auto;
-  position: relative;
-  top:200px;
-  background: url("../images/3.png");
-}
-.turntable-bg .mask {
-  width: 454px;
-  height: 451px;
-  position: absolute;
-  left: 116px;
-  top: 60px;
-}
-.turntable-bg .pointer {
-  width: 174px;
-  height: 228px;
-  position: absolute;
-  left: 50%;
-  top: 50%;
-  margin-left: -67px;
-  margin-top: -144px;
-  z-index: 8;
-}
-.turntable-bg .rotate {
-  width: 450px;
-  height: 450px;
-  position: absolute;
-  left: 116px;
-  top: 60px;
-}
-}
-@media screen and (max-width:800px){
-html{
-	font-size:14.75px;
-}	
-body{
-  background: url(../images/index_bg.png);
-}
-.turntable-bg {
-  width: 350px;
-  height: 325px;
-  margin: 0 auto;
-  position: relative;
-  top:20px;
-  background: url("../images/3.png");
-  background-size:100% 100%; 
-}
-.turntable-bg .mask {
-  width: 54px;
-  height: 51px;
-  position: absolute;
-  left: 116px;
-  top: 60px;
-  /*z-index:9;*/
-}
-.turntable-bg .pointer {
-  width: 74px;
-  height: 100px;
-  position: absolute;
-  /*border:1px solid red;*/
-  left: 180px;
-  top: 150px;
-  margin-left: -39px;
-  margin-top: -50px;
-  z-index: 8;
-}
-.turntable-bg .rotate {
-  width: 250px;
-  height: 250px;
-  position: absolute;
-  left: 60px;
-  top: 30px;
-}
-.jjc{
-		width: 500px;
-		height: 500px;
-		background: url(images/paoma1.gif);
-		background-size: 100%100%;
-		position: absolute;
-		top: -250px;
-		left: 500%;
-		font-size: 35px;
-		line-height: 700px;
-		text-align: center;
-		color: #fff;
-    display: none;
-	}
-}

+ 0 - 46
web/lottery/css/style.css

@@ -1,46 +0,0 @@
-/* CSS Document */
-*{margin:0;padding:0;font-size:12px;}
-@media screen and (min-width:801px){
-input,button,select,textarea{outline:none;}
-ul,li,dl,ol{list-style:none;}
-a{color:#666; text-decoration:none;}
-
-.box{ width:100%; margin:0 auto; }
-.bcon{ width:220px; border:30px solid #00b7ee;position: absolute;top:300px;left:200px;border-radius: 20px;}
-.bcon h1{ border-bottom:1px solid #eee; padding:0 10px;background: #00b7ee;}
-.bcon h1 b{ font:bold 14px/40px '宋体'; padding:0 20px; margin-top:-1px; display:inline-block;color: #fff;font-size: 30px;}
-
-.list_lh{ height:400px; overflow:hidden;}
-.list_lh li{ padding:10px;background: #e5e5e5;border-bottom:1px solid #fff;  }
-.list_lh li p{ height:24px; line-height:24px;margin-left:15px; }
-.list_lh li p a{ float:left;}
-.list_lh li p em{ width:80px; font:normal 12px/24px Arial; color:#FF3300; float:right; display:inline-block;}
-.list_lh li p span{ color:#999; float:right;}
-.list_lh li p a.btn_lh{ background:#28BD19; height:17px; line-height:17px; color:#fff; padding:0 5px; margin-top:4px; display:inline-block; float:right;}
-.btn_lh:hover{ color:#fff; text-decoration:none;}
-
-.btm p{ font:normal 12px/24px 'Microsoft YaHei'; text-align:center;}
-
-}
-
-@media screen and (max-width:800px){
-input,button,select,textarea{outline:none;}
-ul,li,dl,ol{list-style:none;}
-a{color:#666; text-decoration:none;}
-
-.box{ width:100%; margin:0 auto; }
-.bcon{ width:220px;height: 300px; border:20px solid #00b7ee;position: absolute;top:400px;left:10%;border-radius: 20px;overflow: hidden;}
-.bcon h1{ border-bottom:1px solid #eee; padding:0 10px;background: #00b7ee;}
-.bcon h1 b{ font:bold 14px/40px '宋体'; padding:0 20px; margin-top:-1px; display:inline-block;color: #fff;font-size: 30px;}
-
-.list_lh{ height:400px; overflow:hidden;}
-.list_lh li{ padding:10px;background: #e5e5e5;border-bottom:1px solid #fff;  }
-.list_lh li p{ height:24px; line-height:24px;margin-left:15px; }
-.list_lh li p a{ float:left;}
-.list_lh li p em{ width:80px; font:normal 12px/24px Arial; color:#FF3300; float:right; display:inline-block;}
-.list_lh li p span{ color:#999; float:right;}
-.list_lh li p a.btn_lh{ background:#28BD19; height:17px; line-height:17px; color:#fff; padding:0 5px; margin-top:4px; display:inline-block; float:right;}
-.btn_lh:hover{ color:#fff; text-decoration:none;}
-
-.btm p{ font:normal 12px/24px 'Microsoft YaHei'; text-align:center;}
-}

BIN
web/lottery/images/3.png


BIN
web/lottery/images/bj.jpg


BIN
web/lottery/images/index_bg.png


BIN
web/lottery/images/paoma1.gif


BIN
web/lottery/images/pointer.png


BIN
web/lottery/images/turntable.png


BIN
web/lottery/images/turntable_1.png


+ 0 - 504
web/lottery/index.html

@@ -1,504 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
-    <!-- viewport的<meta>标签,这个标签可以修改在大部分的移动设备上面的显示,为了确保适当的绘制和触屏缩放。-->
-    <meta name="viewport" content="width=device-width, initial-scale=1.0">
-    <title>大转盘抽奖</title>
-    <link rel="stylesheet" href="css/demo.css" type="text/css"/>
-    <link rel="stylesheet" type="text/css" href="css/style.css">
-
-    <script type="text/javascript" src="js/jquery.min.js"></script>
-    <script type="text/javascript" src="js/awardRotate.js"></script>
-    <script type="text/javascript" src="js/scroll.js"></script>
-    <script type="text/javascript" src="./js/jqhttpsdk.js"></script>
-    <script type="text/javascript" src="./js/jquery_cookie_min.js"></script>
-    <style type="text/css">
-        .quan {
-            width: 100%;
-            height: 100%;
-            background: rgba(0, 0, 0, 0.5);
-            position: absolute;
-            top: 0px;
-            z-index: 99;
-            display: none;
-        }
-
-        .quan1 {
-            width: 300px;
-            height: 200px;
-            background: #fff;
-            margin: 0 auto;
-            margin-top: 300px;
-            border-radius: 10px;
-            border: 4px solid #666;
-        }
-
-        .qian2 {
-            float: left;
-            height: 50px;
-            width: 196px;
-            line-height: 50px;
-            text-align: center;
-            font-size: 18px;
-            margin-top: 50px;
-            background: #fff;
-            border: 2px solid #fff100;
-            margin-left: 50px;
-        }
-
-        .queding {
-            float: left;
-            width: 70px;
-            height: 24px;
-            background: #fff;
-            border: 2px solid #ccc;
-            border-radius: 5px;
-            margin-top: 50px;
-            margin-left: 115px;
-            text-align: center;
-            line-height: 24px;
-            cursor: pointer;
-        }
-
-        .dis {
-            color: #000;
-            font-size: 100px;
-            font-weight: bold;
-            position: absolute;
-            left: 50%;
-            margin-left: -90px;
-            top: 100px;
-            line-height: 30px;
-        }
-
-        .xianjin {
-            width: 280px;
-            height: 50px;
-            background: #fff;
-            position: absolute;
-            border-radius: 10px;
-            top: 248px;
-            left: 200px;
-            line-height: 50px;
-            text-align: center;
-        }
-
-        .jjc {
-            width: 500px;
-            height: 500px;
-            background: url(images/paoma1.gif);
-            background-size: 100% 100%;
-            position: absolute;
-            top: -250px;
-            left: 500%;
-            font-size: 35px;
-            line-height: 700px;
-            text-align: center;
-            color: #fff;
-        }
-    </style>
-</head>
-<body>
-
-<div style="display:none; text-align:center;margin:10px 0; font:normal 14px/24px 'MicroSoft YaHei';">
-    <p>适用浏览器:360、FireFox、Chrome、Safari、Opera、傲游、搜狗、世界之窗. 不支持IE8及以下浏览器。</p>
-</div>
-<!--进来抽奖的界面-->
-<div style="display: none;" id="drawTab">
-    <div class="turntable-bg">
-        <div class="pointer"><img src="images/pointer.png" alt="pointer" style="width:100%;height:100%;"></div>
-        <div class="rotate"><img id="rotate" src="images/turntable.png" alt="turntable" style="width:100%;height:100%;">
-        </div>
-    </div>
-    
-    <div style="display: none;" id="to_drawTab">
-		<div style='padding-top: 30px;text-align: center;color: white;'>用户名:<span id="username"></span>
-		<a onclick='DetailsTab()'>中奖记录</a>
-		</div>	
-	</div>
-    
-    <div id="loginFormID" style="display: block;text-align: center;     color: #90807b;">
-        <div style="margin-top: 40px;"><input type="text" id="phone" maxlength="11" placeholder="输入手机号码"
-                                              value="" style="height: 30px; width: 250px;"><span
-                id="get_code" style="position: absolute;right: 75px;line-height: 30px;">获取验证码</span></div>
-        <div style="margin-top: 10px;"><input type="text" id="code" maxlength="6" placeholder="验证码"
-                                              style="height: 30px; width: 250px;"></div>
-        <div style="margin-top: 10px; margin-bottom: 15px;" id="go_ok">
-            <div id="loginId"
-                 style="margin: 0 auto; color:white; line-height: 30px; background: #f39c4c; height: 30px; width: 120px; border-radius: 5px;">
-                获取抽奖机会
-            </div>
-        </div>
-        <div style=" font-size: 15px; color: white;">
-            <p style="margin-bottom: 5px;">—————— 活动细则 ———————</p>
-            <div id="" style="text-align: left; margin-left: 30px;">
-                <p style="margin-bottom: 5px;">每个手机用户可有抽奖机会一次</p>
-                <p>中奖用户需填写联系信息(姓名、电话、收货地址),以方便邮寄给您。</p>
-            </div>
-        </div>
-    </div>
-</div>
-<!--中奖的界面-->
-<div style="display: none;" id="detailsTab">
-    <div style="color: white; font-size: 30px; margin-top: 30px; text-align: center; margin-bottom: 50px;">恭喜您! 您中奖了
-    </div>
-    <div style="text-align: center;">
-        <div style="margin-top: 10px;">
-            <input type="text" id="rec_name" placeholder="输入收货人姓名" style="height: 30px; width: 250px;">
-        </div>
-        <div style="margin-top: 10px;">
-            <input type="text" id="rec_phone" placeholder="输入收货人手机" style="height: 30px; width: 250px;">
-        </div>
-        <div style="margin-top: 10px;">
-            <input type="text" id="rec_addr" placeholder="输入收货人地址" style="height: 30px; width: 250px;">
-        </div>
-        <div style="margin-top: 20px; margin-bottom: 50px;" id="go_site">
-            <div style="margin: 0 auto; color:white; line-height: 30px; background: #f39c4c; height: 30px; width: 70px; border-radius: 5px;">
-                提交
-            </div>
-        </div>
-        <div style=" font-size: 15px; color: white;">
-            <p style="margin-bottom: 5px;">—————— 活动细则 ———————</p>
-            <div id="" style="text-align: left; margin-left: 30px;">
-                <p style="margin-bottom: 5px;">每个手机用户可有抽奖机会一次</p>
-                <p>中奖用户需填写联系信息(姓名、电话、收货地址),以方便邮寄给您。</p>
-            </div>
-        </div>
-    </div>
-</div>
-
-<script type="text/javascript">
-    $(document).ready(function () {
-        $('.list_lh li:even').addClass('lieven');
-    });
-
-</script>
-<script type="text/javascript">
-	
-	setTimeout('$("#drawTab").fadeIn(1500);', 10);
-    let draw_status = 0; //中奖状态
-
-    function setCookie(key, val, seconds) {
-        var date = new Date();
-        date.setTime(date.getTime() + seconds * 1000);//只能这么写,10表示10秒钟
-        console.log(key)
-        console.log(val)
-        $.cookie(key, val, {expires: date});
-    }
-
-    function InitIndex() {
-        let cookie = $.cookie('access_token');
-        if (cookie) {
-            let post_data = {'token': cookie}
-            // 初始化目录
-
-            $.postJSON(
-                http_ip_prot + 'lottery/index', JSON.stringify(post_data),
-                function (data) {
-                    if (data['code'] == 0) {
-                        console.log('初始化成功')
-                        console.log(data['res'])
-                        draw_status = data['res']['status']; //中奖状态
-                        let phone_list = data['res']['phone_list']; //已经中奖的手机号码
-                        let user = data['res']['user']; // 当前用户名
-                        let addr = data['res']['addr']; // 当前收货地址
-                        //$('#loginFormID').hide()
-                        $("#username").html(user);
-                        $("#loginFormID").hide();
-                        $('#to_drawTab').show();
-                        
-                        DetailsTab();
-                        let addrJson = JSON.parse(addr)
-                        console.log(addrJson)
-                        if (addrJson) {
-                            $("#rec_name").val(addrJson['rec_name'])
-                            $("#rec_phone").val(addrJson['rec_phone'])
-                            $("#rec_addr").val(addrJson['rec_addr'])
-                        }
-                    } else {
-                        alert(data['msg'])
-                    }
-                }
-            );
-        } else {
-            //没有token唤醒登录界面
-        }
-    }
-
-    function DetailsTab() {
-        if (draw_status == 1 || draw_status == 2) {
-        	alert('恭喜你');
-            $('#drawTab').hide();
-            $('#detailsTab').show();
-        } else {
-            alert('很遗憾,你没有中奖');
-        }
-    }
-
-    //获取验证码方法
-    function authCode() {
-        let phone = $('#phone').val();
-        if (phone == "") {
-            alert("手机不可以为空!")
-        } else if (!/^1[0-9]{10}$/.test(phone)) {
-            alert("手机不正确!")
-        } else {
-            //调用获取验证码
-        }
-        let post_data = {'phone': phone}
-        // 初始化目录
-        $.postJSON(
-            http_ip_prot + 'lottery/authcode', JSON.stringify(post_data),
-            function (data) {
-                if (data['code'] == 0) {
-
-                } else {
-                    alert(data['msg'])
-                }
-            }
-        );
-    }
-
-    // 登录
-    function doAuthLogin() {
-        let phone = $('#phone').val()
-        let authcode = $('#code').val()
-        let post_data = {
-            'phone': phone,
-            'authcode': authcode
-        }
-        $.postJSON(
-            http_ip_prot + 'lottery/login', JSON.stringify(post_data),
-            function (data) {
-                if (data['code'] == 0) {
-                    //登录成功
-                    setCookie('access_token', data['res']['access_token'], data['res']['access_expire'])
-                    setCookie('refresh_token', data['res']['refresh_token'], data['res']['refresh_expire'])
-                    InitIndex()
-                } else {
-                    alert(data['msg'])
-                }
-            }
-        );
-    }
-
-    //抽奖
-    function doDraw() {
-        let token = $.cookie('access_token')
-        let post_data = {
-            'token': token
-        }
-        $.postJSON(
-            http_ip_prot + 'lottery/draw', JSON.stringify(post_data),
-            function (data) {
-                if (data['code'] == 0) {
-                    //抽奖请求成功
-                    //中奖状态 1:c611,2:c612 ,3:不中奖
-                    let status = data['res']['status']
-                    if (status == 1) {
-                        console.log('中奖c611')
-                    } else if (status == 2) {
-                        console.log('中奖c612')
-                    } else if (status == 3) {
-                        console.log('很遗憾没有中奖')
-                    }
-                    doDrawRollAction(status)
-                } else {
-                    alert(data['msg'])
-                }
-            },
-            false,//异步
-        );
-    }
-
-    //设置收货地址
-    function setAddr() {
-        let token = $.cookie('access_token')
-        let rec_name = $('#rec_name').val()
-        let rec_phone = $('#rec_phone').val()
-        let rec_addr = $('#rec_addr').val()
-        if (rec_addr && rec_phone && rec_addr) {
-            let addr = JSON.stringify({
-                'rec_name': rec_name,
-                'rec_phone': rec_phone,
-                'rec_addr': rec_addr,
-            });
-            let post_data = {
-                'token': token,
-                'addr': addr
-            };
-            $.postJSON(
-                http_ip_prot + 'lottery/setAddr', JSON.stringify(post_data),
-                function (data) {
-                    if (data['code'] == 0) {
-                        //设置请求成功
-                        alert(data['msg'])
-                    } else {
-                        alert(data['msg'])
-                    }
-                }
-            );
-        }
-    }
-
-    //获取验证码
-    $('#get_code').click(function () {
-        authCode()
-    });
-    //# 登录
-    $('#loginId').click(function () {
-        doAuthLogin()
-    });
-    //# 登录
-    $('#go_site').click(function () {
-        setAddr()
-    });
-
-    InitIndex()
-
-    var bRotate = false;
-
-    var rotateFn = function (awards, angles, txt) {
-        bRotate = !bRotate;
-        $('#rotate').stopRotate();
-        $('#rotate').rotate({
-            angle: 0,
-            animateTo: angles + 1800,
-            duration: 8000,
-            callback: function () {
-                //alert("¥" + txt);
-                alert(txt)
-                bRotate = !bRotate;
-            }
-        })
-    };
-    // 0 2 5 不中奖
-    // 1 3 c612
-    // 4 6 c611
-    $('.pointer').click(function () {
-        //var a = [0, 1, 2, 3, 4, 5, 6];
-        doDraw()
-    });
-
-    function doDrawRollAction(status) {
-        //抽奖值
-        //var item = 0
-        let rotate_data = {
-            '1': [4, 6],
-            '2': [1, 3],
-            '3': [0, 2, 5],
-        };
-
-        let rotate = rotate_data[status]
-        let item = rotate[Math.floor((Math.random() * rotate.length))];
-
-        var a = [
-            '很遗憾没中奖',
-            '恭喜中奖c612',
-            '很遗憾没中奖',
-            '恭喜中奖c612',
-            '恭喜中奖c611',
-            '很遗憾没中奖',
-            '恭喜中奖c611',
-        ]
-        //if (bRotate) return;
-        switch (item) {
-            case 0:
-                //var angle = [26, 88, 137, 185, 235, 287, 337];
-                rotateFn(0, 332, a[0]);
-                var ss = Number($("#xianjin").val());
-                var cc = ss + a[0];
-                $("#xianjin").val(cc);
-                setTimeout(function () {
-                    $(".xianjin").html(cc);
-                }, 8000);
-                $(".qian2").html(cc);
-
-                break;
-            case 1:
-                //var angle = [88, 137, 185, 235, 287];
-
-                rotateFn(1, 24, a[1]);
-                var ss = Number($("#xianjin").val());
-                var cc = ss + a[1];
-                $("#xianjin").val(cc);
-                setTimeout(function () {
-                    $(".xianjin").html(cc);
-                }, 8000);
-                $(".qian2").html(cc);
-                break;
-            case 2:
-                //var angle = [137, 185, 235, 287];
-                rotateFn(2, 77, a[2]);
-                var ss = Number($("#xianjin").val());
-                var cc = ss + a[2];
-                $("#xianjin").val(cc);
-                setTimeout(function () {
-                    $(".xianjin").html(cc);
-                }, 8000);
-
-                $(".qian2").html(cc);
-                break;
-            case 3:
-                //var angle = [137, 185, 235, 287];
-                rotateFn(3, 129, a[3]);
-                var ss = Number($("#xianjin").val());
-                var cc = ss + a[3];
-                $("#xianjin").val(cc);
-                setTimeout(function () {
-                    $(".xianjin").html(cc);
-                }, 8000);
-                $(".qian2").html(cc);
-                break;
-            case 4:
-                //var angle = [185, 235, 287];
-                rotateFn(4, 180, a[4]);
-                var ss = Number($("#xianjin").val());
-                var cc = ss + a[4];
-                $("#xianjin").val(cc);
-                setTimeout(function () {
-                    $(".xianjin").html(cc);
-                }, 8000);
-                $(".qian2").html(cc);
-                break;
-            case 5:
-
-                //var angle = [185, 235, 287];
-                rotateFn(5, 231, a[5]);
-                var ss = Number($("#xianjin").val());
-                var cc = ss + a[5];
-                $("#xianjin").val(cc);
-                setTimeout(function () {
-                    $(".xianjin").html(cc);
-                }, 8000);
-                $(".qian2").html(cc);
-                break;
-            case 6:
-                //var angle = [235, 287];
-                rotateFn(6, 280, a[6]);
-                var ss = Number($("#xianjin").val());
-                var cc = ss + a[6];
-                $("#xianjin").val(cc);
-                setTimeout(function () {
-                    $(".xianjin").html(cc);
-                }, 8000);
-                $(".qian2").html(cc);
-                break;
-        }
-    }
-    // 捕捉全局异常弹出
-function handleError(msg,url,l)
-{
-    var txt="There was an error on this page.\n\n"
-    txt+="Error: " + msg + "\n"
-    txt+="URL: " + url + "\n"
-    txt+="Line: " + l + "\n\n"
-    txt+="Click OK to continue.\n\n"
-    alert(txt)
-    return true
-}
-window.onerror = handleError
-</script>
-</body>
-</html>

+ 0 - 302
web/lottery/js/awardRotate.js

@@ -1,302 +0,0 @@
-(function($) {
-var supportedCSS,styles=document.getElementsByTagName("head")[0].style,toCheck="transformProperty WebkitTransform OTransform msTransform MozTransform".split(" ");
-for (var a=0;a<toCheck.length;a++) if (styles[toCheck[a]] !== undefined) supportedCSS = toCheck[a];
-// Bad eval to preven google closure to remove it from code o_O
-// After compresion replace it back to var IE = 'v' == '\v'
-var IE = eval('"v"=="\v"');
-
-jQuery.fn.extend({
-    rotate:function(parameters)
-    {
-        if (this.length===0||typeof parameters=="undefined") return;
-            if (typeof parameters=="number") parameters={angle:parameters};
-        var returned=[];
-        for (var i=0,i0=this.length;i<i0;i++)
-            {
-                var element=this.get(i);	
-                if (!element.Wilq32 || !element.Wilq32.PhotoEffect) {
-
-                    var paramClone = $.extend(true, {}, parameters); 
-                    var newRotObject = new Wilq32.PhotoEffect(element,paramClone)._rootObj;
-
-                    returned.push($(newRotObject));
-                }
-                else {
-                    element.Wilq32.PhotoEffect._handleRotation(parameters);
-                }
-            }
-            return returned;
-    },
-    getRotateAngle: function(){
-        var ret = [];
-        for (var i=0,i0=this.length;i<i0;i++)
-            {
-                var element=this.get(i);	
-                if (element.Wilq32 && element.Wilq32.PhotoEffect) {
-                    ret[i] = element.Wilq32.PhotoEffect._angle;
-                }
-            }
-            return ret;
-    },
-    stopRotate: function(){
-        for (var i=0,i0=this.length;i<i0;i++)
-            {
-                var element=this.get(i);	
-                if (element.Wilq32 && element.Wilq32.PhotoEffect) {
-                    clearTimeout(element.Wilq32.PhotoEffect._timer);
-                }
-            }
-    }
-});
-
-// Library agnostic interface
-
-Wilq32=window.Wilq32||{};
-Wilq32.PhotoEffect=(function(){
-
-	if (supportedCSS) {
-		return function(img,parameters){
-			img.Wilq32 = {
-				PhotoEffect: this
-			};
-            
-            this._img = this._rootObj = this._eventObj = img;
-            this._handleRotation(parameters);
-		}
-	} else {
-		return function(img,parameters) {
-			// Make sure that class and id are also copied - just in case you would like to refeer to an newly created object
-            this._img = img;
-
-			this._rootObj=document.createElement('span');
-			this._rootObj.style.display="inline-block";
-			this._rootObj.Wilq32 = 
-				{
-					PhotoEffect: this
-				};
-			img.parentNode.insertBefore(this._rootObj,img);
-			
-			if (img.complete) {
-				this._Loader(parameters);
-			} else {
-				var self=this;
-				// TODO: Remove jQuery dependency
-				jQuery(this._img).bind("load", function()
-				{
-					self._Loader(parameters);
-				});
-			}
-		}
-	}
-})();
-
-Wilq32.PhotoEffect.prototype={
-    _setupParameters : function (parameters){
-		this._parameters = this._parameters || {};
-        if (typeof this._angle !== "number") this._angle = 0 ;
-        if (typeof parameters.angle==="number") this._angle = parameters.angle;
-        this._parameters.animateTo = (typeof parameters.animateTo==="number") ? (parameters.animateTo) : (this._angle); 
-
-        this._parameters.step = parameters.step || this._parameters.step || null;
-		this._parameters.easing = parameters.easing || this._parameters.easing || function (x, t, b, c, d) { return -c * ((t=t/d-1)*t*t*t - 1) + b; }
-		this._parameters.duration = parameters.duration || this._parameters.duration || 1000;
-        this._parameters.callback = parameters.callback || this._parameters.callback || function(){};
-        if (parameters.bind && parameters.bind != this._parameters.bind) this._BindEvents(parameters.bind); 
-	},
-	_handleRotation : function(parameters){
-          this._setupParameters(parameters);
-          if (this._angle==this._parameters.animateTo) {
-              this._rotate(this._angle);
-          }
-          else { 
-              this._animateStart();          
-          }
-	},
-
-	_BindEvents:function(events){
-		if (events && this._eventObj) 
-		{
-            // Unbinding previous Events
-            if (this._parameters.bind){
-                var oldEvents = this._parameters.bind;
-                for (var a in oldEvents) if (oldEvents.hasOwnProperty(a)) 
-                        // TODO: Remove jQuery dependency
-                        jQuery(this._eventObj).unbind(a,oldEvents[a]);
-            }
-
-            this._parameters.bind = events;
-			for (var a in events) if (events.hasOwnProperty(a)) 
-				// TODO: Remove jQuery dependency
-					jQuery(this._eventObj).bind(a,events[a]);
-		}
-	},
-
-	_Loader:(function()
-	{
-		if (IE)
-		return function(parameters)
-		{
-			var width=this._img.width;
-			var height=this._img.height;
-			this._img.parentNode.removeChild(this._img);
-							
-			this._vimage = this.createVMLNode('image');
-			this._vimage.src=this._img.src;
-			this._vimage.style.height=height+"px";
-			this._vimage.style.width=width+"px";
-			this._vimage.style.position="absolute"; // FIXES IE PROBLEM - its only rendered if its on absolute position!
-			this._vimage.style.top = "0px";
-			this._vimage.style.left = "0px";
-
-			/* Group minifying a small 1px precision problem when rotating object */
-			this._container =  this.createVMLNode('group');
-			this._container.style.width=width;
-			this._container.style.height=height;
-			this._container.style.position="absolute";
-			this._container.setAttribute('coordsize',width-1+','+(height-1)); // This -1, -1 trying to fix ugly problem with small displacement on IE
-			this._container.appendChild(this._vimage);
-			
-			this._rootObj.appendChild(this._container);
-			this._rootObj.style.position="relative"; // FIXES IE PROBLEM
-			this._rootObj.style.width=width+"px";
-			this._rootObj.style.height=height+"px";
-			this._rootObj.setAttribute('id',this._img.getAttribute('id'));
-			this._rootObj.className=this._img.className;			
-		    this._eventObj = this._rootObj;	
-		    this._handleRotation(parameters);	
-		}
-		else
-		return function (parameters)
-		{
-			this._rootObj.setAttribute('id',this._img.getAttribute('id'));
-			this._rootObj.className=this._img.className;
-			
-			this._width=this._img.width;
-			this._height=this._img.height;
-			this._widthHalf=this._width/2; // used for optimisation
-			this._heightHalf=this._height/2;// used for optimisation
-			
-			var _widthMax=Math.sqrt((this._height)*(this._height) + (this._width) * (this._width));
-
-			this._widthAdd = _widthMax - this._width;
-			this._heightAdd = _widthMax - this._height;	// widthMax because maxWidth=maxHeight
-			this._widthAddHalf=this._widthAdd/2; // used for optimisation
-			this._heightAddHalf=this._heightAdd/2;// used for optimisation
-			
-			this._img.parentNode.removeChild(this._img);	
-			
-			this._aspectW = ((parseInt(this._img.style.width,10)) || this._width)/this._img.width;
-			this._aspectH = ((parseInt(this._img.style.height,10)) || this._height)/this._img.height;
-			
-			this._canvas=document.createElement('canvas');
-			this._canvas.setAttribute('width',this._width);
-			this._canvas.style.position="relative";
-			this._canvas.style.left = -this._widthAddHalf + "px";
-			this._canvas.style.top = -this._heightAddHalf + "px";
-			this._canvas.Wilq32 = this._rootObj.Wilq32;
-			
-			this._rootObj.appendChild(this._canvas);
-			this._rootObj.style.width=this._width+"px";
-			this._rootObj.style.height=this._height+"px";
-            this._eventObj = this._canvas;
-			
-			this._cnv=this._canvas.getContext('2d');
-            this._handleRotation(parameters);
-		}
-	})(),
-
-	_animateStart:function()
-	{	
-		if (this._timer) {
-			clearTimeout(this._timer);
-		}
-		this._animateStartTime = +new Date;
-		this._animateStartAngle = this._angle;
-		this._animate();
-	},
-    _animate:function()
-    {
-         var actualTime = +new Date;
-         var checkEnd = actualTime - this._animateStartTime > this._parameters.duration;
-
-         // TODO: Bug for animatedGif for static rotation ? (to test)
-         if (checkEnd && !this._parameters.animatedGif) 
-         {
-             clearTimeout(this._timer);
-         }
-         else 
-         {
-             if (this._canvas||this._vimage||this._img) {
-                 var angle = this._parameters.easing(0, actualTime - this._animateStartTime, this._animateStartAngle, this._parameters.animateTo - this._animateStartAngle, this._parameters.duration);
-                 this._rotate((~~(angle*10))/10);
-             }
-             if (this._parameters.step) {
-                this._parameters.step(this._angle);
-             }
-             var self = this;
-             this._timer = setTimeout(function()
-                     {
-                     self._animate.call(self);
-                     }, 10);
-         }
-
-         // To fix Bug that prevents using recursive function in callback I moved this function to back
-         if (this._parameters.callback && checkEnd){
-             this._angle = this._parameters.animateTo;
-             this._rotate(this._angle);
-             this._parameters.callback.call(this._rootObj);
-         }
-     },
-
-	_rotate : (function()
-	{
-		var rad = Math.PI/180;
-		if (IE)
-		return function(angle)
-		{
-            this._angle = angle;
-			this._container.style.rotation=(angle%360)+"deg";
-		}
-		else if (supportedCSS)
-		return function(angle){
-            this._angle = angle;
-			this._img.style[supportedCSS]="rotate("+(angle%360)+"deg)";
-		}
-		else 
-		return function(angle)
-		{
-            this._angle = angle;
-			angle=(angle%360)* rad;
-			// clear canvas	
-			this._canvas.width = this._width+this._widthAdd;
-			this._canvas.height = this._height+this._heightAdd;
-						
-			// REMEMBER: all drawings are read from backwards.. so first function is translate, then rotate, then translate, translate..
-			this._cnv.translate(this._widthAddHalf,this._heightAddHalf);	// at least center image on screen
-			this._cnv.translate(this._widthHalf,this._heightHalf);			// we move image back to its orginal 
-			this._cnv.rotate(angle);										// rotate image
-			this._cnv.translate(-this._widthHalf,-this._heightHalf);		// move image to its center, so we can rotate around its center
-			this._cnv.scale(this._aspectW,this._aspectH); // SCALE - if needed ;)
-			this._cnv.drawImage(this._img, 0, 0);							// First - we draw image
-		}
-
-	})()
-}
-
-if (IE)
-{
-Wilq32.PhotoEffect.prototype.createVMLNode=(function(){
-document.createStyleSheet().addRule(".rvml", "behavior:url(#default#VML)");
-		try {
-			!document.namespaces.rvml && document.namespaces.add("rvml", "urn:schemas-microsoft-com:vml");
-			return function (tagName) {
-				return document.createElement('<rvml:' + tagName + ' class="rvml">');
-			};
-		} catch (e) {
-			return function (tagName) {
-				return document.createElement('<' + tagName + ' xmlns="urn:schemas-microsoft.com:vml" class="rvml">');
-			};
-		}		
-})();
-}
-})(jQuery);

+ 85 - 0
web/lottery/js/jqhttpsdk.js

@@ -0,0 +1,85 @@
+/**
+ * 获取数据ajax-get请求
+ * @author chanjunkai
+ */
+// var http_ip_prot = 'http://192.168.136.40:4696/'
+let domain = document.domain;
+
+//let http_ip_prot = 'http://192.168.136.40:7724/';
+    //生产环境
+   let http_ip_prot = 'http://www.zositech.xyz:7724';
+
+$.GetJSON = function (url, data, callback) {
+    $.ajax({
+        url: url,
+        type: "get",
+        contentType: "application/json",
+        dataType: "json",
+        timeout: 10000,
+        data: data,
+        success: function (data) {
+            callback(data);
+        }
+    });
+};
+
+/**
+ * 提交json数据的post请求
+ * @author laixm
+ */
+$.postJSON = function (url, data, callback) {
+    $.ajax({
+        url: url,
+        type: "post",
+        contentType: "application/json",
+        dataType: "json",
+        data: data,
+        timeout: 60000,
+        success: function (msg) {
+            callback(msg);
+        },
+        error: function (xhr, textstatus, thrown) {
+
+        }
+    });
+};
+
+/**
+ * 修改数据的ajax-put请求
+ * @author laixm
+ */
+$.putJSON = function (url, data, callback) {
+    $.ajax({
+        url: url,
+        type: "put",
+        contentType: "application/json",
+        dataType: "json",
+        data: data,
+        timeout: 20000,
+        success: function (msg) {
+            callback(msg);
+        },
+        error: function (xhr, textstatus, thrown) {
+
+        }
+    });
+};
+/**
+ * 删除数据的ajax-delete请求
+ * @author laixm
+ */
+$.deleteJSON = function (url, data, callback) {
+    $.ajax({
+        url: url,
+        type: "delete",
+        contentType: "application/json",
+        dataType: "json",
+        data: data,
+        success: function (msg) {
+            callback(msg);
+        },
+        error: function (xhr, textstatus, thrown) {
+
+        }
+    });
+};

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 1
web/lottery/js/jquery.min.js


+ 2 - 0
web/lottery/js/jquery_cookie_min.js

@@ -0,0 +1,2 @@
+/*! jquery.cookie v1.4.1 | MIT */
+!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?a(require("jquery")):a(jQuery)}(function(a){function b(a){return h.raw?a:encodeURIComponent(a)}function c(a){return h.raw?a:decodeURIComponent(a)}function d(a){return b(h.json?JSON.stringify(a):String(a))}function e(a){0===a.indexOf('"')&&(a=a.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return a=decodeURIComponent(a.replace(g," ")),h.json?JSON.parse(a):a}catch(b){}}function f(b,c){var d=h.raw?b:e(b);return a.isFunction(c)?c(d):d}var g=/\+/g,h=a.cookie=function(e,g,i){if(void 0!==g&&!a.isFunction(g)){if(i=a.extend({},h.defaults,i),"number"==typeof i.expires){var j=i.expires,k=i.expires=new Date;k.setTime(+k+864e5*j)}return document.cookie=[b(e),"=",d(g),i.expires?"; expires="+i.expires.toUTCString():"",i.path?"; path="+i.path:"",i.domain?"; domain="+i.domain:"",i.secure?"; secure":""].join("")}for(var l=e?void 0:{},m=document.cookie?document.cookie.split("; "):[],n=0,o=m.length;o>n;n++){var p=m[n].split("="),q=c(p.shift()),r=p.join("=");if(e&&e===q){l=f(r,g);break}e||void 0===(r=f(r))||(l[q]=r)}return l};h.defaults={},a.removeCookie=function(b,c){return void 0===a.cookie(b)?!1:(a.cookie(b,"",a.extend({},c,{expires:-1})),!a.cookie(b))}});

+ 0 - 51
web/lottery/js/scroll.js

@@ -1,51 +0,0 @@
-// JavaScript Document
-(function($){
-	$.fn.myScroll = function(options){
-	//默认配置
-	var defaults = {
-		speed:40,  //滚动速度,值越大速度越慢
-		rowHeight:24 //每行的高度
-	};
-	
-	var opts = $.extend({}, defaults, options),intId = [];
-	
-	function marquee(obj, step){
-	
-		obj.find("ul").animate({
-			marginTop: '-=1'
-		},0,function(){
-				var s = Math.abs(parseInt($(this).css("margin-top")));
-				if(s >= step){
-					$(this).find("li").slice(0, 1).appendTo($(this));
-					$(this).css("margin-top", 0);
-				}
-			});
-		}
-		
-		this.each(function(i){
-			var sh = opts["rowHeight"],speed = opts["speed"],_this = $(this);
-			intId[i] = setInterval(function(){
-				if(_this.find("ul").height()<=_this.height()){
-					clearInterval(intId[i]);
-				}else{
-					marquee(_this, sh);
-				}
-			}, speed);
-
-			_this.hover(function(){
-				clearInterval(intId[i]);
-			},function(){
-				intId[i] = setInterval(function(){
-					if(_this.find("ul").height()<=_this.height()){
-						clearInterval(intId[i]);
-					}else{
-						marquee(_this, sh);
-					}
-				}, speed);
-			});
-		
-		});
-
-	}
-
-})(jQuery);

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác