Reiskuchen 5 лет назад
Родитель
Сommit
06aa0f1bfc

+ 5 - 0
minigame/WebContent/WEB-INF/web.xml

@@ -126,4 +126,9 @@
 		<servlet-name>default</servlet-name>
 		<url-pattern>*.gif</url-pattern>
 	</servlet-mapping>
+		<servlet-mapping>    
+		<servlet-name>default</servlet-name>
+		<url-pattern>*.mp3</url-pattern>
+	</servlet-mapping>
+	
 </web-app>

+ 276 - 275
minigame/WebContent/lottery.html

@@ -1,276 +1,277 @@
-<!DOCTYPE html>
-<html lang="en" style="width: 100%">
-
-<head>
-    <meta charset="UTF-8">
-    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
-    <meta http-equiv="X-UA-Compatible" content="ie=edge">
-    <title>抽奖</title>
-    <script src="js/jquery.min.js"></script>
-    <link rel="stylesheet" href="css/lottery.css" type="text/css" />
-    <script type="text/javascript">
-    	var id = localStorage.userId;
-        var current = 0;
-        var last = 0;
-        var threshold = 0;
-        var speed = 1;
-        var enable = true;
-        var src = null;
-        $(function () {
-            //进入和窗口缩放时重新设置内容位置
-            setPosition();
-            $(window).resize(function () {
-                setPosition();
-            });
-            //在这里查看是否有id
-            if(id == null){
-            	//alert("请先登录");
-            	window.location.href = "http://wx.ttkuaiban.com/minigame";
-            }
-            
-            
-            //获取
-            $.post("prize/luckDrawList", {}, function(resp) {
-				if (resp.code == 'error') {
-					console.log(resp.code);
-				}else{
-					for(let index in resp.data){
-						$(".advertisement").append("<li>恭喜" + resp.data[index].nickName + "获得了" + resp.data[index].prize + "</li>")
-					}
-				}
-			});
-            
-            //点击
-            $(".check_result").click(function(){
-            	window.location.href = "result.html";
-            })
-            
-            //点击抽奖
-            $(".button").click(function () {
-                if(enable == true){
-					//获取抽奖结果
-                    $.post("prize/luckDraw", {userId: id}, function(resp) {
-        				if (resp.code == 'error') {
-        					alert(resp.msg);
-        				}else{
-        					//进入不可点击状态
-                            enable = false;
-                            //设置初始速度
-                            speed = 60;
-                            //设置要中奖的位置 1.3.5没有 0十二瓶 2一升 4五百毫升 6书 7肥皂
-                            if(resp.data.prizeLevel == -1){
-                            	var rand = Math.round(Math.random()*3);
-                            	if(rand <= 1){
-                            		threshold = 1;
-                            	}else if(rand <= 2){
-                            		threshold = 3;                            		
-                            	}else{
-                            		threshold = 5; 
-                            	}
-                            }else if(resp.data.prizeLevel == 0){
-                            	threshold = 0;
-                            	src = "images/reward_oil60_2.png";
-                            }else if(resp.data.prizeLevel == 1){
-                            	threshold = 4;   
-                            	src = "images/reward_oil5_2.png";           	
-                            }else if(resp.data.prizeLevel == 2){
-                            	threshold = 2;
-                            	src = "images/reward_oil10_2.png";                          	
-                            }else if(resp.data.prizeLevel == 3){
-                            	threshold = 7;
-                            	src = "images/reward_soap2.png";                          	
-                            }else if(resp.data.prizeLevel == 4){
-                            	threshold = 6;
-                            	src = "images/reward_book2.png";        	
-                            }else{
-                            	threshold = 1;
-                            }
-                            //配置移动次数
-                            last = 56 + threshold - current;
-                            setTimeout(function(){next(current)}, 1000);
-        				}
-        			});
-                }
-            });
-            //谢谢惠顾后点击的按钮
-            $(".result_failed_button").click(function () {
-                window.location.href = "index.html";
-            });
-          	//领取奖品按钮
-            $(".result_success_button").click(function () {
-                var name = $(".result_success_name").val();
-                var phone = $(".result_success_phone").val();
-                if(name == "" || phone == ""){
-                	alert("请填写完整信息");
-                }else{
-                	$.post("prize/luckDrawAddInfo", {
-                		id: id,
-                		phone: phone,
-                		username: name
-                	}, function(resp) {
-        				if (resp.code == 'error') {
-        					console.log(resp.code);
-        				}else{
-        					alert("填写成功");
-        					window.location.href = "index.html";
-        				}
-        			});
-                }
-            });
-        });
-
-        //重新设置内容位置
-        function setPosition() {
-            $(".pool").css("top", $(document).width() / 1.9);
-            $(".container").css("top", $(document).width() / 1.75).css("height", $(document).width() / 1.6);
-            $(".item").css("height", $(".container").width() / 3.9);
-            $(".title").css("top", $(".container").width() * 2.35);
-            $(".check_result").css("top", $(".container").width() * 2.36);
-            $(".tips").css("top", $(".container").width() * 2.45);
-            $(".mask").css("height", $(document).height());
-            $(".result_failed_button").css("top", $(".container").width() * 1.6);
-            $(".result_success_title").css("top", $(".container").width() * 0.69);
-            $(".result_success_logo").css("top", $(".container").width() * 0.9);
-            $(".result_success_name").css("top", $(".container").width() * 1.35);
-            $(".result_success_phone").css("top", $(".container").width() * 1.59);
-            $(".result_success_button").css("top", $(".container").width() * 1.82);
-            $(".case").css("top", $(".container").width() * 1.9);
-        }
-
-        //激活移动
-        function next() {
-            $(".item" + current).removeClass("active");
-            $(".item" + (current + 1) % 8).addClass("active");
-            current = (current + 1) % 8;
-            //10以下开始减速
-            if(last < 10){
-                speed += 60;
-            }
-            //剩余次数8以下并且到了号时
-            if(!(last-- < 8 && current == threshold)){
-                setTimeout(function(){next()}, speed);
-            }else{
-                setTimeout(function(){
-                    if(threshold == 1 || threshold == 3 || threshold == 5){
-                    	failed();
-                    }else{
-                    	success();
-                    }
-                    enable = true;
-                }, 1500);
-            }
-        }
-
-        //中奖之后
-        function success(){
-            $(".mask").show();
-            $(".success").show();
-            $(".result_success_title").show();
-            $(".result_success_logo").show();
-            $(".result_success_name").show();
-            $(".result_success_phone").show();
-            $(".result_success_button").show();
-        	$(".result_success_logo").attr("src", src);
-        }
-
-        //谢谢惠顾
-        function failed(){
-            $(".mask").show();
-            $(".failed").show();
-            $(".result_failed_button").show();
-        }
-        
-     	//判断微信分享
-        document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
-    		//发送给好友
-    		WeixinJSBridge.on('menu:share:appmessage', function(argv){
-    			$.post("prize/luckDrawAddShare", {uid: id}, function(resp) {
-    				if (resp.code == 'error') {
-    					console.log(resp.code);
-    				}else{
-    					alert("分享成功");
-    				}
-    			});
-    		});
-    		//分享到朋友圈
-    		WeixinJSBridge.on('menu:share:timeline', function(argv){
-    			$.post("prize/luckDrawAddShare", {uid: id}, function(resp) {
-    				if (resp.code == 'error') {
-    					console.log(resp.code);
-    				}else{
-    					alert("分享成功");
-    				}
-    			});
-    		}); 
-    	}, false);
-    </script>
-</head>
-
-<body style="width: 100%">
-    <img class="background" src="images/lottery_background.png">
-    <img class="pool" src="images/lottery_pool.png">
-    <div class="container">
-        <img class="item item0" src="images/reward_oil60.png">
-        <img class="item item1" src="images/reward_null.png">
-        <img class="item item2" src="images/reward_oil10.png">
-        <img class="item item7" src="images/reward_soap.png">
-        <img class="item button" src="images/lottery_button.png">
-        <img class="item item3" src="images/reward_null.png">
-        <img class="item item6" src="images/reward_book.png">
-        <img class="item item5" src="images/reward_null.png">
-        <img class="item item4" src="images/reward_oil5.png">
-    </div>
-    <span class="title"><span style="color: #FF356B">活动</span>说明</span>
-    <span class="tips">1.中奖者留下姓名和电话,在活动结束后会联系邮寄奖品;<br>
-        2.微博参与抽奖方式:<br>
-        关注@贝蒂斯橄榄油官方微博,转发或评论置顶微博并上传“游戏结果海报”。
-    </span>
-
-    <div class="case">
-        <div class="part2" id="part2">
-            <div id="scroll1">
-                <ul class="advertisement">
-                </ul>
-            </div>
-            <div id="scroll2"></div>
-        </div>
-    </div>
-
-    <script type="text/javascript">
-        var PartArea = document.getElementById('part2');
-        var Scroll1 = document.getElementById('scroll1');
-        var Scroll2 = document.getElementById('scroll2');
-
-        Scroll2.innerHTML = Scroll1.innerHTML;
-
-        function roll() {
-            if(Scroll2.offsetHeight - PartArea.scrollTop <= 0) {
-                PartArea.scrollTop -= Scroll1.offsetHeight;
-            } else {
-                PartArea.scrollTop++;
-            }
-        }
-
-        var StopRoll = setInterval(roll, 60);
-
-        PartArea.onmouseover = function () {
-            clearInterval(StopRoll);
-        }
-        PartArea.onmouseout = function () {
-            StopRoll = setInterval(roll, 60);
-        }
-    </script>
-
-    <div class="mask" style="display: none;"></div>
-    <img class="result success" src="images/result_success.png" style="display: none;">
-    <p class="result_success_title" style="display: none;">输入个人信息进行领奖</p>
-    <img class="result_success_logo" style="display: none;">
-    <input class="result_success_name" type="text" placeholder="姓名" style="display: none;">
-    <input class="result_success_phone" type="text" placeholder="手机号" style="display: none;">
-    <img class="result_success_button" src="images/result_success_button.png" style="display: none;">
-
-    <img class="result failed" src="images/result_failed.png" style="display: none;">
-    <img class="result_failed_button" src="images/result_failed_button.png" style="display: none;">
-    <span class="check_result">查看中奖结果</span>
-</body>
+<!DOCTYPE html>
+<html lang="en" style="width: 100%">
+
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
+    <meta http-equiv="X-UA-Compatible" content="ie=edge">
+    <title>抽奖</title>
+    <script src="js/jquery.min.js"></script>
+    <link rel="stylesheet" href="css/lottery.css" type="text/css" />
+    <script type="text/javascript">
+    	//从localstorage中取得ID
+    	var id = localStorage.getItem("userId");
+        var current = 0;
+        var last = 0;
+        var threshold = 0;
+        var speed = 1;
+        var enable = true;
+        var src = null;
+        $(function () {
+            //进入和窗口缩放时重新设置内容位置
+            setPosition();
+            $(window).resize(function () {
+                setPosition();
+            });
+            //id设置进入localstorage
+            localStorage.setItem("userId", id);
+            //在这里查看是否有id
+            if(id == null){
+            	alert("请先登录");
+            	window.location.href = "index.html";
+            }
+            
+            
+            //获取
+            $.post("../prize/luckDrawList", {}, function(resp) {
+				if (resp.code == 'error') {
+					console.log(resp.code);
+				}else{
+					for(let index in resp.data){
+						$(".advertisement").append("<li>恭喜" + resp.data[index].nickName + "获得了" + resp.data[index].prize + "</li>")
+					}
+				}
+			});
+            
+            //点击查看结果
+            $(".check_result").click(function(){
+            	window.location.href = "result.html";
+            })
+            
+            //点击抽奖
+            $(".button").click(function () {
+                if(enable == true){
+					//获取抽奖结果
+                    $.post("../prize/luckDraw", {userId: id}, function(resp) {
+        				if (resp.code == 'error') {
+        					alert(resp.msg);
+        				}else{
+        					//进入不可点击状态
+                            enable = false;
+                            //设置初始速度
+                            speed = 60;
+                            //设置要中奖的位置 1.5没有 0十二瓶 4一升 2.6五百毫升 3书 7肥皂
+                            if(resp.data.prizeLevel == -1){
+                            	var rand = Math.round(Math.random()*2);
+                            	if(rand <= 1){
+                            		threshold = 1;
+                            	}else{
+                            		threshold = 5; 
+                            	}
+                            }else if(resp.data.prizeLevel == 0){
+                            	threshold = 0;
+                            	src = "images/reward_oil60_2.png";
+                            }else if(resp.data.prizeLevel == 1){
+                            	threshold = 2;   
+                            	src = "images/reward_oil5_2.png";           	
+                            }else if(resp.data.prizeLevel == 2){
+                            	threshold = 4;
+                            	src = "images/reward_oil10_2.png";                          	
+                            }else if(resp.data.prizeLevel == 3){
+                            	threshold = 7;
+                            	src = "images/reward_soap2.png";                          	
+                            }else if(resp.data.prizeLevel == 4){
+                            	threshold = 3;
+                            	src = "images/reward_book2.png";        	
+                            }else{
+                            	threshold = 1;
+                            }
+                            //配置移动次数
+                            last = 56 + threshold - current;
+                            setTimeout(function(){next(current)}, 1000);
+        				}
+        			});
+                }
+            });
+            //谢谢惠顾后点击的按钮
+            $(".result_failed_button").click(function () {
+                window.location.href = "index.html";
+            });
+          	//领取奖品按钮
+            $(".result_success_button").click(function () {
+                var name = $(".result_success_name").val();
+                var phone = $(".result_success_phone").val();
+                if(name == "" || phone == ""){
+                	alert("请填写完整信息");
+                }else{
+                	$.post("../prize/luckDrawAddInfo", {
+                		id: id,
+                		phone: phone,
+                		username: name
+                	}, function(resp) {
+        				if (resp.code == 'error') {
+        					console.log(resp.code);
+        				}else{
+        					alert("填写成功");
+        					window.location.href = "index.html";
+        				}
+        			});
+                }
+            });
+        });
+
+        //重新设置内容位置
+        function setPosition() {
+            $(".pool").css("top", $(document).width() / 1.9);
+            $(".container").css("top", $(document).width() / 1.75).css("height", $(document).width() / 1.6);
+            $(".item").css("height", $(".container").width() / 3.9);
+            $(".title").css("top", $(".container").width() * 2.35);
+            $(".check_result").css("top", $(".container").width() * 2.36);
+            $(".tips").css("top", $(".container").width() * 2.45);
+            $(".mask").css("height", $(document).height());
+            $(".result_failed_button").css("top", $(".container").width() * 1.6);
+            $(".result_success_title").css("top", $(".container").width() * 0.69);
+            $(".result_success_logo").css("top", $(".container").width() * 0.9);
+            $(".result_success_name").css("top", $(".container").width() * 1.35);
+            $(".result_success_phone").css("top", $(".container").width() * 1.59);
+            $(".result_success_button").css("top", $(".container").width() * 1.82);
+            $(".case").css("top", $(".container").width() * 1.9);
+        }
+
+        //激活移动
+        function next() {
+            $(".item" + current).removeClass("active");
+            $(".item" + (current + 1) % 8).addClass("active");
+            current = (current + 1) % 8;
+            //10以下开始减速
+            if(last < 10){
+                speed += 60;
+            }
+            //剩余次数8以下并且到了号时
+            if(!(last-- < 8 && current == threshold)){
+                setTimeout(function(){next()}, speed);
+            }else{
+                setTimeout(function(){
+                    if(threshold == 1 || threshold == 3 || threshold == 5){
+                    	failed();
+                    }else{
+                    	success();
+                    }
+                    enable = true;
+                }, 1500);
+            }
+        }
+
+        //中奖之后
+        function success(){
+            $(".mask").show();
+            $(".success").show();
+            $(".result_success_title").show();
+            $(".result_success_logo").show();
+            $(".result_success_name").show();
+            $(".result_success_phone").show();
+            $(".result_success_button").show();
+        	$(".result_success_logo").attr("src", src);
+        }
+
+        //谢谢惠顾
+        function failed(){
+            $(".mask").show();
+            $(".failed").show();
+            $(".result_failed_button").show();
+        }
+        
+     	//判断微信分享
+        document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
+    		//发送给好友
+    		WeixinJSBridge.on('menu:share:appmessage', function(argv){
+    			$.post("../prize/luckDrawAddShare", {uid: id}, function(resp) {
+    				if (resp.code == 'error') {
+    					console.log(resp.code);
+    				}else{
+    					alert("分享成功");
+    				}
+    			});
+    		});
+    		//分享到朋友圈
+    		WeixinJSBridge.on('menu:share:timeline', function(argv){
+    			$.post("../prize/luckDrawAddShare", {uid: id}, function(resp) {
+    				if (resp.code == 'error') {
+    					console.log(resp.code);
+    				}else{
+    					alert("分享成功");
+    				}
+    			});
+    		}); 
+    	}, false);
+    </script>
+</head>
+
+<body style="width: 100%">
+    <img class="background" src="images/lottery_background.png">
+    <img class="pool" src="images/lottery_pool.png">
+    <div class="container">
+        <img class="item item0" src="images/reward_oil60.png">
+        <img class="item item1" src="images/reward_null.png">
+        <img class="item item2" src="images/reward_oil5.png">
+        <img class="item item7" src="images/reward_soap.png">
+        <img class="item button" src="images/lottery_button.png">
+        <img class="item item3" src="images/reward_book.png">
+        <img class="item item6" src="images/reward_oil5.png">
+        <img class="item item5" src="images/reward_null.png">
+        <img class="item item4" src="images/reward_oil10.png">
+    </div>
+    <span class="title"><span style="color: #FF356B">活动</span>说明</span>
+    <span class="tips">1.中奖者留下姓名和电话,在活动结束后会联系邮寄奖品;<br>
+        2.微博参与抽奖方式:<br>
+        关注@贝蒂斯橄榄油官方微博,转发或评论置顶微博并上传“游戏结果海报”。
+    </span>
+
+    <div class="case">
+        <div class="part2" id="part2">
+            <div id="scroll1">
+                <ul class="advertisement">
+                </ul>
+            </div>
+            <div id="scroll2"></div>
+        </div>
+    </div>
+
+    <script type="text/javascript">
+        var PartArea = document.getElementById('part2');
+        var Scroll1 = document.getElementById('scroll1');
+        var Scroll2 = document.getElementById('scroll2');
+
+        Scroll2.innerHTML = Scroll1.innerHTML;
+
+        function roll() {
+            if(Scroll2.offsetHeight - PartArea.scrollTop <= 0) {
+                PartArea.scrollTop -= Scroll1.offsetHeight;
+            } else {
+                PartArea.scrollTop++;
+            }
+        }
+
+        var StopRoll = setInterval(roll, 60);
+
+        PartArea.onmouseover = function () {
+            clearInterval(StopRoll);
+        }
+        PartArea.onmouseout = function () {
+            StopRoll = setInterval(roll, 60);
+        }
+    </script>
+
+    <div class="mask" style="display: none;"></div>
+    <img class="result success" src="images/result_success.png" style="display: none;">
+    <p class="result_success_title" style="display: none;">输入个人信息进行领奖</p>
+    <img class="result_success_logo" style="display: none;">
+    <input class="result_success_name" type="text" placeholder="姓名" style="display: none;">
+    <input class="result_success_phone" type="text" placeholder="手机号" style="display: none;">
+    <img class="result_success_button" src="images/result_success_button.png" style="display: none;">
+
+    <img class="result failed" src="images/result_failed.png" style="display: none;">
+    <img class="result_failed_button" src="images/result_failed_button.png" style="display: none;">
+    <span class="check_result">查看我的中奖结果</span>
+</body>
 </html>

+ 51 - 39
minigame/WebContent/result.html

@@ -1,40 +1,52 @@
-<!DOCTYPE html>
-<html lang="en" style="width: 100%">
-
-<head>
-    <meta charset="UTF-8">
-    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
-    <meta http-equiv="X-UA-Compatible" content="ie=edge">
-    <title>抽奖结果</title>
-    <style type="text/css">
-    	*{
-    		margin: 0;
-    		padding: 0;
-    	}
-    </style>
-    <script src="js/jquery.min.js"></script>
-    <link href="https://cdn.bootcss.com/twitter-bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet">
-    <script type="text/javascript">
-	    $(function(){
-	    	$.post("prize/luckDrawListBack", {}, function(resp) {
-				if (resp.code == 'error') {
-					console.log(resp.code);
-				}else{
-					for(let index in resp.data){
-						$("table").append("<tr><td>" + resp.data[index].nickName + "</td><td>" + resp.data[index].prize + "</td></tr>")
-					}
-				}
-			});
-		})
-	</script>
-</head>
-
-<body style="width: 100%">
-    <table class="table table-condensed">
-		<tr>
-			<th>昵称</th>
-			<th>奖品</th>
-		</tr>
-	</table>
-</body>
+<!DOCTYPE html>
+<html lang="en" style="width: 100%">
+
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
+    <meta http-equiv="X-UA-Compatible" content="ie=edge">
+    <title>我的抽奖结果</title>
+    <style type="text/css">
+    	*{
+    		margin: 0;
+    		padding: 0;
+    	}
+    </style>
+    <script src="js/jquery.min.js"></script>
+    <link href="https://cdn.bootcss.com/twitter-bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet">
+    <script type="text/javascript">
+	    $(function(){
+	    	var id = localStorage.getItem("userId");
+			if(id != null){
+				$.post("../prize/getluckDrawByUserId", {
+					UserId: id
+				}, function(resp) {
+					if (resp.code == 'error') {
+						console.log(resp.code);
+					}else{
+						if(resp.data.length != 0){
+							for(let index in resp.data){
+								$("table").append("<tr><td>" + resp.data[index].nickName + "</td><td>" + resp.data[index].prize + "</td></tr>");
+							}
+						}else{
+							$("body").append("<p style='text-align: center'>没有中奖信息</p>");
+						}
+						
+					}
+				});
+			}else{
+				$("body").append("<p style='text-align: center'>没有中奖信息!</p>");
+			}
+		})
+	</script>
+</head>
+
+<body style="width: 100%">
+    <table class="table table-condensed">
+		<tr>
+			<th>昵称</th>
+			<th>奖品</th>
+		</tr>
+	</table>
+</body>
 </html>

+ 79 - 0
minigame/WebContent/result_all.html

@@ -0,0 +1,79 @@
+<!DOCTYPE html>
+<html lang="en" style="width: 100%">
+
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
+    <meta http-equiv="X-UA-Compatible" content="ie=edge">
+    <title>抽奖结果</title>
+    <style type="text/css">
+    	*{
+    		margin: 0;
+    		padding: 0;
+    	}
+    </style>
+    <script src="js/jquery.min.js"></script>
+    <link href="https://cdn.bootcss.com/twitter-bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet">
+    <script type="text/javascript">
+	    $(function(){
+			$.post("../prize/luckDrawListBack", {}, function(resp) {
+				if (resp.code == 'error') {
+					console.log(resp.code);
+				}else{
+					for(let index in resp.data){
+						$("table").append(
+								"<tr><td>" + 
+								index +
+								"</td><td>" +
+								resp.data[index].nickName + 
+								"</td><td>" +
+								resp.data[index].prize +
+								"</td><td>" +
+								resp.data[index].userName +
+								"</td><td>" +
+								resp.data[index].phone +
+								"</td><td>" +
+								formatTime(resp.data[index].indate, 'Y-M-D h:m:s') + 
+								"</td></tr>"
+							);
+					}
+				}
+			});
+		})
+		function formatNumber (n) {
+		    n = n.toString()
+		    return n[1] ? n : '0' + n;
+		}
+		function formatTime (number, format) {
+		    let time = new Date(number)
+		    let newArr = []
+		    let formatArr = ['Y', 'M', 'D', 'h', 'm', 's']
+		    newArr.push(time.getFullYear())
+		    newArr.push(formatNumber(time.getMonth() + 1))
+		    newArr.push(formatNumber(time.getDate()))
+		
+		    newArr.push(formatNumber(time.getHours()))
+		    newArr.push(formatNumber(time.getMinutes()))
+		    newArr.push(formatNumber(time.getSeconds()))
+		
+		    for (let i in newArr) {
+		        format = format.replace(formatArr[i], newArr[i])
+		    }
+		    return format;
+		}
+	</script>
+</head>
+
+<body style="width: 100%">
+    <table class="table table-condensed">
+		<tr>
+			<th>#</th>
+			<th>昵称</th>
+			<th>奖品</th>
+			<th>姓名</th>
+			<th>电话</th>
+			<th>时间</th>
+		</tr>
+	</table>
+</body>
+</html>

BIN
minigame/WebContent/sound/6滴只要6滴橄榄油.mp3


BIN
minigame/WebContent/sound/幸福的味道.mp3


BIN
minigame/WebContent/sound/橄榄油加醋又好吃又健康.mp3


BIN
minigame/WebContent/sound/老健康了.mp3


+ 2 - 1
minigame/WebContent/static/lottery.html

@@ -9,7 +9,8 @@
     <script src="js/jquery.min.js"></script>
     <link rel="stylesheet" href="css/lottery.css" type="text/css" />
     <script type="text/javascript">
-    	var id = 3;
+    	//从localstorage中取得ID
+    	var id = localStorage.getItem("userId");
         var current = 0;
         var last = 0;
         var threshold = 0;

BIN
minigame/WebContent/static/sound/6滴只要6滴橄榄油.mp3


BIN
minigame/WebContent/static/sound/幸福的味道.mp3


BIN
minigame/WebContent/static/sound/橄榄油加醋又好吃又健康.mp3


BIN
minigame/WebContent/static/sound/老健康了.mp3