index.html 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <!DOCTYPE html>
  2. <html lang="zh-CN">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="referrer" content="no-referrer" />
  7. <meta name="viewport"
  8. content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  9. <title><%= htmlWebpackPlugin.options.title %></title>
  10. <script>
  11. var UA = window.navigator.userAgent.toLowerCase();
  12. var isAndroid = UA.indexOf('android') > 0;
  13. var isIOS = /iphone|ipad|ipod|ios/.test(UA);
  14. if (!(isAndroid || isIOS)) {
  15. // 正式发布的时候使用,开发期间不启用。
  16. // window.location.href = '/demo/picture/website/pcguide.html';
  17. }
  18. </script>
  19. <script>
  20. document.addEventListener('DOMContentLoaded', function() {
  21. document.documentElement.style.fontSize = document.documentElement.clientWidth / 20 + 'px'
  22. })
  23. </script>
  24. <link rel="stylesheet" href="<%= BASE_URL %>static/index.css" />
  25. <style>
  26. /* #ifdef H5 */
  27. /* 在桌面浏览器中限制宽度为375px并居中显示 */
  28. @media screen and (min-width: 375px) {
  29. body {
  30. background-color: #f5f5f5;
  31. display: flex;
  32. justify-content: center;
  33. align-items: flex-start;
  34. min-height: 100vh;
  35. margin: 0;
  36. padding: 0;
  37. }
  38. .uni-app--maxwidth {
  39. width: 400px;
  40. min-height: 100vh;
  41. background-color: #ffffff;
  42. box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
  43. }
  44. }
  45. /* #endif */
  46. </style>
  47. </head>
  48. <body>
  49. <!-- 该文件为 H5 平台的模板 HTML,并非应用入口,请勿直接运行此文件。 -->
  50. <!-- 详见文档: https://uniapp.dcloud.io/collocation/manifest?id=h5-template -->
  51. <noscript>
  52. <strong>Please enable JavaScript to continue.</strong>
  53. </noscript>
  54. <div id="app"></div>
  55. <!-- 微信SDK文件 -->
  56. <script src="<%= BASE_URL %>static/mp-h5/jweixin-1.4.0.js"></script>
  57. </body>
  58. </html>