index.html 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <!DOCTYPE html>
  2. <html lang="">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=0">
  7. <link rel="icon" href="<%= BASE_URL %>favicon.ico">
  8. <script src="./config/global.js"></script>
  9. <title>心灵照相机</title>
  10. <style>
  11. html,
  12. body {
  13. width: 100%;
  14. height: 100%;
  15. touch-action: none;
  16. touch-action: pan-y;
  17. }
  18. </style>
  19. </head>
  20. <script>
  21. var prod = false;
  22. var baseUrl = prod ? env.prod : env.dev;
  23. var photoUrl = prod ? env.photoUrl : env.photoUrl;
  24. var systemUrl = env.systemUrl;
  25. var scoketUrl = env.scoketUrl;
  26. //禁用移动端左右滑动返回
  27. var startX;
  28. document.addEventListener("touchstart",function(e){
  29. startX = e.targetTouches[0].pageX
  30. });
  31. document.addEventListener("touchmove",function(e){
  32. var moveX = e.targetTouches[0].pageX;
  33. if(Math.abs(moveX-startX)>0){
  34. e.preventDefault();
  35. }
  36. });
  37. </script>
  38. <body>
  39. <noscript>
  40. <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
  41. </noscript>
  42. <div id="app"></div>
  43. <!-- built files will be auto injected -->
  44. </body>
  45. </html>