|
@@ -0,0 +1,76 @@
|
|
|
+<!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>" +
|
|
|
+ "不明地址" +
|
|
|
+ "</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>
|
|
|
+ </tr>
|
|
|
+ </table>
|
|
|
+</body>
|
|
|
+</html>
|