初始提交

Win11 动态壁纸引擎:WebView2 + systray + 和风天气
- WebGL 极光背景动画
- 实时天气(24h/7d预报)
- 星座运势(托盘切换)
- 暂停/继续控制
- 单实例互斥锁防双开
- vendor systray 修复 ClickedCh 静默丢弃
This commit is contained in:
2026-05-25 19:03:21 +08:00
commit 196d59269d
11 changed files with 2031 additions and 0 deletions

96
docs/wallpaper-test.html Normal file
View File

@@ -0,0 +1,96 @@
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<title>测试</title>
<style>
body { margin: 0; overflow: hidden; background: #000; }
#test {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
color: #fff;
font-family: sans-serif;
font-size: 24px;
text-align: center;
}
button {
background: #5865f2;
color: #fff;
border: none;
padding: 15px 30px;
font-size: 18px;
border-radius: 8px;
cursor: pointer;
margin: 10px;
}
#result {
margin-top: 20px;
padding: 15px;
background: rgba(76, 175, 80, 0.3);
border-radius: 8px;
font-size: 16px;
}
</style>
</head>
<body>
<div id="test">
<div>🧪 WebView2 测试页面</div>
<button id="btn1">测试按钮1</button>
<button id="btn2">测试按钮2</button>
<div id="result">等待点击...</div>
<div id="time"></div>
</div>
<script>
console.log('=== 页面已加载 ===');
document.addEventListener('DOMContentLoaded', function() {
console.log('DOM loaded');
// 方法1addEventListener推荐
const btn1 = document.getElementById('btn1');
btn1.addEventListener('click', function() {
console.log('按钮1被点击');
document.getElementById('result').innerHTML = '✅ 按钮1点击成功<br>时间: ' + new Date().toLocaleTimeString();
document.getElementById('result').style.background = 'rgba(76, 175, 80, 0.6)';
});
// 方法2addEventListener
const btn2 = document.getElementById('btn2');
btn2.addEventListener('click', function() {
console.log('按钮2被点击');
document.getElementById('result').innerHTML = '✅ 按钮2点击成功<br>时间: ' + new Date().toLocaleTimeString();
document.getElementById('result').style.background = 'rgba(33, 150, 243, 0.6)';
});
// 全局点击测试
document.addEventListener('click', function(e) {
console.log('全局点击事件:', e.target.tagName, e.target.id);
});
console.log('事件监听器已设置');
});
// 更新时间
setInterval(() => {
const timeEl = document.getElementById('time');
if (timeEl) {
timeEl.textContent = '时间: ' + new Date().toLocaleTimeString();
}
}, 1000);
// 鼠标移动测试
let moveCount = 0;
document.addEventListener('mousemove', function() {
moveCount++;
if (moveCount % 60 === 0) {
console.log('鼠标移动计数:', moveCount);
}
});
console.log('=== 初始化完成 ===');
</script>
</body>
</html>