forked from wobangnidashui/AppleIDAuto
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
188 lines (170 loc) · 6.5 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Apple ID</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" type="text/css" href="./layui/css/layui.css">
<style>
body {
margin: 10px;
}
.carousel {
height: 200px;
line-height: 200px;
text-align: center;
font-size: 45px;
}
.apple-item {
display: flex;
}
.apple-title {
min-width: 60px;
}
#list {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
}
.tips {
padding: 3px 10px;
position: absolute;
top: 0;
width: 100%;
text-align: center;
font-size: 20px;
border: 0;
background-color: rgba(0, 0, 0, .2);
color: #fff;
transition-duration: .3s;
cursor: pointer;
box-sizing: border-box;
}
@media (min-width:1100px) {
.layui-col-md6 {
width: 33%;
}
}
@media (max-width:1100px) {
.layui-col-md6 {
width: 50%;
}
}
@media (max-width:752px) {
.layui-col-md6 {
width: 100%;
}
.carousel {
font-size: 35px;
}
}
@media(max-width:450px) {
.tips {
font-size: 16px;
}
}
</style>
</head>
<body>
<div class="content" style="margin:0 auto;max-width: 1280px;">
<div class="layui-tab layui-tab-brief" lay-filter="demo">
<div class="layui-tab-content">
<div class="layui-tab-item layui-show">
<div class="layui-carousel" id="test1">
<div carousel-item class="carousel">
<div>
<p class="layui-bg-green">请不要从设置登录</p>
</div>
<div>
<p class="layui-bg-red">请不要绑定手机</p>
</div>
<div>
<p class="layui-bg-orange">请不要登录 iCloud </p>
</div>
<div>
<p class="layui-bg-cyan">下载后请务必退出</p>
</div>
</div>
<div class="tips">
不按提示操作导致手机被挂失,后果自负!
</div>
</div>
</div>
</div>
</div>
<div class="layui-bg-gray">
<div class="layui-col-space15" id="list">
</div>
</div>
</div>
<script src="./layui/jquery.min.js"></script>
<script src="./layui/clipboard.min.js"></script>
<script src="./layui/layui.js" charset="utf-8"></script>
<script>
$.getJSON("./data.json", function (data) {
let html = ''
for (const i in data) {
let item = data[i];
html += `
<div class="layui-col-md6">
<div class="layui-panel">
<div style="padding: 50px 30px;line-height: 50px;">
<div class="apple-item">
<div class="apple-title">账号`+ (parseInt(i) + 1) + `:</div>
<div><button type="button" data-clipboard-text="`+ item['id'] + `" class="copy-btn layui-btn">点我复制,请勿绑定手机!</button></div>
</div>
<div class="apple-item">
<div class="apple-title">密码`+ (parseInt(i) + 1) + `:</div>
<div><button type="button" data-clipboard-text="`+ item['passwd'] + `" class="copy-btn layui-btn layui-btn-danger">点我复制,登录iCloud!会变砖!</button></div>
</div>
<div class="apple-item">
<div class="apple-title">状态:</div>
<div> `+ (item['status'] ? '<span class="layui-badge layui-bg-green">正常</span>' : '<span class="layui-badge layui-bg-black">维护中</span>') + `</div>
</div>
<div class="apple-item">
<div class="apple-title">更新于:</div>
<div>`+ item['last_reset_time'] + `</div>
</div>
</div>
</div>
</div>`;
}
$('#list').append(html);
})
var clipboard = new ClipboardJS('.copy-btn');
clipboard.on('success', function (e) {
e.trigger.innerText = e.trigger.innerText.replace('点我', '已');
e.trigger.classList.add('layui-btn-disabled');
e.trigger.classList.remove('copy-btn');
layer.msg('复制成功!', {
time: 3000
});
});
clipboard.on('error', function (e) {
layer.msg('复制失败!', {
time: 3000
});
});
layui.use(['dropdown', 'util', 'layer'], function () {
var element = layui.element;
var layer = layui.layer
, carousel = layui.carousel //轮播
//执行一个轮播实例
carousel.render({
elem: '#test1'
, width: '100%' //设置容器宽度
, height: 200
, arrow: 'none' //不显示箭头
, anim: 'fade' //切换动画方式
});
//监听折叠
element.on('collapse(test)', function (data) {
layer.msg('展开状态:' + data.show);
});
});
</script>
<script src="./data.json"></script>
</body>
</html>