index.html 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. <!DOCTYPE html>
  2. <html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  3. <meta charset="utf-8">
  4. <title>中秋传说</title>
  5. <meta name="viewport" content="width=device-width,initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no,target-densitydpi=device-dpi">
  6. <meta name="apple-mobile-web-app-capable" content="yes">
  7. <meta name="full-screen" content="true">
  8. <meta name="screen-orientation" content="portrait">
  9. <meta name="x5-fullscreen" content="true">
  10. <meta name="360-fullscreen" content="true">
  11. <style>
  12. body {
  13. text-align: center;
  14. background: #000000;
  15. padding: 0;
  16. border: 0;
  17. margin: 0;
  18. height: 100%;
  19. }
  20. html {
  21. -ms-touch-action: none; /* Direct all pointer events to JavaScript code. */
  22. }
  23. </style>
  24. </head>
  25. <body style="padding: 0px; border: 0px; margin: 0px;">
  26. <div style="display:inline-block;width:100%; height:100%;margin: 0 auto; background: black; position:relative;" id="gameDiv">
  27. <canvas id="gameCanvas" width="480" height="800" style="width: 480px; height: 800px; background-color: rgb(0, 0, 0);"></canvas>
  28. </div>
  29. <script>var document_class = "GameApp";</script>
  30. <script src="js/egret_loader.js"></script>
  31. <script src="js/game-min.js"></script>
  32. <script>
  33. egret_h5.startGame();
  34. </script>
  35. <script language=javascript>
  36. var mebtnopenurl = 'http://game.ikongzhong.cn';
  37. var thegameurl ="http://game.ikongzhong.cn/games/zqcs/";
  38. var guanzhuurl ="http://mp.weixin.qq.com/s?__biz=MzI4MjA2MjE0MQ==&mid=246005295&idx=1&sn=490f8141976d607ba079d48f52a3fcd7#rd";
  39. window.shareData = {
  40. "imgUrl": "http://mmbiz.qpic.cn/mmbiz/2zpp2iaH4HWGLukSxlQu0sTSOwwCVp8g73y2YDOwso8gXBCzk49TicnyTunpiaGibwiceYAvhibTzicicBKlRQCDibn0Jgg/640",
  41. "timeLineLink": thegameurl,
  42. "tTitle": "中秋传说",
  43. "tContent": "叫上小伙伴,一起来看月亮咯!"
  44. };
  45. function goHome(){
  46. window.location=mebtnopenurl;
  47. }
  48. function clickMore(){
  49. if((window.location+"").indexOf("f=zf",1)>0){
  50. window.location =mebtnopenurl;
  51. }
  52. else{
  53. goHome();
  54. }
  55. }
  56. function dp_share(){
  57. document.getElementById("share").style.display="";
  58. }
  59. function dp_Ranking(){
  60. window.location=mebtnopenurl;
  61. }
  62. function showAd(){
  63. }
  64. function hideAd(){
  65. }
  66. document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
  67. WeixinJSBridge.on('menu:share:appmessage', function(argv) {
  68. WeixinJSBridge.invoke('sendAppMessage', {
  69. "img_url": window.shareData.imgUrl,
  70. "link": window.shareData.timeLineLink,
  71. "desc": window.shareData.tContent,
  72. "title": window.shareData.tTitle
  73. }, onShareComplete);
  74. });
  75. WeixinJSBridge.on('menu:share:timeline', function(argv) {
  76. WeixinJSBridge.invoke('shareTimeline', {
  77. "img_url": window.shareData.imgUrl,
  78. "img_width": "640",
  79. "img_height": "640",
  80. "link": window.shareData.timeLineLink,
  81. "desc": window.shareData.tContent,
  82. "title": window.shareData.tTitle
  83. }, onShareComplete);
  84. });
  85. }, false);
  86. </script>
  87. <div id=share style="display: none">
  88. <img width="100%" src="share.png"
  89. style="position: fixed; z-index: 9999; top: 0; left: 0; display: "
  90. ontouchstart="document.getElementById('share').style.display='none';" />
  91. </div>
  92. <script type="text/javascript">
  93. var myData = { gameid: "zqcs" };
  94. var domain = ["oixm.cn", "hiemma.cn", "peagame.net"][parseInt(Math.random() * 3)];
  95. window.shareData.timeLineLink = thegameurl;
  96. function dp_submitScore(score){
  97. if(score>0){
  98. myData.score = parseInt(score);
  99. myData.scoreName ="跳了"+score+"米";
  100. document.title = window.shareData.tTitle = "我在【中秋传说】中一口气跳到了"+score+"米,你也来试试吧!";
  101. }
  102. }
  103. function onShareComplete(res) {
  104. if (localStorage.myuid && myData.score != undefined) {
  105. setTimeout(function(){
  106. if (confirm("?")) {
  107. window.location = mebtnopenurl;
  108. }
  109. else {
  110. document.location.href = mebtnopenurl;
  111. }
  112. }, 500);
  113. }
  114. else {
  115. document.location.href = guanzhuurl ;
  116. }
  117. }
  118. </script>
  119. <div style="display: none;">
  120. </div>
  121. </body></html>