homePage.html
2.15 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>UFO首页</title>
<script type="text/javascript" src="/ufoPlatform/js/vue.min.js"></script>
<style type="text/css">
html, body{
width: 100%;
height: 100%;
}
body {
margin: 0;
padding: 0;
}
.wrapper {
width: 100%;
height: 100%;
}
.main {
width: 100%;
height: 100%;
display: flex;
display: -webkit-flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.main-title {
font-size: 60px;
text-align: center;
color: #515a6e;
text-shadow: 1px 1px 5px #1E88C7;
margin: 20px auto;
}
.main-time {
font-family: "Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","微软雅黑",Arial,sans-serif;
font-size: 30px;
text-align: center;
color: lightgray;
}
</style>
</head>
<body>
<div class="wrapper">
<div id="main" class="main">
<!--<p class="main-title">欢迎进入UFO运营管理平台</p>-->
<p class="main-time">{{time}}</p>
</div>
</div>
<script type="text/javascript">
let app = new Vue({
el: '#main',
data: {
time: ''
},
methods: {
getTime: function () {
let date = new Date();
let time = date.getFullYear() + '-' + (date.getMonth() + 1) + '-' +
date.getDate() + ' ' + (date.getHours() > 9 ? date.getHours() : '0' + date.getHours()) + ':' + (date.getMinutes() > 9 ? date.getMinutes() : '0' + date.getMinutes()) + ':' +
(date.getSeconds() > 9 ? date.getSeconds() : '0' + date.getSeconds());
this.time = time;
setTimeout(this.getTime.bind(this), 1000);
}
},
mounted: function() {
this.getTime();
}
})
</script>
</body>
</html>