index.html 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8" />
  5. <title>XXOO-9G游戏</title>
  6. <meta name="viewport"
  7. content="width=device-width,initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no" />
  8. <meta name="apple-mobile-web-app-capable" content="yes" />
  9. <meta name="full-screen" content="true"/>
  10. <meta name="screen-orientation" content="portrait"/>
  11. <meta name="x5-fullscreen" content="true"/>
  12. <meta name="360-fullscreen" content="true"/>
  13. <style>
  14. body {
  15. overflow: hidden;
  16. text-align: center;
  17. background: #000;
  18. padding: 0;
  19. border: 0;
  20. margin: 0;
  21. height: 100%;
  22. }
  23. * {
  24. -webkit-touch-callout: none;
  25. -webkit-user-select: none;
  26. -khtml-user-select: none;
  27. -moz-user-select: none;
  28. -ms-user-select: none;
  29. user-select: none;
  30. -webkit-tap-highlight-color: rgba(0,0,0,0);
  31. }
  32. html {
  33. -ms-touch-action: none;
  34. }
  35. .content {
  36. overflow: hidden;
  37. margin: 0 auto;
  38. }
  39. </style>
  40. </head>
  41. <body>
  42. <div class="content">
  43. <canvas id="canvas" width="720" height="1280" style="width: 360px; height: 640px;">
  44. <span>您的浏览器不支持html5 canvas.</span>
  45. </canvas>
  46. </div>
  47. <script src="game.js" tppabs="http://game.9g.com/xxoo/js/game.js"></script>
  48. <script language=javascript>
  49. var mebtnopenurl = 'http://game.ikongzhong.cn';
  50. window.shareData = {
  51. "imgUrl": "icon.png"/*tpa=http://game.9g.com/xxoo/icon.png*/,
  52. "timeLineLink": "game.html-f=zf.htm"/*tpa=http://game.9g.com/xxoo/game.html?f=zf*/,
  53. "tTitle": "XXOO-9G游戏",
  54. "tContent": "XXOO-9G游戏"
  55. };
  56. function goHome(){
  57. window.location=mebtnopenurl;
  58. }
  59. function clickMore(){
  60. if((window.location+"").indexOf("zf",1)>0){
  61. window.location = "http://game.9g.com/goto9g.html?f=xxoo";
  62. }
  63. else{
  64. goHome();
  65. }
  66. }
  67. function dp_share(){
  68. document.title ="XXOO我在30秒内X了"+myData.score+"下,不服你来挑战我!";
  69. document.getElementById("share").style.display="";
  70. window.shareData.tTitle = document.title;
  71. }
  72. function dp_Ranking(){
  73. window.location=mebtnopenurl;
  74. }
  75. function showAd(){
  76. }
  77. function hideAd(){
  78. }
  79. document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
  80. WeixinJSBridge.on('menu:share:appmessage', function(argv) {
  81. WeixinJSBridge.invoke('sendAppMessage', {
  82. "img_url": window.shareData.imgUrl,
  83. "link": window.shareData.timeLineLink,
  84. "desc": window.shareData.tContent,
  85. "title": window.shareData.tTitle
  86. }, onShareComplete);
  87. });
  88. WeixinJSBridge.on('menu:share:timeline', function(argv) {
  89. WeixinJSBridge.invoke('shareTimeline', {
  90. "img_url": window.shareData.imgUrl,
  91. "img_width": "640",
  92. "img_height": "640",
  93. "link": window.shareData.timeLineLink,
  94. "desc": window.shareData.tContent,
  95. "title": window.shareData.tTitle
  96. }, onShareComplete);
  97. });
  98. }, false);
  99. </script>
  100. <div id=share style="display: none">
  101. <img width=100% src="share.png" tppabs="http://game.9g.com/share.png"
  102. style="position: fixed; z-index: 9999; top: 0; left: 0; display: "
  103. ontouchstart="document.getElementById('share').style.display='none';"/>
  104. </div>
  105. <script src="jquery.min.js" tppabs="http://game.9g.com/auth/jquery.min.js"></script>
  106. <script src="api.js" tppabs="http://game.9g.com/auth/api.js"></script>
  107. <div style="display: none;">
  108. <script type="text/javascript">
  109. var auth = new Auth9G("xxoo");
  110. var myData = {};
  111. auth.identify = function() {
  112. if (auth.user) {
  113. window.shareData.timeLineLink += ((window.shareData.timeLineLink.indexOf("?") == -1 ? "?" : "&") + "uid=" + auth.myuid);
  114. }
  115. }
  116. auth.ready = function() {
  117. baiducnzz();
  118. }
  119. auth.check();
  120. function baiducnzz() {
  121. var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
  122. document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3F0ae524064813b8dc07ece5ce724a7b04' type='text/javascript'%3E%3C/script%3E"));
  123. var cnzz_protocol = (("https:" == document.location.protocol) ? " https://" : " http://");
  124. document.write(unescape("%3Cspan id='cnzz_stat_icon_2947366'%3E%3C/span%3E%3Cscript src='" + cnzz_protocol + "s5.cnzz.com/stat.php%3Fid%3D2947366' type='text/javascript'%3E%3C/script%3E"));
  125. }
  126. function dp_submitScore(score){
  127. myData.score = score;
  128. myData.scoreName = "XXOO了"+score+"下";
  129. if(score>5){
  130. if (confirm("真行,你XXOO了"+score+"下!要不要通知下小伙伴们呢?")){
  131. dp_share();
  132. }
  133. }
  134. }
  135. function onShareComplete(res) {
  136. if (auth.user && myData.score != undefined) {
  137. setTimeout(function(){
  138. if (confirm("要将成绩提交到9G游戏排行榜吗?")) {
  139. auth.submit(myData.score, myData.scoreName, function(){
  140. auth.gotoRank("24h");
  141. });
  142. }
  143. else {
  144. document.location.href = mebtnopenurl;
  145. }
  146. }, 500);
  147. }
  148. else {
  149. document.location.href = mebtnopenurl;
  150. }
  151. }
  152. </script>
  153. </body>
  154. </html>