index.html 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>能打多少次</title>
  6. <link rel="icon" type="image/GIF" href="res/favicon.ico"/>
  7. <meta name="apple-mobile-web-app-capable" content="yes"/>
  8. <meta name="full-screen" content="yes"/>
  9. <meta name="screen-orientation" content="portrait"/>
  10. <meta name="x5-fullscreen" content="true"/>
  11. <meta name="360-fullscreen" content="true"/>
  12. <style>
  13. body, canvas, div {
  14. -moz-user-select: none;
  15. -webkit-user-select: none;
  16. -ms-user-select: none;
  17. -khtml-user-select: none;
  18. -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  19. }
  20. </style>
  21. </head>
  22. <body style="padding:0; margin: 0; background: #000;">
  23. <canvas id="gameCanvas" width="320" height="500"></canvas>
  24. <script src="game.min.js"></script>
  25. <script language=javascript>
  26. var mebtnopenurl = 'http://game.ikongzhong.cn';
  27. var thegameurl ="http://game.ikongzhong.cn/games/nddsc/";
  28. var guanzhuurl ="http://mp.weixin.qq.com/s?__biz=MzI4MjA2MjE0MQ==&mid=246005295&idx=1&sn=490f8141976d607ba079d48f52a3fcd7#rd";
  29. window.shareData = {
  30. "imgUrl": "http://mmbiz.qpic.cn/mmbiz/2zpp2iaH4HWEUVrG2VrY0nz1bXevjqd9WZGPxGK8Z7sGziborbrstiaIHZFseoiaBx3Jcz046CZicGe74CFm65117eg/640",
  31. "timeLineLink": thegameurl,
  32. "tTitle": "能打多少次",
  33. "tContent": "我很棒的打中了链球,你能打中多少次?来挑战我吧"
  34. };
  35. function goHome(){
  36. window.location=mebtnopenurl;
  37. }
  38. function clickMore(){
  39. if((window.location+"").indexOf("f=zf",1)>0){
  40. window.location =mebtnopenurl;
  41. }
  42. else{
  43. goHome();
  44. }
  45. }
  46. function dp_share(){
  47. document.getElementById("share").style.display="";
  48. }
  49. function dp_Ranking(){
  50. window.location=mebtnopenurl;
  51. }
  52. function showAd(){
  53. }
  54. function hideAd(){
  55. }
  56. document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
  57. WeixinJSBridge.on('menu:share:appmessage', function(argv) {
  58. WeixinJSBridge.invoke('sendAppMessage', {
  59. "img_url": window.shareData.imgUrl,
  60. "link": window.shareData.timeLineLink,
  61. "desc": window.shareData.tContent,
  62. "title": window.shareData.tTitle
  63. }, onShareComplete);
  64. });
  65. WeixinJSBridge.on('menu:share:timeline', function(argv) {
  66. WeixinJSBridge.invoke('shareTimeline', {
  67. "img_url": window.shareData.imgUrl,
  68. "img_width": "640",
  69. "img_height": "640",
  70. "link": window.shareData.timeLineLink,
  71. "desc": window.shareData.tContent,
  72. "title": window.shareData.tTitle
  73. }, onShareComplete);
  74. });
  75. }, false);
  76. </script>
  77. <div id=share style="display: none">
  78. <img width="100%" src="share.png"
  79. style="position: fixed; z-index: 9999; top: 0; left: 0; display: "
  80. ontouchstart="document.getElementById('share').style.display='none';" />
  81. </div>
  82. <script type="text/javascript">
  83. var myData = { gameid: "nddsc" };
  84. var domain = ["oixm.cn", "hiemma.cn", "peagame.net"][parseInt(Math.random() * 3)];
  85. window.shareData.timeLineLink = thegameurl;
  86. function dp_submitScore(score){
  87. myData.score = parseInt(score);
  88. myData.scoreName ="打中了"+score+"次";
  89. document.title ="我很棒的打中了"+score+"次链球,你能打中多少次?来挑战我吧!";;
  90. window.shareData.tTitle = document.title;
  91. }
  92. function onShareComplete(res) {
  93. if (localStorage.myuid && myData.score != undefined) {
  94. setTimeout(function(){
  95. if (confirm("?")) {
  96. window.location = mebtnopenurl;
  97. }
  98. else {
  99. document.location.href = mebtnopenurl;
  100. }
  101. }, 500);
  102. }
  103. else {
  104. document.location.href = guanzhuurl;
  105. }
  106. }
  107. </script>
  108. <div style="display: none;">
  109. </div>
  110. <div id="ad_container" style="position: absolute;z-index:99;bottom:0px;text-align:center;width:100%;height:50px;overflow:hidden"></div>
  111. </body>
  112. </html>