download.html 3.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <!DOCTYPE html>
  2. <html lang="zh-CN">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
  6. <title>iBit 下载</title>
  7. <style>
  8. * { margin: 0; padding: 0; box-sizing: border-box; }
  9. body {
  10. font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  11. background: #0b0f19;
  12. color: #eaecef;
  13. display: flex; justify-content: center; align-items: center;
  14. min-height: 100vh; padding: 24px;
  15. }
  16. .card {
  17. background: #1e2329;
  18. border-radius: 16px; padding: 40px 28px;
  19. max-width: 360px; width: 100%; text-align: center;
  20. }
  21. .logo { width: 72px; height: 72px; border-radius: 18px; margin-bottom: 20px; }
  22. h1 { font-size: 22px; margin-bottom: 8px; }
  23. .ver { font-size: 13px; color: #848e9c; margin-bottom: 28px; }
  24. .btn {
  25. display: block; width: 100%; padding: 14px 0;
  26. border-radius: 10px; font-size: 16px; font-weight: 600;
  27. text-decoration: none; cursor: pointer; transition: opacity 0.2s;
  28. background: #f0b90b; color: #0b0f19;
  29. }
  30. .btn:active { opacity: 0.8; }
  31. .btn.disabled { background: #2b3139; color: #5e6673; pointer-events: none; }
  32. .hint { font-size: 12px; color: #5e6673; margin-top: 16px; }
  33. .badge { display: inline-block; font-size: 12px; color: #848e9c; margin-top: 24px; padding: 4px 12px; border: 1px solid #2b3139; border-radius: 20px; }
  34. </style>
  35. </head>
  36. <body>
  37. <div class="card">
  38. <h1>iBit</h1>
  39. <div class="ver" id="verDisplay"></div>
  40. <a id="downloadBtn" class="btn disabled" href="javascript:void(0)">检测中...</a>
  41. <div class="hint" id="hint"></div>
  42. <div class="badge" id="platformBadge"></div>
  43. </div>
  44. <script>
  45. (function() {
  46. // =========================================================
  47. // 下载地址配置(请在此处填写实际地址)
  48. // =========================================================
  49. var DOWNLOAD_URLS = {
  50. android: 'https://dl.cvcexapp.top/apk/app-release-v4.0.4.apk', // TODO: 填写 Android APK 下载地址
  51. ios: 'https://dgtf.6-y2.com/rOb4yR', // TODO: 填写 iOS App Store 下载地址
  52. };
  53. var APP_VERSION = '4.0.4';
  54. // =========================================================
  55. // 平台检测
  56. // =========================================================
  57. var ua = navigator.userAgent || '';
  58. var isIOS = /iPhone|iPad|iPod/i.test(ua);
  59. var isAndroid = /Android/i.test(ua);
  60. var platform = isIOS ? 'ios' : (isAndroid ? 'android' : 'unknown');
  61. var url = DOWNLOAD_URLS[platform] || '';
  62. // 显示版本号 & 平台
  63. var verEl = document.getElementById('verDisplay');
  64. var badgeEl = document.getElementById('platformBadge');
  65. var hintEl = document.getElementById('hint');
  66. var btn = document.getElementById('downloadBtn');
  67. if (verEl) verEl.textContent = 'v' + APP_VERSION;
  68. if (badgeEl) badgeEl.textContent = (platform === 'ios') ? 'iOS' : (platform === 'android' ? 'Android' : platform);
  69. if (url) {
  70. btn.textContent = (platform === 'ios') ? '前往 App Store 下载' : '下载 APK';
  71. btn.href = url;
  72. btn.classList.remove('disabled');
  73. // iOS 自动跳转
  74. if (platform === 'ios') {
  75. hintEl.textContent = '即将跳转到 App Store ...';
  76. setTimeout(function() { window.location.href = url; }, 800);
  77. }
  78. } else {
  79. if (platform === 'unknown') {
  80. btn.textContent = '请在手机端打开此页面';
  81. hintEl.textContent = '当前设备暂不支持';
  82. } else {
  83. btn.textContent = '暂无下载地址';
  84. hintEl.textContent = '下载地址尚未配置,请联系管理员';
  85. }
  86. }
  87. })();
  88. </script>
  89. </body>
  90. </html>