app-download.html 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  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, viewport-fit=cover">
  6. <title>移动端下载</title>
  7. <style>
  8. * { box-sizing: border-box; }
  9. body {
  10. margin: 0;
  11. min-height: 100vh;
  12. display: flex;
  13. align-items: center;
  14. justify-content: center;
  15. padding: 24px;
  16. color: #1a2332;
  17. background: linear-gradient(135deg, #dcebff 0%, #f2f7ff 45%, #e7f0ff 100%);
  18. font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  19. }
  20. .card {
  21. width: 100%;
  22. max-width: 420px;
  23. padding: 32px 28px;
  24. text-align: center;
  25. background: #fff;
  26. border: 1px solid rgba(255, 255, 255, .9);
  27. border-radius: 18px;
  28. box-shadow: 0 24px 60px rgba(42, 92, 170, .16);
  29. }
  30. .logo {
  31. width: 56px;
  32. height: 56px;
  33. display: block;
  34. margin: 0 auto 18px;
  35. object-fit: contain;
  36. border-radius: 12px;
  37. background: #fff;
  38. }
  39. h1 {
  40. margin: 0 0 8px;
  41. font-size: 20px;
  42. font-weight: 700;
  43. }
  44. .subtitle {
  45. margin: 0 0 24px;
  46. color: #52627a;
  47. font-size: 13px;
  48. line-height: 1.7;
  49. }
  50. .status {
  51. min-height: 22px;
  52. margin-bottom: 20px;
  53. padding: 10px 12px;
  54. border-radius: 8px;
  55. color: #1e66e8;
  56. background: #eef5ff;
  57. font-size: 13px;
  58. line-height: 1.6;
  59. }
  60. .links {
  61. display: grid;
  62. gap: 10px;
  63. }
  64. .links a {
  65. display: block;
  66. padding: 12px 16px;
  67. border: 1px solid #bfdbfe;
  68. border-radius: 10px;
  69. color: #2563eb;
  70. background: #eff6ff;
  71. font-size: 14px;
  72. font-weight: 600;
  73. text-decoration: none;
  74. transition: background-color .2s, border-color .2s;
  75. }
  76. .links a:hover {
  77. border-color: #93c5fd;
  78. background: #dbeafe;
  79. }
  80. .hint {
  81. margin: 18px 0 0;
  82. color: #8a9ab2;
  83. font-size: 12px;
  84. line-height: 1.7;
  85. }
  86. </style>
  87. </head>
  88. <body>
  89. <main class="card">
  90. <img class="logo" src="./logo.png" alt="平台 Logo">
  91. <h1>智慧管网移动端下载</h1>
  92. <p class="subtitle">将自动识别手机操作系统并打开对应安装包</p>
  93. <div id="status" class="status" aria-live="polite">正在识别设备,请稍候…</div>
  94. <div class="links">
  95. <a id="android-link" href="http://119.44.236.37:9001/minio/public/pipe.apk">Android 版下载</a>
  96. <a id="ios-link" href="http://119.44.236.37:9001/minio/public/pipe-ios.mobileconfig">IOS 版下载</a>
  97. </div>
  98. <p class="hint">如未自动跳转,请点击上方对应系统的手动下载。</p>
  99. </main>
  100. <script>
  101. (function () {
  102. var ANDROID_URL = 'http://119.44.236.37:9001/minio/public/pipe.apk';
  103. var IOS_URL = 'http://119.44.236.37:9001/minio/public/pipe-ios.mobileconfig';
  104. var statusEl = document.getElementById('status');
  105. var ua = ((navigator.userAgent || '') + ' ' + (navigator.vendor || '')).toLowerCase();
  106. var isAndroid = /android/.test(ua);
  107. var isIOS = /iphone|ipad|ipod/.test(ua)
  108. || (navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1);
  109. var target = isAndroid ? ANDROID_URL : isIOS ? IOS_URL : '';
  110. if (isAndroid) {
  111. statusEl.textContent = '已识别 Android,正在打开安装包…';
  112. } else if (isIOS) {
  113. statusEl.textContent = '已识别 iOS,正在打开配置文件…';
  114. } else {
  115. statusEl.textContent = '未识别到手机系统,请手动选择下载。';
  116. return;
  117. }
  118. window.setTimeout(function () {
  119. window.location.replace(target);
  120. }, 600);
  121. }());
  122. </script>
  123. </body>
  124. </html>