index.html 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <meta charset="utf-8" />
  5. <div id='wx_pic' style='margin:0 auto;display:none;'>
  6. <img src='photo.jpg' />
  7. </div>
  8. <title>消灭蚊蝇</title>
  9. <meta name="viewport" content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
  10. <meta name="apple-mobile-web-app-capable" content="yes"/>
  11. <meta name="full-screen" content="true"/>
  12. <meta name="screen-orientation" content="portrait"/>
  13. <meta name="x5-fullscreen" content="true"/>
  14. <meta name="360-fullscreen" content="true"/>
  15. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
  16. <meta http-equiv="Access-Control-Allow-Origin" content="*">
  17. <style>
  18. body {
  19. text-align: center;
  20. margin: 0;
  21. padding: 0;
  22. border: 0;
  23. background-color: #000000;
  24. height: 100%;
  25. }
  26. </style>
  27. </head>
  28. <body>
  29. <script src="js/pixi.js"></script>
  30. <script src="js/game.js"></script>
  31. <script language=javascript>
  32. var mebtnopenurl = 'http://game.ikongzhong.cn';
  33. var thegameurl ="http://game.ikongzhong.cn/games/xmyc/";
  34. var guanzhuurl ="http://mp.weixin.qq.com/s?__biz=MzI4MjA2MjE0MQ==&mid=246005295&idx=1&sn=490f8141976d607ba079d48f52a3fcd7#rd";
  35. window.shareData = {
  36. "imgUrl": "http://mmbiz.qpic.cn/mmbiz/2zpp2iaH4HWEQT7mTaxRkYUk6k9OOhxchB6XJaialeFMicbWUj4tOweFL2ICR3zwaaT0COdjlgQmReR25twpK8jzg/640",
  37. "timeLineLink": thegameurl,
  38. "tTitle": "消灭蚊蝇",
  39. "tContent": "消灭蚊蝇!"
  40. };
  41. function goHome(){
  42. window.location=mebtnopenurl;
  43. }
  44. function clickMore(){
  45. if((window.location+"").indexOf("f=zf",1)>0){
  46. window.location = mebtnopenurl;
  47. }
  48. else{
  49. goHome();
  50. }
  51. }
  52. function dp_share(){
  53. document.title =shareData.sDesc;
  54. document.getElementById("share").style.display="";
  55. window.shareData.tTitle = document.title;
  56. }
  57. function dp_Ranking(){
  58. window.location=mebtnopenurl;
  59. }
  60. function showAd(){
  61. }
  62. function hideAd(){
  63. }
  64. document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
  65. WeixinJSBridge.on('menu:share:appmessage', function(argv) {
  66. WeixinJSBridge.invoke('sendAppMessage', {
  67. "img_url": window.shareData.imgUrl,
  68. "link": window.shareData.timeLineLink,
  69. "desc": window.shareData.tContent,
  70. "title": window.shareData.tTitle
  71. }, onShareComplete);
  72. });
  73. WeixinJSBridge.on('menu:share:timeline', function(argv) {
  74. WeixinJSBridge.invoke('shareTimeline', {
  75. "img_url": window.shareData.imgUrl,
  76. "img_width": "640",
  77. "img_height": "640",
  78. "link": window.shareData.timeLineLink,
  79. "desc": window.shareData.tContent,
  80. "title": window.shareData.tTitle
  81. }, onShareComplete);
  82. });
  83. }, false);
  84. </script>
  85. <div id=share style="display: none">
  86. <img width=100% src="share.png"
  87. style="position: fixed; z-index: 9999; top: 0; left: 0; display: "
  88. ontouchstart="document.getElementById('share').style.display='none';" />
  89. </div>
  90. <div style="display: none;">
  91. <script type="text/javascript">
  92. var myData = { gameid: "jyfy" };
  93. var domain = ["oixm.cn", "hiemma.cn", "peagame.net"][parseInt(Math.random() * 3)];
  94. window.shareData.timeLineLink = thegameurl ;
  95. function dp_submitScore(score){
  96. myData.score =parseInt(score);
  97. myData.scoreName = "拍死了"+score+"只蚊蝇";
  98. if(score>0){
  99. if (confirm("你竟然在分分钟钟间就拍死了"+score+"只蚊蝇,让伙伴们一起来消灭蚊蝇吧!")){
  100. dp_share();
  101. }
  102. }
  103. }
  104. function onShareComplete(res) {
  105. if (localStorage.myuid && myData.score != undefined) {
  106. setTimeout(function(){
  107. if (confirm("?")) {
  108. window.location = mebtnopenurl;
  109. }
  110. else {
  111. document.location.href = mebtnopenurl;
  112. }
  113. }, 500);
  114. }
  115. else {
  116. document.location.href = guanzhuurl;
  117. }
  118. }
  119. </script>
  120. <div style="display: none;">
  121. <script type="text/javascript">
  122. var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
  123. document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3F2eac95e2df0ea5d2b0aaa92e3dbbe419' type='text/javascript'%3E%3C/script%3E"));
  124. </script>
  125. </div>
  126. </body>
  127. </html>