12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- <!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>
|