-
Notifications
You must be signed in to change notification settings - Fork 10
/
popup.html
214 lines (213 loc) · 5.75 KB
/
popup.html
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
209
210
211
212
213
214
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>test</title>
<style type="text/css">
body {
font-size: 15px;
color: #000;
}
form {
width: 200px;
display: none;
padding: 0 20px;
}
form input {
width: 100%;
height: 25px;
}
form > div {
display: inline-block;
width: 30.5%;
margin: 5px 1%;
}
form div:before {
content :'*';
color: red;
}
#loginForm > div {
display: block;
width: 100%;
}
form h3 {
margin: 10px 0;
text-align: center;
/*font-size: 18px;*/
}
form h3:before , form h3:after {
content: '---';
padding: 0 10px;
}
.no-required:before {
content: '';
}
button[type="submit"] {
position: relative;
display: block;
width: 100px;
margin: 20px auto;
height: 30px;
cursor: pointer;
}
button[type="submit"].loading:after {
content:'';
position: absolute;
right: 0;
padding: 0 17px 17px 0;
margin-left: 10px;
background: url(loading.gif) no-repeat;
background-size: contain;
}
input[type="radio"] , input[type="checkbox"] {
width: 15px;
vertical-align: -7px;
}
#order {
width: 600px;
}
form select {
width: 100%;
height: 31px;
}
input[name="loop"] {
display: none;
width: 98px;
}
input[value="inquiry"]:checked + input {
display: inline-block;
}
.tip {
/*display: none;*/
font-size: 13px;
color: #aaa2a2;
}
.form2 #loginForm {
display: block;
}
.form3 #order {
display: block;
}
.href {
color: red;
font-size: 13px;
font-weight: normal;
}
.select-wrapper {
position: relative;
}
.select {
display: none;
position: absolute;
width: 185px;
max-height: 265px;
list-style: none;
padding: 0 0 10px 0;
margin: 0;
background-color: #fff;
border: 1px solid #A9A9A9;
border-top: none;
overflow-y: auto;
}
.select:after {
content: '';
display: block;
clear: both;
}
.select li {
float: left;
padding: 0 10px;
margin: 6px 0 0 5px;
line-height: 30px;
background-color: #c8e3fc;
color: #05a;
border-radius: 3px;
}
.select li:hover {
background-color: #69AAE6;
cursor: pointer;
}
.select .no-more {
display: none;
line-height: 30px;
margin: 6px 0 -10px 0;
color: #000;
text-align: center;
color: #888;
}
.select .no-more:nth-child(1) {
display: block;
}
.select::-webkit-scrollbar {
width:18px;
background-color: #F5F5F5;
}
.select::-webkit-scrollbar-thumb {
border-radius: 10px;
background-color: #dddde5;
border: 4px solid #F5F5F5;
}
</style>
<script src="js/popup.js" defer="defer"></script>
<script src="js/update.js"></script>
</head>
<body>
<form id="loginForm">
<h3>12306登录</h3>
<div>用户名:<input type="text" name="user" required></div>
<div>密码:<input type="password" name="pwd" required></div>
<button type="submit">登录</button>
</form>
<form id="order">
<h3>常用联系人<a class="href" target="_blank" href="https://kyfw.12306.cn/otn/passengers/addInit">去设置</a></h3>
<div>姓名:<input type="text" id="passenger_name" name="name" placeholder="自动填写中..." required disabled></div>
<div>身份证:<input type="text" id="passenger_id_no" name="id" placeholder="自动填写中..." required disabled></div>
<div class="no-required">订票手机:<input type="text" id="mobile_no" name="mobile" placeholder="订票成功后接受短信" disabled></div>
<h3>火车信息</h3>
<div>
座位类型:
<select name="type">
<optgroup label="高铁/动车">
<option value="O">二等座</option>
<option value="M">一等座</option>
<option value="9">商务座</option>
</optgroup>
<optgroup label="火车">
<option value="1">硬座</option>
<option value="3">硬卧</option>
<option value="4">软卧</option>
</optgroup>
</select>
</div>
<div class="select-wrapper">
出发地:
<input type="text" name="from" placeholder="广州南" required autocomplete="off" value="深圳北">
<ul class="select"></ul>
</div>
<div class="select-wrapper">
目的地:
<input type="text" name="to" placeholder="北京西" required autocomplete="off" value="厦门北">
<ul class="select"></ul>
</div>
<div>出发日期:<input type="date" name="to_date" placeholder="2016-11-15" required></div>
<div>坐车时间:<input type="time" name="time" placeholder="16:00" required></div>
<!-- <div class="no-required">时间区间:<input type="text" name="time_range" placeholder="[-1,1]表示允许15:00~17:00之间最快班次,-0.5为15:30"></div> -->
<h3>模式</h3>
<div class="no-required">下单:<input type="radio" name="mode" value="buy"></div>
<div class="no-required">
询票:
<input type="radio" name="mode" value="inquiry" checked="checked">
<input type="number" max="60" min="5" step="1" name="loop" placeholder="默认10秒循环">
</div>
<div class="no-required">可选无座:<input type="checkbox" name="can_noSeat" checked></div>
<span class="tip">
1、下单模式:<br>
例如坐车时间:16:00 座位类型:二等座 无票时,如果下一班16:29二等座有票,则自动提交订单<br>
如果下一班16:31二等座有票时,则弹框询问,不超过30分钟内的班次自动提交<br>
2、询票模式:每隔多少秒在后台查询有无票,当有票时桌面通知<br>
3、可选无座模式:首选二等座,次选无座
</span>
<button id="order_submit" type="submit">提交</button>
</form>
</body>
</html>