-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathindex.html
More file actions
159 lines (151 loc) · 6.21 KB
/
index.html
File metadata and controls
159 lines (151 loc) · 6.21 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta content="yes" name="apple-mobile-web-app-capable"/>
<meta content="black" name="apple-mobile-web-app-status-bar-style"/>
<meta name="format-detection" content="telephone=no"/>
<meta content="false" name="twcClient" id="twcClient"/>
<title>资源库</title>
<link rel="stylesheet" href="styles.css">
<style>
/* 微信提示样式 */
.weixin-tip {
display: none;
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100%;
background: rgba(255, 255, 255, 0.9);
z-index: 1999;
}
.weixin-tip .top-bar-guidance {
font-size: 15px;
color: #fff;
height: 40%;
line-height: 1.8;
padding-left: 20px;
padding-top: 20px;
background: url(//gw.alicdn.com/tfs/TB1eSZaNFXXXXb.XXXXXXXXXXXX-750-234.png) center top/contain no-repeat;
}
.weixin-tip .top-bar-guidance .icon-safari {
width: 25px;
height: 25px;
vertical-align: middle;
margin: 0 .2em;
}
.weixin-tip .app-download-btn {
display: block;
width: 214px;
height: 40px;
line-height: 40px;
margin: 18px auto 0 auto;
text-align: center;
font-size: 18px;
color: #2466f4;
border-radius: 20px;
border: .5px #2466f4 solid;
text-decoration: none;
}
</style>
</head>
<body>
<!-- 微信提示界面 -->
<div class="weixin-tip">
<div class="top-bar-guidance">
<p>点击右上角<img src="//gw.alicdn.com/tfs/TB1xwiUNpXXXXaIXXXXXXXXXXXX-55-55.png" class="icon-safari"/>在浏览器打开</p>
<p>可以继续访问本站哦~</p>
</div>
</div>
<div class="wrapper">
<div id="bubbles-container">
<!-- 气泡将通过 JavaScript 动态生成 -->
</div>
</div>
<div id="loading-overlay" class="loading-overlay">
<div class="loading-spinner"></div>
<div id="loading-text">正在加载数据...</div>
</div>
<div class="content">
<h1>资源库</h1>
<h2>数据源: <a href="https://panhub.fun/" target="_blank">https://panhub.fun/</a></h2>
<div class="filters">
<button onclick="filterSelection('all')" class="active">全部</button>
<button onclick="filterSelection('1')">短剧</button>
<button onclick="filterSelection('11')">学习</button>
<button onclick="filterSelection('8')">游戏</button>
<button onclick="filterSelection('9')">软件</button>
</div>
<input type="text" id="search-input" placeholder="搜索资源" oninput="searchTable()">
<div class="action-buttons">
<button onclick="downloadData()">下载数据表</button>
<button onclick="downloadLinks()">仅下载链接</button>
<span id="data-count">已加载数据:0</span> <!-- 用于动态显示数据数量 -->
<div class="items-per-page">
<label for="items-per-page-select">每页显示:</label>
<select id="items-per-page-select">
<option value="6">6</option>
<option value="15" selected>15</option>
<option value="21">21</option>
<option value="30">30</option>
</select>
</div>
</div>
<div id="resource-list" class="resource-list">
<!-- 资源卡片将通过 JavaScript 动态生成 -->
</div>
<div class="pagination" id="pagination">
<!-- 分页按钮将通过 JavaScript 动态生成 -->
</div>
</div>
<script src="scripts.js"></script>
</div>
<script>
document.querySelector('body').addEventListener('touchmove', function (event) {
event.preventDefault();
});
window.mobileUtil = (function(win, doc) {
var UA = navigator.userAgent,
isAndroid = /android|adr/gi.test(UA),
isIOS = /iphone|ipod|ipad/gi.test(UA) && !isAndroid,
isBlackBerry = /BlackBerry/i.test(UA),
isWindowPhone = /IEMobile/i.test(UA),
isMobile = isAndroid || isIOS || isBlackBerry || isWindowPhone;
return {
isAndroid: isAndroid,
isIOS: isIOS,
isMobile: isMobile,
isWeixin: /MicroMessenger/gi.test(UA),
isQQ: /QQ/gi.test(UA)
};
})(window, document);
if(mobileUtil.isWeixin){
// 隐藏主要内容
document.querySelector('.content').style.display = 'none';
document.querySelector('.weixin-tip').style.display = 'block';
var url = window.location.href; // 默认使用当前页面的网址
if(mobileUtil.isIOS){
// iOS设备直接跳转到中转页面
document.getElementById('BtnClick').onclick = function() {
window.location.href = "https://t.asczwa.com/taobao?backurl=" + encodeURIComponent(url);
};
} else if(mobileUtil.isAndroid){
// 安卓设备使用文件下载触发外部浏览器
document.getElementById('BtnClick').onclick = function() {
var link = document.createElement('a');
link.href = url;
link.download = 'weixin.doc';
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
setTimeout(function() {
window.location.href = url;
}, 500);
};
}
}
</script>
</body>
</html>