index.html 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. 
  2. <html>
  3. <head>
  4. <meta charset="utf-8" />
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, user-scalable=no">
  6. <title>扫雷</title>
  7. <meta name="apple-mobile-web-app-capable" content="yes" />
  8. <meta name="apple-mobile-web-app-status-bar-style" content="black" />
  9. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
  10. <link rel="stylesheet" href="js/bootstrap.min.css">
  11. <link href="js/engine.css" rel="stylesheet" type="text/css">
  12. <link href="js/game.css" rel="stylesheet" type="text/css">
  13. <style>
  14. #ad {
  15. text-align: center;
  16. left:0px;
  17. right:0px;
  18. bottom: -5px;
  19. position: fixed;
  20. background-color:#FFF;
  21. z-index:999;
  22. }
  23. </style>
  24. <script src="jquery/2.1.1/jquery.min.js"></script>
  25. </head>
  26. <body>
  27. <div class="engine" style="margin-top: -10.5px;">
  28. <div class="notice"></div>
  29. <div class="status">
  30. <div class="current panel">当前用时 <span>0.00</span> s</div>
  31. <div class="best panel">最快用时<span>0.00</span> s</div>
  32. </div>
  33. <div class="game panel">
  34. <div class="cell-container"></div>
  35. <div class="ending">
  36. <p></p>
  37. <div class="btns">
  38. <button class="retry btn">再来一局</button>
  39. <button class="more btn btn-warning" onclick="clickMore();">更多游戏</button>
  40. </div>
  41. </div>
  42. </div>
  43. </div>
  44. <script src="js/bootstrap.min.js" ></script>
  45. <script src="js/engine.js"></script>
  46. <script src="js/game.js" charset="utf-8"></script>
  47. <script language=javascript>
  48. var mebtnopenurl = 'http://mp.weixin.qq.com/s?__biz=MzI4MjA2MjE0MQ==&mid=246005295&idx=1&sn=490f8141976d607ba079d48f52a3fcd7#rd';
  49. window.shareData = {
  50. "imgUrl": "http://game.ikongzhong.cn/Public/sl/icon.png",
  51. "timeLineLink": "http://game.ikongzhong.cn/Public/sl/",
  52. "tTitle": "扫雷",
  53. "tContent": "不要羡慕我,我只是个扫雷界的传说"
  54. };
  55. function goHome(){
  56. window.location=mebtnopenurl;
  57. }
  58. function clickMore(){
  59. if((window.location+"").indexOf("f=zf",1)>0){
  60. window.location = "http://game.9g.com/goto9g.html?f=sl";
  61. }
  62. else{
  63. goHome();
  64. }
  65. }
  66. function dp_share(){
  67. document.title ="不要羡慕我,我只是个扫雷界的传说, 成绩?+myData.scoreName+",不可能比这个成绩更好了吧!";
  68. document.getElementById("share").style.display="";
  69. window.shareData.tTitle = document.title;
  70. }
  71. function dp_Ranking(){
  72. window.location=mebtnopenurl;
  73. }
  74. function showAd(){
  75. }
  76. function hideAd(){
  77. }
  78. document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
  79. WeixinJSBridge.on('menu:share:appmessage', function(argv) {
  80. WeixinJSBridge.invoke('sendAppMessage', {
  81. "img_url": window.shareData.imgUrl,
  82. "link": window.shareData.timeLineLink,
  83. "desc": window.shareData.tContent,
  84. "title": window.shareData.tTitle
  85. }, onShareComplete);
  86. });
  87. WeixinJSBridge.on('menu:share:timeline', function(argv) {
  88. WeixinJSBridge.invoke('shareTimeline', {
  89. "img_url": window.shareData.imgUrl,
  90. "img_width": "640",
  91. "img_height": "640",
  92. "link": window.shareData.timeLineLink,
  93. "desc": window.shareData.tContent,
  94. "title": window.shareData.tTitle
  95. }, onShareComplete);
  96. });
  97. }, false);
  98. </script>
  99. <div id=share style="display: none">
  100. <img width=100% src="share.png"
  101. style="position: fixed; z-index: 9999; top: 0; left: 0; display: "
  102. ontouchstart="document.getElementById('share').style.display='none';" />
  103. </div>
  104. <div style="display: none;">
  105. <script type="text/javascript">
  106. var myData = { gameid: "sl" };
  107. //var domain = ["oixm.cn", "hiemma.cn", "peagame.net"][parseInt(Math.random() * 3)];
  108. //window.shareData.timeLineLink = "http://"+ parseInt(Math.random()*100000) +"."+ myData.gameid +"."+domain+"/gamecenter.html?gameid=" + myData.gameid + (localStorage.myuid ? "&uid=" + localStorage.myuid : "");
  109. function dp_submitScore(score){
  110. myData.score = parseInt(score);
  111. myData.scoreName = (score/1000)+"秒完?;
  112. if(score>0){
  113. if (confirm("您只用了"+(score/1000)+"秒,就完工了,炫耀一下给小伙伴看看吧?)){
  114. setTimeout(dp_share,500);
  115. }
  116. }
  117. }
  118. function onShareComplete(res) {
  119. if (localStorage.myuid && myData.score != undefined) {
  120. setTimeout(function(){
  121. if (confirm("要将成绩提交?G游戏排行榜吗?)) {
  122. //window.location = "http://wx.9g.com/rank/submit2.jsp?gameid=" + myData.gameid + "&uid=" + localStorage.myuid + "&score=" + myData.score + "&scorename=" + encodeURIComponent(myData.scoreName);
  123. }
  124. else {
  125. document.location.href = mebtnopenurl;
  126. }
  127. }, 500);
  128. }
  129. else {
  130. document.location.href = mebtnopenurl;
  131. }
  132. }
  133. </script>
  134. </body>
  135. </html>