<!-- 本DIY代码来自于 https://diy.zhongzhipian.top -->
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>极光 - 卡密验证</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Microsoft YaHei', sans-serif;
}
body {
background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
color: #fff;
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 20px;
position: relative;
overflow: hidden;
}
/* 极光背景效果 */
.aurora {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: -1;
overflow: hidden;
}
.aurora-layer {
position: absolute;
width: 150%;
height: 150%;
top: -25%;
left: -25%;
opacity: 0.4;
filter: blur(40px);
}
.layer-1 {
background: linear-gradient(45deg, #00b4db, #0083b0);
animation: aurora-move 15s infinite linear;
}
.layer-2 {
background: linear-gradient(135deg, #ff9a9e, #fecfef);
animation: aurora-move 20s infinite linear reverse;
}
.layer-3 {
background: linear-gradient(225deg, #a8edea, #fed6e3);
animation: aurora-move 25s infinite linear;
opacity: 0.3;
}
@keyframes aurora-move {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
.container {
max-width: 500px;
width: 100%;
padding: 30px;
background: rgba(255, 255, 255, 0.08);
backdrop-filter: blur(10px);
border-radius: 15px;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
border: 1px solid rgba(255, 255, 255, 0.1);
z-index: 1;
margin-bottom: 20px;
}
.title {
text-align: center;
font-size: 32px;
margin-bottom: 30px;
color: #fff;
text-shadow: 0 0 10px rgba(0, 183, 255, 0.5);
letter-spacing: 2px;
}
.input-group {
margin-bottom: 25px;
}
.input-group label {
display: block;
margin-bottom: 8px;
font-size: 16px;
color: #a0e7ff;
}
.input-group input {
width: 100%;
padding: 12px 15px;
background: rgba(255, 255, 255, 0.1);
border: 1px solid rgba(255, 255, 255, 0.2);
border-radius: 8px;
color: #fff;
font-size: 16px;
transition: all 0.3s ease;
}
.input-group input:focus {
outline: none;
border-color: #00b4db;
box-shadow: 0 0 10px rgba(0, 180, 219, 0.5);
}
.button-group {
display: flex;
gap: 15px;
margin-bottom: 20px;
}
button {
flex: 1;
padding: 12px;
border: none;
border-radius: 8px;
font-size: 16px;
font-weight: bold;
cursor: pointer;
transition: all 0.3s ease;
}
.verify-btn {
background: linear-gradient(45deg, #00b4db, #0083b0);
color: white;
}
.verify-btn:hover {
background: linear-gradient(45deg, #00c6ff, #0072ff);
transform: translateY(-2px);
box-shadow: 0 5px 15px rgba(0, 180, 219, 0.4);
}
.trial-btn {
background: linear-gradient(45deg, #ff9a9e, #fecfef);
color: #333;
}
.trial-btn:hover {
background: linear-gradient(45deg, #ff758c, #ff7eb3);
transform: translateY(-2px);
box-shadow: 0 5px 15px rgba(255, 122, 156, 0.4);
}
.pay-btn {
background: linear-gradient(45deg, #56ab2f, #a8e063);
color: white;
width: 100%;
margin-top: 15px;
}
.pay-btn:hover {
background: linear-gradient(45deg, #56ab2f, #8dc63f);
transform: translateY(-2px);
box-shadow: 0 5px 15px rgba(86, 171, 47, 0.4);
}
.notice-box {
margin-top: 30px;
padding: 20px;
background: rgba(255, 255, 255, 0.05);
border-radius: 10px;
border-left: 3px solid #00b4db;
}
.notice-title {
font-size: 18px;
margin-bottom: 10px;
color: #a0e7ff;
}
.notice-content {
line-height: 1.6;
color: #e0e0e0;
}
.footer {
text-align: center;
font-size: 14px;
color: rgba(255, 255, 255, 0.6);
margin-bottom: 20px;
}
/* 视频播放器样式 */
.video-section {
width: 100%;
max-width: 600px;
text-align: center;
}
.video-container {
position: relative;
width: 100%;
border-radius: 10px;
overflow: hidden;
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}
video {
width: 100%;
display: block;
}
.video-controls {
display: flex;
align-items: center;
justify-content: space-between;
background: rgba(0, 0, 0, 0.7);
padding: 10px 15px;
}
.control-btn {
background: none;
border: none;
color: white;
font-size: 16px;
cursor: pointer;
padding: 5px 10px;
border-radius: 5px;
transition: background 0.3s;
}
.control-btn:hover {
background: rgba(255, 255, 255, 0.2);
}
.volume-control {
display: flex;
align-items: center;
gap: 8px;
}
.volume-slider {
width: 80px;
height: 5px;
background: rgba(255, 255, 255, 0.3);
border-radius: 5px;
outline: none;
-webkit-appearance: none;
}
.volume-slider::-webkit-slider-thumb {
-webkit-appearance: none;
width: 15px;
height: 15px;
border-radius: 50%;
background: #00b4db;
cursor: pointer;
}
.loading-indicator {
display: none;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
color: white;
font-size: 16px;
background: rgba(0, 0, 0, 0.7);
padding: 10px 15px;
border-radius: 5px;
}
@media (max-width: 600px) {
.container {
padding: 20px;
}
.button-group {
flex-direction: column;
}
.video-controls {
flex-wrap: wrap;
justify-content: center;
gap: 10px;
}
}
/* 确保页面高度适应 */
@media (max-height: 800px) {
.container {
padding: 15px;
margin-bottom: 10px;
}
.title {
font-size: 26px;
margin-bottom: 20px;
}
.input-group {
margin-bottom: 15px;
}
.button-group {
margin-bottom: 15px;
}
.notice-box {
margin-top: 20px;
padding: 15px;
}
}
</style>
</head>
<body>
<!-- 极光背景 -->
<div class="aurora">
<div class="aurora-layer layer-1"></div>
<div class="aurora-layer layer-2"></div>
<div class="aurora-layer layer-3"></div>
</div>
<div class="container">
<h1 class="title" id="title">极光</h1>
<div class="input-group">
<label for="cardInput">请输入卡密</label>
<input type="text" id="cardInput" placeholder="请输入您的卡密...">
</div>
<div class="button-group">
<button class="verify-btn" onclick="Call_Verify(document.getElementById('cardInput').value)">验证</button>
<button class="trial-btn" id="Query_Trial" onclick="Call_Query_Trial(document.getElementById('cardInput').value)">试用</button>
</div>
<button class="pay-btn" id="Pay" onclick="Call_Pay()" style="display: none;">立即支付</button>
<div class="notice-box">
<div class="notice-title">公告</div>
<div class="notice-content" id="notice">这是公告内容</div>
</div>
</div>
<div class="footer">
©中纸片 zhongzhipian.top
</div>
<!-- 视频播放器部分 -->
<div class="video-section">
<div class="video-container">
<video id="demoVideo" preload="auto">
<source src="https://mpimg.cn/down.php/a92d10a2467443086c56ccd7adc1cba3.mp4" type="video/mp4">
您的浏览器不支持HTML5视频播放。
</video>
<div class="loading-indicator" id="loadingIndicator">视频加载中...</div>
<div class="video-controls">
<button class="control-btn" id="playPauseBtn">播放</button>
<div class="volume-control">
<span>音量:</span>
<input type="range" class="volume-slider" id="volumeSlider" min="0" max="1" step="0.1" value="1">
</div>
</div>
</div>
</div>
<script>
// 初始化页面
document.addEventListener('DOMContentLoaded', function() {
document.getElementById("title").innerHTML = PanGolin.GetTitle();
document.getElementById("notice").innerHTML = PanGolin.GetNotice();
document.getElementById("Query_Trial").innerHTML = PanGolin.Is_Trial() == true ? "试用": "查码";
document.getElementById("Pay").style.display = PanGolin.Is_Pay() == true ? "block": "none";
// 视频控制初始化
initVideoControls();
});
function Call_Verify(data) {
PanGolin.Verify(data);
}
function Call_Query_Trial(data) {
if (PanGolin.Is_Trial()) {
PanGolin.Trial();
} else {
PanGolin.Query(data);
}
}
function Call_Pay() {
PanGolin.Pay();
}
// 视频控制功能
function initVideoControls() {
const video = document.getElementById('demoVideo');
const playPauseBtn = document.getElementById('playPauseBtn');
const volumeSlider = document.getElementById('volumeSlider');
const loadingIndicator = document.getElementById('loadingIndicator');
// 显示加载指示器
loadingIndicator.style.display = 'block';
// 设置初始音量为100%
video.volume = 1;
// 初始状态:不设置loop,留给播放时动态开启
// 当视频元数据加载时,确保显示第一帧(预加载封面)
video.addEventListener('loadedmetadata', function() {
video.currentTime = 0; // 设置到第一帧,确保显示封面
});
// 当视频可以播放时隐藏加载指示器
video.addEventListener('canplay', function() {
loadingIndicator.style.display = 'none';
updatePlayPauseButton(); // 初始更新按钮状态
});
// 使用视频事件监听器更新按钮状态,更可靠
video.addEventListener('play', function() {
updatePlayPauseButton();
});
video.addEventListener('pause', function() {
updatePlayPauseButton();
});
// 添加waiting事件监听,处理缓冲卡顿时临时显示加载或防止状态错误
video.addEventListener('waiting', function() {
console.log("视频缓冲中...");
// 可选:临时显示加载指示器
// loadingIndicator.style.display = 'block';
});
// 添加playing事件监听,当缓冲完成后实际播放时更新
video.addEventListener('playing', function() {
console.log("视频开始/恢复播放...");
// 隐藏加载指示器(如果显示了)
// loadingIndicator.style.display = 'none';
updatePlayPauseButton(); // 确保在恢复播放时按钮正确
});
// 按钮状态更新函数
function updatePlayPauseButton() {
playPauseBtn.textContent = video.paused ? '播放' : '暂停';
}
// 播放/暂停功能(仅触发播放/暂停,不直接更新按钮)
playPauseBtn.addEventListener('click', function() {
if (video.paused) {
// 恢复播放:取消静音、设置循环、播放
video.muted = false;
video.loop = true; // 开启循环
video.play().catch(e => {
console.log("播放失败:", e);
});
} else {
video.pause();
}
// 立即更新按钮状态(作为备份,防止事件延迟)
setTimeout(updatePlayPauseButton, 0);
});
// 音量控制
volumeSlider.addEventListener('input', function() {
video.volume = volumeSlider.value;
});
// 视频结束事件:辅助确保循环(浏览器loop属性会自动处理重播)
video.addEventListener('ended', function() {
if (video.loop) {
// loop生效时,浏览器自动重播,无需额外操作
console.log("视频循环播放中...");
} else {
updatePlayPauseButton();
}
});
// 额外:监听progress事件以监控缓冲(可选,增强预加载反馈)
video.addEventListener('progress', function() {
if (video.buffered.length > 0) {
console.log("视频缓冲进度:", (video.buffered.end(0) / video.duration) * 100 + "%");
}
});
// 预加载视频
video.load();
}
</script>
</body>
</html>
<!-- 本DIY代码来自于 https://diy.zhongzhipian.top -->