index.html 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  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. <link rel="shortcut icon" href="icon.png">
  13. <link rel="icon" href="icon.png">
  14. <style>
  15. .body {overflow: hidden; background: #222; color:#cccccc; margin: 0px; padding: 0px; border: 0px; }
  16. #game_div {image-rendering: optimizeSpeed; -webkit-interpolation-mode: nearest-neighbor; margin: 0px; padding: 0px; border: 0px; }
  17. :-webkit-full-screen #game_div {width: 100%; height: 100%; }
  18. </style>
  19. <script type="text/javascript" src="js/zepto.min.js"></script>
  20. <script type="text/javascript" src="js/phaser.min.js"></script>
  21. <script type="text/javascript" src="js/main.js"></script>
  22. </head>
  23. <body class="body">
  24. <div id="wrapper">
  25. <div id="game_div" style="position: absolute;"></div>
  26. </div>
  27. <script language=javascript>
  28. var mebtnopenurl = 'http://game.ikongzhong.cn/index.html';
  29. var thegameurl ="http://game.ikongzhong.cn/games/dlxfk/";
  30. var guanzhuurl ="http://mp.weixin.qq.com/s?__biz=MzI4MjA2MjE0MQ==&mid=246005295&idx=1&sn=490f8141976d607ba079d48f52a3fcd7#rd";
  31. window.shareData = {
  32. "imgUrl": "http://mmbiz.qpic.cn/mmbiz/2zpp2iaH4HWG8sQXExicfBKIpEreyLV1Unic4NJ13CQlcyAuYxe5iadoPLouplOwSCLcogC771aq3HcLTQTic9ibqkbw/640",
  33. "timeLineLink": thegameurl,
  34. "tTitle": "弹力小方块",
  35. "tContent": "弹力小方块"
  36. };
  37. function goHome(){
  38. window.location=mebtnopenurl;
  39. }
  40. function clickMore(){
  41. if((window.location+"").indexOf("f=zf",1)>0){
  42. window.location = mebtnopenurl ;
  43. }
  44. else{
  45. goHome();
  46. }
  47. }
  48. function dp_share(){
  49. document.title ="我在《弹力小方块》中弹出了"+myData.score+"次还没死,你有我这么能弹吗?";
  50. document.getElementById("share").style.display="";
  51. window.shareData.tTitle = document.title;
  52. }
  53. function dp_Ranking(){
  54. window.location=mebtnopenurl;
  55. }
  56. function showAd(){
  57. }
  58. function hideAd(){
  59. }
  60. document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
  61. WeixinJSBridge.on('menu:share:appmessage', function(argv) {
  62. WeixinJSBridge.invoke('sendAppMessage', {
  63. "img_url": window.shareData.imgUrl,
  64. "link": window.shareData.timeLineLink,
  65. "desc": window.shareData.tContent,
  66. "title": window.shareData.tTitle
  67. }, onShareComplete);
  68. });
  69. WeixinJSBridge.on('menu:share:timeline', function(argv) {
  70. WeixinJSBridge.invoke('shareTimeline', {
  71. "img_url": window.shareData.imgUrl,
  72. "img_width": "640",
  73. "img_height": "640",
  74. "link": window.shareData.timeLineLink,
  75. "desc": window.shareData.tContent,
  76. "title": window.shareData.tTitle
  77. }, onShareComplete);
  78. });
  79. }, false);
  80. </script>
  81. <div id=share style="display: none">
  82. <img width=100% src="share.png"
  83. style="position: fixed; z-index: 9999; top: 0; left: 0; display: "
  84. ontouchstart="document.getElementById('share').style.display='none';" />
  85. </div>
  86. <div style="display: none;">
  87. <script type="text/javascript">
  88. var myData = { gameid: "dlxfk" };
  89. // var domain = ["oixm.cn", "hiemma.cn", "peagame.net"][parseInt(Math.random() * 3)];
  90. window.shareData.timeLineLink = thegameurl ;
  91. function dp_submitScore(score){
  92. myData.score = parseInt(score);
  93. myData.scoreName ="坚持了"+score+"次";
  94. if(score>0){
  95. if (confirm("弹弹弹!你坚持了"+score+"次,快分享到朋友圈炫耀一下吧?")){
  96. setTimeout(dp_share,500);
  97. }
  98. }
  99. }
  100. function onShareComplete(res) {
  101. if (localStorage.myuid && myData.score != undefined) {
  102. setTimeout(function(){
  103. if (confirm("?")) {
  104. window.location = mebtnopenurl ;
  105. }
  106. else {
  107. document.location.href = mebtnopenurl;
  108. }
  109. }, 500);
  110. }
  111. else {
  112. document.location.href = guanzhuurl ;
  113. }
  114. }
  115. </script>
  116. <div style="display: none;">
  117. </div>
  118. </body>
  119. </html>