index.html 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8"/>
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta http-equiv="pragma" content="no-cache">
  7. <meta name="apple-mobile-web-app-capable" content="yes">
  8. <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=0" />
  9. <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
  10. <meta charset="utf-8">
  11. <title>吃豆豆</title>
  12. <!-- a_why -->
  13. <link rel="icon" href="share.png">
  14. <link rel="shortcut icon" href="icon.png">
  15. <link rel="icon" href="icon.png">
  16. <link type="text/css" href="css/common.css" rel="stylesheet" />
  17. <script type="text/javascript" src="js/zepto.min.js"></script>
  18. <script src="js/common.js?v=1"></script>
  19. <!-- a_why -->
  20. <style>
  21. .body {
  22. overflow: hidden;
  23. background: #222;
  24. color:#cccccc;
  25. margin: 0px;
  26. padding: 0px;
  27. border: 0px;
  28. }
  29. #game_div {
  30. image-rendering: optimizeSpeed;
  31. -webkit-interpolation-mode: nearest-neighbor;
  32. margin: 0px;
  33. padding: 0px;
  34. border: 0px;
  35. }
  36. :-webkit-full-screen #game_div {
  37. width: 100%;
  38. height: 100%;
  39. }
  40. #orientation {
  41. margin: 0 auto;
  42. position: absolute;
  43. top: 0;
  44. left: 0;
  45. width: 100%;
  46. height: 100%;
  47. background-repeat: no-repeat;
  48. background-position: center;
  49. background-color: rgb(0, 0, 0);
  50. z-index: 999;
  51. display: none;
  52. }
  53. </style>
  54. <script type="text/javascript" src="js/phaser.min.js"></script>
  55. <script type="text/javascript" src="js/main.js"></script>
  56. </head>
  57. <body class="body">
  58. <div id="wrapper">
  59. <div id="game_div" style="position: absolute;"></div>
  60. </div>
  61. <input id="bt-game-id" type="hidden" value="3-avoider">
  62. <script type="text/javascript">
  63. btGame.onlyVScreen();
  64. btGame.playLogoAdv();
  65. </script>
  66. <script language=javascript>
  67. var mebtnopenurl = 'http://mp.weixin.qq.com/s?__biz=MzI4MjA2MjE0MQ==&mid=246005295&idx=1&sn=490f8141976d607ba079d48f52a3fcd7#rd';
  68. window.shareData = {
  69. "imgUrl": "http://game.ikongzhong.cn/icon/cdd.png",
  70. "timeLineLink": "http://game.ikongzhong.cn/games/cdd/",
  71. "tTitle": "吃豆豆",
  72. "tContent": "吃豆豆"
  73. };
  74. function goHome(){
  75. window.location=mebtnopenurl;
  76. }
  77. function clickMore(){
  78. if((window.location+"").indexOf("zf",1)>0){
  79. window.location = "http://game.ikongzhong.cn/";
  80. }
  81. else{
  82. goHome();
  83. }
  84. }
  85. function dp_share(){
  86. document.title ="原来我这么吊,吃了"+myData.score+"分的豆豆,吊炸天是形容我的?";
  87. document.getElementById("share").style.display="";
  88. window.shareData.tTitle = document.title;
  89. }
  90. function dp_Ranking(){
  91. window.location=mebtnopenurl;
  92. }
  93. function showAd(){
  94. }
  95. function hideAd(){
  96. }
  97. document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
  98. WeixinJSBridge.on('menu:share:appmessage', function(argv) {
  99. WeixinJSBridge.invoke('sendAppMessage', {
  100. "img_url": window.shareData.imgUrl,
  101. "link": window.shareData.timeLineLink,
  102. "desc": window.shareData.tContent,
  103. "title": window.shareData.tTitle
  104. }, onShareComplete);
  105. });
  106. WeixinJSBridge.on('menu:share:timeline', function(argv) {
  107. WeixinJSBridge.invoke('shareTimeline', {
  108. "img_url": window.shareData.imgUrl,
  109. "img_width": "640",
  110. "img_height": "640",
  111. "link": window.shareData.timeLineLink,
  112. "desc": window.shareData.tContent,
  113. "title": window.shareData.tTitle
  114. }, onShareComplete);
  115. });
  116. }, false);
  117. </script>
  118. <div id=share style="display: none">
  119. <img width=100% src="share.png"
  120. style="position: fixed; z-index: 9999; top: 0; left: 0; display: "
  121. ontouchstart="document.getElementById('share').style.display='none';" />
  122. </div>
  123. <div style="display: none;">
  124. <script type="text/javascript">
  125. var myData = { gameid: "cdd" };
  126. //window.shareData.timeLineLink = "http://game.ikongzhong.cn/gamecenter.html?gameid=" + myData.gameid + (localStorage.myuid ? "&uid=" + localStorage.myuid : "");
  127. function dp_submitScore(score){
  128. myData.score = score;
  129. myData.scoreName = "吃豆豆吃了"+score+"分";
  130. if(score>0){
  131. if (confirm("吃完豆豆浑身爽,俺一口气吃了"+score+"分,叫上朋友一起吃!")){
  132. dp_share();
  133. }
  134. }
  135. }
  136. function onShareComplete(res) {
  137. if (localStorage.myuid && myData.score != undefined) {
  138. setTimeout(function(){
  139. if (confirm("要将成绩提交到空中传媒排行榜吗?")) {
  140. //window.location = "http://wx.9g.com/rank/submit2.jsp?gameid=" + myData.gameid + "&uid=" + localStorage.myuid + "&score=" + myData.score + "&scorename=" + encodeURIComponent(myData.scoreName);
  141. }
  142. else {
  143. document.location.href = mebtnopenurl;
  144. }
  145. }, 500);
  146. }
  147. else {
  148. document.location.href = mebtnopenurl;
  149. }
  150. }
  151. </script>
  152. <div style="display: none;">
  153. </div>
  154. </body>
  155. </html>