index.html 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="Pragma" content="no-cache">
  6. <meta http-equiv="Cache-Control" content="no-cache">
  7. <meta http-equiv="Expires" content="1">
  8. <title>Cocos Creator | Xmyy</title>
  9. <!--http://www.html5rocks.com/en/mobile/mobifying/-->
  10. <meta name="viewport"
  11. content="width=device-width,user-scalable=no,initial-scale=1, minimum-scale=1,maximum-scale=1" />
  12. <!--https://developer.apple.com/library/safari/documentation/AppleApplications/Reference/SafariHTMLRef/Articles/MetaTags.html-->
  13. <meta name="apple-mobile-web-app-capable" content="yes">
  14. <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
  15. <meta name="format-detection" content="telephone=no">
  16. <!-- force webkit on 360 -->
  17. <meta name="renderer" content="webkit" />
  18. <meta name="force-rendering" content="webkit" />
  19. <!-- force edge on IE -->
  20. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
  21. <meta name="msapplication-tap-highlight" content="no">
  22. <!-- force full screen on some browser -->
  23. <meta name="full-screen" content="yes" />
  24. <meta name="x5-fullscreen" content="true" />
  25. <meta name="360-fullscreen" content="true" />
  26. <!-- force screen orientation on some browser -->
  27. <meta name="screen-orientation" content="portrait" />
  28. <meta name="x5-orientation" content="portrait">
  29. <!--fix fireball/issues/3568 -->
  30. <!--<meta name="browsermode" content="application">-->
  31. <meta name="x5-page-mode" content="app">
  32. <!--<link rel="apple-touch-icon" href=".png" />-->
  33. <!--<link rel="apple-touch-icon-precomposed" href=".png" />-->
  34. <link rel="stylesheet" type="text/css" href="style-mobile.css" />
  35. <link rel="icon" href="favicon.ico" />
  36. </head>
  37. <body>
  38. <canvas id="GameCanvas" oncontextmenu="event.preventDefault()" tabindex="0"></canvas>
  39. <div id="splash">
  40. <div class="progress-bar stripes">
  41. <span style="width: 0%"></span>
  42. </div>
  43. </div>
  44. <script src="src/settings.js" charset="utf-8"></script>
  45. <script src="main.js" charset="utf-8"></script>
  46. <script type="text/javascript">
  47. (function () {
  48. // open web debugger console
  49. if (typeof VConsole !== 'undefined') {
  50. window.vConsole = new VConsole();
  51. }
  52. var debug = window._CCSettings.debug;
  53. var splash = document.getElementById('splash');
  54. splash.style.display = 'block';
  55. var url2 = window.location.search;
  56. let varstr = url2.substr(1);
  57. let infoList = varstr.split("&");
  58. let userId = infoList[0]?.split("=")[1];
  59. let satoken = infoList[1]?.split("=")[1];
  60. window.loginData = {
  61. "userId": userId,
  62. "satoken": satoken
  63. }
  64. function loadScript(moduleName, cb) {
  65. function scriptLoaded() {
  66. document.body.removeChild(domScript);
  67. domScript.removeEventListener('load', scriptLoaded, false);
  68. cb && cb();
  69. };
  70. var domScript = document.createElement('script');
  71. domScript.async = true;
  72. domScript.src = moduleName;
  73. domScript.addEventListener('load', scriptLoaded, false);
  74. document.body.appendChild(domScript);
  75. }
  76. loadScript(debug ? 'cocos2d-js.js' : 'cocos2d-js-min.js', function () {
  77. if (CC_PHYSICS_BUILTIN || CC_PHYSICS_CANNON) {
  78. loadScript(debug ? 'physics.js' : 'physics-min.js', window.boot);
  79. }
  80. else {
  81. window.boot();
  82. }
  83. });
  84. })();
  85. </script>
  86. </body>
  87. </html>