-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
198 lines (185 loc) · 6.09 KB
/
index.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
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta name="renderer" content="webkit">
<title>兔玩英雄训练营表情包制作工具</title>
<style>
html{
font-size: 100px;
}
html,body,ul,li,form{
padding: 0;
margin:0;
}
body{
background: #06090c url(//res.tuwan.com/templet/weixin/lolhero/images/background.jpg) top no-repeat;
background-size: cover;
}
.contentBox{
}
.form{
z-index: 20;
position: relative;
margin: 10px auto 0;
width: 70%;
color: #ededed;
}
.inputBox{
background: url("//res.tuwan.com/templet/weixin/lolhero/images/input-background.png") no-repeat;
background-size: 100%;
padding-top: 70%;
}
.form label{
text-align: center;
font-size: 0.16rem;
display: block;
}
.first-label{
margin-top: -59%;
margin-bottom: 5px;
}
.form-control{
display: block;
width: 72%;
max-width: 90%;
margin: 0 auto;
border-radius: 0;
border-style: solid;
border-width: 4px;
border-color: rgb(23, 58, 143);
box-shadow: 2.828px 2.828px 0px 0px #cb4b32;
box-sizing: content-box;
height: 25px;
}
.form-control:active,.form-control:focus{
border-radius: 0;
border-style: solid;
border-width: 4px;
border-color: rgb(23, 58, 143);
box-shadow: 2.828px 2.828px 0px 0px #cb4b32;
box-sizing: content-box;
}
h1{
text-align: center;
}
.form label{
display: block;
}
ul,li{
list-style: none;
}
.my-btn{
margin-top: 5%;
display: block;
width:72%;
margin-left: auto;
margin-right: auto;
border-style: solid;
border-width: 4px;
border-color: rgb(23, 58, 143);
border-radius: 0;
box-shadow: 2.828px 2.828px 0 0 #cb4b32;
height: 25px;
background-color: #1ba7f9;
color: #fff;
font-weight: bold;
font-size: 18px;
box-sizing: content-box;
}
.title{
font-size: 0;
margin:15% auto 0;
width: 70%;
}
.title img{
width: 100%;
display: block;
}
@media (max-width: 400px) {
html {
font-size: 90px;
}
.form-control{
height: 23px;
font-size: 12px;
line-height: 23px;
}
}
@media (max-width: 370px) {
html {
font-size: 80px;
}
.honor i.minion{
display: none;
}
}
@media (max-width: 330px) {
label.first-label{
margin-top: -62%;
}
}
</style>
<script src="//cdn.tgp.qq.com/lol/conf/LOLGameArea.js"></script>
<script src="//res.tuwan.com/templet/weixin/lolhero/js/util.js"></script>
<script>
window.onload=function(){
var player,areaid;
player=document.getElementById("player");
areaid=document.getElementById("areaid");
var form=document.getElementById("form");
var championLines;
//获取英雄
util.ajax({
url:"//res.tuwan.com/templet/weixin/lolhero/js/championLines.json",
type:"GET",
success:function(response){
// if(localStorage.player){
// player.value=localStorage.player;
// }
championLines=response.data;
var areaTxt="";
for(var j in window["PLS"]["LOLGameArea"]){
var selected="";
if(localStorage.areaid&&localStorage.areaid===j){
selected="selected";
log(window["PLS"]["LOLGameArea"][j].name)
}
areaTxt+='<option value="'+j+'" '+selected+'>'+window["PLS"]["LOLGameArea"][j].name+'</option>';
}
areaid.innerHTML=areaTxt;
form.addEventListener("submit",function(e){
e.preventDefault();
if(player.value){
localStorage.setItem('player',player.value);
localStorage.setItem('areaid',areaid.value);
var url="//wx.tuwan.com/events/lolhero_selectChampion?player="+player.value+"&areaid="+areaid.value;
window.location.href=url;
}else{
alert("请输入召唤师名称");
}
});
}
});
}
</script>
</head>
<body>
<div class="contentBox">
<div class="title">
表情包制作工具
<img src="//res.tuwan.com/templet/weixin/lolhero/images/title1.png">
</div>
<form action="" class="form" id="form" >
<div class="inputBox">
<label for="player" class="first-label">输入召唤师名称<input name="player" id="player" class="form-control"></label>
<label for="areaid">选择大区<select name="areaid" id="areaid" class="form-control"></select></label>
</div>
<input type="submit" id="submit" class="btn btn-primary my-btn" value="确定">
</form>
</div>
</body>
</html>