-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathgamesEntryList.php
More file actions
208 lines (182 loc) · 5.8 KB
/
gamesEntryList.php
File metadata and controls
208 lines (182 loc) · 5.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
<?php
/**
* @name 生蚝体育竞赛管理系统-Web2-赛事列表
* @author Jerry Cheung <[email protected]>
* @since 2019-05-30
* @version 2019-07-22
*/
?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>生蚝体育竞赛管理系统 / 生蚝科技</title>
<link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="/resource/css/util.css">
<script src="https://cdn.bootcss.com/jquery/3.1.0/jquery.min.js"></script>
<!-- 开发环境版本,包含了有帮助的命令行警告 -->
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="/resource/js/back2top.js"></script>
<script src="/resource/js/util.js"></script>
<style type="text/css">
html,body {
font-family:微软雅黑;
margin: 0;
padding:0;
height: 100%;
}
th{
text-align:center;
}
#container {
min-height:60%;
height: auto !important;
height: 60%;
position: relative;
}
.bs-docs-header{
color:white;
margin-top:-20px;
background-image:url('/resource/image/swimming.jpg');
height:230px;
background-size: 100% 100%;
background-repeat: no-repeat;
padding:30px 15px;
}
@media (min-width:768px){
.bs-docs-header{padding-top:60px;padding-bottom:60px;text-align:left}
.bs-docs-header h1{font-size:60px;line-height:1}
}
@media (min-width:992px){
.bs-docs-header h1,.bs-docs-header p{margin-right:380px}
}
</style>
</head>
<body style="background-color:#57c5e2">
<?php include 'include/component.php'; ?>
<!-- Vue Area -->
<div id="app">
<page-navbar></page-navbar>
<div class="bs-docs-header">
<div class="container">
<h1>赛事报名</h1>
<h2>赛事在线报名、运动员资料管理</h2>
</div>
</div>
<div class="container" style="padding-top: 15px;">
<div class="row">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">赛事列表</h3>
</div>
<div class="table-responsive">
<table class="table table-hover table-striped">
<thead>
<tr>
<th>#</th>
<th>赛事名称</th>
<th>开始日</th>
<th>结束日</th>
<th>操作</th>
</tr>
</thead>
<tbody>
<tr v-for="(gamesInfo,index) in gamesList">
<td style="text-align:center;vertical-align:middle;">{{(nowPage-1)*perPageRow+index+1}}</td>
<td style="vertical-align:middle;">{{gamesInfo['name']}}</td>
<td style="text-align:center;vertical-align:middle;">{{gamesInfo['startDate']}}</td>
<td style="text-align:center;vertical-align:middle;">{{gamesInfo['endDate']}}</td>
<td style="text-align:center;vertical-align:middle;"><button class="btn btn-success" @click="enterGames(gamesInfo)"><i class="fa fa-search" aria-hidden="true"></i> 报 名</button></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<!-- 分页条 -->
<div style="text-align:center;margin-top:-20px;">
<ul id="myPaginator" class="pagination">
<li v-for="pageNum in totalPage" v-if="pageNum==nowPage" class="active"><a>{{pageNum}}</a></li>
<li v-else><a @click="getList(pageNum)">{{pageNum}}</a></li>
</ul>
</div>
<!-- 记录数 -->
<div class="row">
<div class="col-md-12" style="text-align:center;">
<p style="color:#ffffff">记录总数:<span class="badge">{{totalRow}}</span></p>
</div>
</div>
</div>
</div>
<!-- ./Vue Area -->
<script>
var totalPages=1;
var vm = new Vue({
el:'#app',
data:{
nowPage:1,
gamesList:{},
totalRow:0,
totalPage:0,
perPageRow:5
},
methods:{
getList:(page=1)=>{
$.ajax({
url:'/api/getGamesEntryList',
data:{'page':page,'rows':vm.perPageRow},
crossDomain:true,
dataType:'json',
success:function(ret){
if(ret.code==200){
let list=ret.data['list'];
for(i in list){
let extraJson=JSON.parse(list[i]['extra_json']);
for(j in extraJson){
list[i][j]=extraJson[j];
}
delete list[i]['extra_json'];
}
vm.nowPage=page;
vm.gamesList=list;
vm.totalRow=ret.data['totalRow'];
vm.totalPage=ret.data['totalPage'];
}
}
})
},
enterGames:(info)=>{
sessionStorage.setItem("OTSCMS_DA2_gamesInfo",JSON.stringify(info));
window.location.href="gamesIndex";
}
}
});
vm.getList();
</script>
<!-- footer -->
<div style="color:#FFFF00;text-align:center;font-weight:bold;font-size:18px;line-height:29px;">
<hr>
© 2014-2019 生蚝科技
<a style="color:#07C160" data-toggle="modal" data-target="#wxModal"><i class="fa fa-weixin fa-lg" aria-hidden="true"></i></a>
<a style="color:#FF7043" onclick='launchQQ()'><i class="fa fa-qq fa-lg" aria-hidden="true"></i></a>
<a style="color:#29B6F6" href="mailto:[email protected]"><i class="fa fa-envelope fa-lg" aria-hidden="true"></i></a>
<a style="color:#AB47BC" href="https://github.com/OysterTech" target="_blank"><i class="fa fa-github fa-lg" aria-hidden="true"></i></a>
<br>
All Rights Reserved.<br>
粤ICP备19018320号-1<br>
<!-- 友情链接 -->
<p style="color:white;font-size:16px;">
友情链接:<a href="http://swimming.sport.org.cn/" target="_blank" style="color:white;">中国游泳协会</a> | <a href="http://www.gdswim.org/" target="_blank" style="color:white;">广东省游泳协会</a>
</p>
<!-- ./友情链接 -->
<a href="/admin" target="_blank" style="color:white;font-size:16px;">登 入 管 理 后 台</a>
<br><br>
</div>
<!-- ./footer -->
</body>
</html>