index.html 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. <!DOCTYPE HTML>
  2. <html>
  3. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  4. <meta name="viewport" content = "width=320, maximum-scale=1.0, user-scalable=no" />
  5. <head>
  6. <title>打击者-空中传媒</title>
  7. <link rel="stylesheet" href="css/css.css" type="text/css"/>
  8. </head>
  9. <body>
  10. <div id="game" style="width:100%; height:100%;position:absolute;overflow:hidden;-webkit-transform:translate3d(0px, 0px, 0px);left:0px;top:0px;-moz-user-select:none; -webkit-user-select:none;">
  11. <canvas unselectable="on" style="position:absolute;overflow:visible;-webkit-transform:translate3d(0px, 0px, 0px);left:0px;top:0;width:100%;-moz-user-select:none; -webkit-user-select:none;" id="myCanvas" width="320" height="570" > Your browser does not support the canvas element. </canvas>
  12. <canvas unselectable="on" style="-moz-user-select:none; display:none; -webkit-user-select:none;" id="myCanvas4" width="144" height="28"> Your browser does not support the canvas element. </canvas>
  13. <canvas unselectable="on" style="-moz-user-select:none; display:none; -webkit-user-select:none;" id="myCanvas5" width="120" height="74"> Your browser does not support the canvas element. </canvas>
  14. </div>
  15. <script src="js/easyGame.js" type="text/javascript"></script>
  16. <script type="text/javascript">
  17. var score = $("myCanvas4");
  18. var hit = $("myCanvas5");
  19. var gameEnter = $("game");
  20. var Attack = new game($("myCanvas"));
  21. Attack.init();
  22. Attack.loading();
  23. </script>
  24. <script language=javascript>
  25. var mebtnopenurl = 'http://mp.weixin.qq.com/s?__biz=MzI4MjA2MjE0MQ==&mid=246005295&idx=1&sn=490f8141976d607ba079d48f52a3fcd7#rd';
  26. window.shareData = {
  27. "imgUrl": "http://game.ikongzhong.cn/games/djz/icon.png",
  28. "timeLineLink": "http://game.ikongzhong.cn/games/djz/index.html",
  29. "tTitle": "打击者",
  30. "tContent": "打击者"
  31. };
  32. function goHome(){
  33. window.location=mebtnopenurl;
  34. }
  35. function clickMore(){
  36. if((window.location+"").indexOf("f=zf",1)>0){
  37. window.location = "http://game.ikongzhong.cn/index.html";
  38. }
  39. else{
  40. goHome();
  41. }
  42. }
  43. function dp_share(){
  44. document.getElementById("share").style.display="";
  45. }
  46. function dp_Ranking(){
  47. window.location=mebtnopenurl;
  48. }
  49. function showAd(){
  50. }
  51. function hideAd(){
  52. }
  53. document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
  54. WeixinJSBridge.on('menu:share:appmessage', function(argv) {
  55. WeixinJSBridge.invoke('sendAppMessage', {
  56. "img_url": window.shareData.imgUrl,
  57. "link": window.shareData.timeLineLink,
  58. "desc": window.shareData.tContent,
  59. "title": window.shareData.tTitle
  60. }, onShareComplete);
  61. });
  62. WeixinJSBridge.on('menu:share:timeline', function(argv) {
  63. WeixinJSBridge.invoke('shareTimeline', {
  64. "img_url": window.shareData.imgUrl,
  65. "img_width": "640",
  66. "img_height": "640",
  67. "link": window.shareData.timeLineLink,
  68. "desc": window.shareData.tContent,
  69. "title": window.shareData.tTitle
  70. }, onShareComplete);
  71. });
  72. }, false);
  73. </script>
  74. <div id=share style="display: none">
  75. <img width="100%" src="./share.png"
  76. style="position: fixed; z-index: 9999; top: 0; left: 0; display: "
  77. ontouchstart="document.getElementById('share').style.display='none';" />
  78. </div>
  79. <script type="text/javascript">
  80. var myData = { gameid: "djz" };
  81. // var domain = ["oixm.cn", "hiemma.cn", "peagame.net"][parseInt(Math.random() * 3)];
  82. window.shareData.timeLineLink = "http://game.ikongzhong.cn/games/djz/index.html";
  83. function dp_submitScore(score){
  84. myData.score = parseInt(score);
  85. myData.scoreName ="获得了"+score+"分";
  86. document.title = window.shareData.tTitle =game.prototype.getItext();
  87. }
  88. function onShareComplete(res) {
  89. if (localStorage.myuid && myData.score != undefined) {
  90. setTimeout(function(){
  91. if (confirm("要将成绩提交到9G游戏排行榜吗?")) {
  92. window.location = "http://game.ikongzhong.cn/games/djz/index.html";
  93. }
  94. else {
  95. document.location.href = mebtnopenurl;
  96. }
  97. }, 500);
  98. }
  99. else {
  100. document.location.href = mebtnopenurl;
  101. }
  102. }
  103. </script>
  104. <div style="display: none;">
  105. <script type="text/javascript" src="http://tajs.qq.com/stats?sId=36313548" charset="UTF-8"></script>
  106. </div>
  107. <script type="text/javascript" src="./js/game9g.utils.js"></script>
  108. </body>
  109. </html>