-
Notifications
You must be signed in to change notification settings - Fork 2
/
file.php
92 lines (76 loc) · 1.61 KB
/
file.php
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
<?php
/**
* @name 生蚝体育竞赛管理系统-Web2-赛事资料
* @author Jerry Cheung <[email protected]>
* @since 2019-06-02
* @version 2019-07-22
*/
?>
<!DOCTYPE html>
<html>
<?php
$pageName='赛事资料下载';
include 'include/header.php';
?>
<?php include 'include/component.php'; ?>
<body style="background-color:#57c5e2;">
<div id="app">
<choose-games-modal></choose-games-modal>
<page-navbar></page-navbar>
<games-title ref="header"></games-title>
<div class="container">
<div class="row">
<games-navbar></games-navbar>
<div class="col-md-10">
<table class="table table-bordered table-hover">
<thead>
<tr class="text-center bg-info">
<th class="text-center">文 件 名 称</th>
<th class="text-center">下 载</th>
</tr>
</thead>
<tbody>
<tr class="text-center" v-if="fileList.length<1">
<td colspan="2">暂 无 资 料</td>
</tr>
<tr class="text-center" v-else v-for="fileInfo in fileList">
<td>{{fileInfo['name']}}</td>
<td><a v-bind:href="fileInfo['url']" target="_blank">查看并下载</a></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<script>
var vm = new Vue({
el:'#app',
data:{
gamesInfo:{},
fileList:{}
},
methods:{
getFileList:()=>{
$.ajax({
url:'/api/getFile',
data:{'id':vm.gamesInfo['id']},
dataType:'json',
error:e=>{
console.log(e);
},
success:ret=>{
vm.fileList=ret.data;
}
})
}
},
mounted:function(){
this.gamesInfo=this.$refs.header.gamesInfo;
}
});
vm.getFileList();
</script>
<?php include 'include/footer.php'; ?>
</body>
</html>