-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathindex.html
More file actions
181 lines (167 loc) · 9.16 KB
/
index.html
File metadata and controls
181 lines (167 loc) · 9.16 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">
<link rel="icon" href="favicon.ico">
<title>出校申请</title>
<link href="/run/static/css/chunk-e5e09d44.d54f7dde.css" rel="prefetch">
<link rel="stylesheet" type="text/css" href="/run/static/css/chunk-e5e09d44.d54f7dde.css">
<link href="/run/static/css/app.8d890870.css" rel="preload" as="style">
<link href="/run/static/css/app.8d890870.css" rel="stylesheet">
<link href="/run/static/css/chunk-vendors.837470ce.css" rel="preload" as="style">
<link href="/run/static/css/chunk-vendors.837470ce.css" rel="stylesheet">
<link href="/run/static/js/app.f3cd1c57.js" rel="preload" as="script">
<link href="/run/static/js/chunk-e5e09d44.ac940c69.js" rel="prefetch">
<script charset="utf-8" src="/run/static/js/chunk-e5e09d44.ac940c69.js"></script>
</head>
<body>
<noscript><strong>We're sorry but vue-admin doesn't work properly without JavaScript enabled. Please enable it to
continue.</strong></noscript>
<div id="app">
<div data-v-69238719="" id="lineCodeHeight" class="bg-theme wp100" style="min-height: 1000px">
<div data-v-0421930a="" data-v-69238719="">
<div data-v-0421930a="" class="navbar" style="z-index: 100;">
<div data-v-0421930a="" class="van-nav-bar van-hairline--bottom">
<div class="van-nav-bar__content">
<div class="van-nav-bar__left"><i class="van-icon van-icon-arrow-left van-nav-bar__arrow">
<!----></i></div>
<div class="van-nav-bar__title van-ellipsis">通行条码</div>
</div>
</div>
</div>
</div>
<div data-v-69238719="" class="pt44">
<ul data-v-69238719="" class="pd20 box-siz wp100">
<li data-v-69238719="" class="bg-white bdr-p5 h120 relative mb10 pos-rel hidden numberClass watermark0">
<div data-v-69238719="" class="radio1"></div>
<div data-v-69238719="" class="radio2"></div>
<div data-v-69238719="" class="title h60 flex justify-center align-center fz23 red"><span
data-v-69238719="">已过期</span></div>
<div data-v-69238719="" class="h60 br">
<div data-v-69238719="" class="flex justify-center align-center mt5">有效期</div>
<div data-v-69238719="" class="flex justify-center align-center mt5">
2022-08-04 16:30 至 2022-08-04 19:30
</div>
</div>
<div id="0"
style="pointer-events: none; top: 5px; left: -305px; position: absolute; z-index: 100000; width: 1e+07px; height: 622px; background: url() left top repeat;"></div>
</li><li data-v-69238719="" class="bg-white bdr-p5 h120 relative mb10 pos-rel hidden numberClass watermark0">
<div data-v-69238719="" class="radio1"></div>
<div data-v-69238719="" class="radio2"></div>
<div data-v-69238719="" class="title h60 flex justify-center align-center fz23 red"><span
data-v-69238719="">已过期</span></div>
<div data-v-69238719="" class="h60 br">
<div data-v-69238719="" class="flex justify-center align-center mt5">有效期</div>
<div data-v-69238719="" class="flex justify-center align-center mt5">
2022-08-11 16:30 至 2022-08-11 18:15
</div>
</div>
<div id="1"
style="pointer-events: none; top: 5px; left: -305px; position: absolute; z-index: 100000; width: 1e+07px; height: 622px; background: url() left top repeat;"></div>
</li><li data-v-69238719="" class="bg-white bdr-p5 h120 relative mb10 pos-rel hidden numberClass watermark0">
<div data-v-69238719="" class="radio1"></div>
<div data-v-69238719="" class="radio2"></div>
<div data-v-69238719="" class="title h60 flex justify-center align-center fz23 red"><span
data-v-69238719="">已过期</span></div>
<div data-v-69238719="" class="h60 br">
<div data-v-69238719="" class="flex justify-center align-center mt5">有效期</div>
<div data-v-69238719="" class="flex justify-center align-center mt5">
2022-08-06 15:00 至 2022-08-06 22:30
</div>
</div>
<div id="2"
style="pointer-events: none; top: 5px; left: -305px; position: absolute; z-index: 100000; width: 1e+07px; height: 622px; background: url() left top repeat;"></div>
</li><li data-v-69238719="" class="bg-white bdr-p5 h120 relative mb10 pos-rel hidden numberClass watermark0">
<div data-v-69238719="" class="radio1"></div>
<div data-v-69238719="" class="radio2"></div>
<div data-v-69238719="" class="title h60 flex justify-center align-center fz23 red"><span
data-v-69238719="">已过期</span></div>
<div data-v-69238719="" class="h60 br">
<div data-v-69238719="" class="flex justify-center align-center mt5">有效期</div>
<div data-v-69238719="" class="flex justify-center align-center mt5">
2022-05-01 09:30 至 2022-05-02 19:30
</div>
</div>
<div id="3"
style="pointer-events: none; top: 5px; left: -305px; position: absolute; z-index: 100000; width: 1e+07px; height: 622px; background: url() left top repeat;"></div>
</li>
</ul>
</div>
</div>
</div>
<script>
var date=new Date();
var year=date.getFullYear();
var month=(date.getMonth()+1)<10?"0"+(date.getMonth()+1):(date.getMonth()+1);
var day=date.getDate()<10?"0"+date.getDate():date.getDate();
var hh=date.getHours()<10?"0"+date.getHours():date.getHours();
var mm=date.getMinutes()<10?"0"+date.getMinutes():date.getMinutes();
var ss=date.getSeconds()<10?"0"+date.getSeconds():date.getSeconds();
var time = function(){
return year+"-"+month+"-"+day+" "+hh+":"+mm+":"+ss;
}
var tomorrow = function(){
return year+"-"+month+"-"+(day+1)+" "+hh+":"+mm+":"+ss;
}
var yesterday = function(){
return year+"-"+month+"-"+(day-1)+" "+hh+":"+mm+":"+ss;
}
let dateLine = document.querySelector("#lineCodeHeight > div.pt44 > ul > li > div.h60.br > div:nth-child(2)")
let today = time().split(' ')[0]
let tomorroww=tomorrow().split(' ')[0]
let yesterdayy=yesterday().split(' ')[0]
if(date.getHours()>4){
dateLine.innerHTML=today+" 08:30 至 "+tomorroww+" 03:30"
}else{dateLine.innerHTML=yesterdayy+" 08:30 至 "+today+" 03:30"}
//生成背景
let a = today
let b = document.createElement("canvas");
b.width = 120;
b.height = 55;
let c = b.getContext("2d");
c.rotate(-15 * Math.PI / -180);
c.font = "18px Vedana";
// c.fillStyle = "rgba(1, 187, 44, 0.40)";
c.fillStyle = "rgba(245, 56, 42, 0.40)";
c.textAlign = "left";
c.textBaseline = "Middle";
c.fillText(a, 15, 27.5);
// 单独给第一挂载绿色
let a1 = today
let b1 = document.createElement("canvas");
b1.width = 120;
b1.height = 55;
let c1 = b1.getContext("2d");
c1.rotate(-15 * Math.PI / -180);
c1.font = "18px Vedana";
c1.fillStyle = "rgba(1, 187, 44, 0.40)";
// c1.fillStyle = "rgba(245, 56, 42, 0.40)";
c1.textAlign = "left";
c1.textBaseline = "Middle";
c1.fillText(a, 15, 27.5);
document.getElementById('0').style.background = "url(" + b1.toDataURL("image/png") + ") left top repeat";
document.getElementById('1').style.background = "url(" + b.toDataURL("image/png") + ") left top repeat";
document.getElementById('2').style.background = "url(" + b.toDataURL("image/png") + ") left top repeat";
document.getElementById('3').style.background = "url(" + b.toDataURL("image/png") + ") left top repeat";
let t = document.getElementsByClassName('title h60')[0];
t.classList.replace('red', 'green');
t.getElementsByTagName('span')[0].innerText = '可通行';
t.nextSibling.lastChild.innerText = a + " 09:00 至 " + a + " 23:59";
let tt = document.getElementsByClassName('wp100')[1].getElementsByTagName('li');
console.log(tt);
tt[tt.length - 1].style.display = 'none'
</script>
<script> <!--背景向左滚动-->
var i=0;
setInterval(()=>{
i--;
document.getElementById('0').style.left=i+'px';
document.getElementById('1').style.left=i+'px';
document.getElementById('2').style.left=i+'px';
document.getElementById('3').style.left=i+'px';
},50)
</script>
</body>
</html>