index.html 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <meta name="viewport" content="width=800,user-scalable=yes,uc-user-scalable=yes,target-densitydpi=high-dpi"/>
  6. <meta name="apple-mobile-web-app-capable" content="yes" />
  7. <meta name="apple-mobile-web-app-status-bar-style" content="black" />
  8. <script language="javascript" type="text/javascript" src="js/jsgamemin.js"></script>
  9. <script language="javascript" type="text/javascript" src="js/Main.min.js"></script>
  10. <title>是男人就啪啪啪!微信HTML5在线朋友圈游戏</title>
  11. <style>
  12. body {
  13. text-align: center;
  14. background: #000000;
  15. padding: 0;
  16. border: 0;
  17. margin: 0;
  18. height: 100%;
  19. }
  20. html {
  21. -ms-touch-action: none; /* Direct all pointer events to JavaScript code. */
  22. }
  23. .sbgshow{display:block;position:fixed;top:0;left:0;width:100%;height:100%;text-align:center;color:#fff;font-size:30px;line-height:1.7em;background:rgba(0,0,0,0.85);}
  24. .sbgshow .arron{ position:absolute;top:8px;right:8px;width:100px;height:100px;background:url(./img/arron.png) no-repeat; background-size:100px 100px;}
  25. .sbgshow p{padding-top:78px;}
  26. .sbg{display:none;position:fixed;top:0;left:0;width:100%;height:100%;text-align:center;color:#fff;font-size:26px;line-height:1.7em;background:rgba(0,0,0,0.85);}
  27. .sbg .arron{ position:absolute;top:8px;right:8px;width:100px;height:100px;background:url(./img/arron.png) no-repeat; background-size:100px 100px;}
  28. .sbg p{padding-top:78px;}
  29. </style>
  30. </head>
  31. <body onload="main()">
  32. <div style="text-align:center;">
  33. <canvas id="jsGameScreen"></canvas>
  34. </div>
  35. <div id="sbg" class="sbg">
  36. <div class="arron"></div>
  37. <p id="msg">请点击右上角<br>点击【分享到朋友圈】<br>找最爱的深爱的相爱的亲爱的人<br>一起来啪啪啪!</p>
  38. </div>
  39. <script>
  40. var mebtnopenurl = 'http://game.ikongzhong.cn/'
  41. window.shareData = {
  42. "imgUrl": "http://game.ikongzhong.cn/games/kanshu/img/Timberman.png",
  43. "timeLineLink": "http://game.ikongzhong.cn/games/kanshu/",
  44. "tTitle": "是男人就啪啪啪!",
  45. "tContent": "玩法简单,只要左右点击切换伐木工的位置,避免撞到树枝障碍即可!"
  46. };
  47. function showme(){//更多游戏
  48. window.location.href = "http://game.ikongzhong.cn/";
  49. }
  50. function dp_Ranking() {
  51. window.location = mebtnopenurl;
  52. }
  53. function share(score,rank){
  54. window.shareData.tTitle = "我已经啪了" + score + "下,是男人就一起来啪啪啪!"
  55. document.getElementById("sbg").className="sbgshow";
  56. window.setTimeout(hiddenMe, 5000);
  57. }
  58. function hiddenMe(){
  59. document.getElementById("sbg").className="sbg";
  60. }
  61. document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
  62. WeixinJSBridge.on('menu:share:appmessage', function(argv) {
  63. WeixinJSBridge.invoke('sendAppMessage', {
  64. "img_url": window.shareData.imgUrl,
  65. "link": window.shareData.timeLineLink,
  66. "desc": window.shareData.tContent,
  67. "title": window.shareData.tTitle
  68. }, function(res) {
  69. document.location.href = mebtnopenurl;
  70. })
  71. });
  72. WeixinJSBridge.on('menu:share:timeline', function(argv) {
  73. WeixinJSBridge.invoke('shareTimeline', {
  74. "img_url": window.shareData.imgUrl,
  75. "img_width": "640",
  76. "img_height": "640",
  77. "link": window.shareData.timeLineLink,
  78. "desc": window.shareData.tContent,
  79. "title": window.shareData.tTitle
  80. }, function(res) {
  81. document.location.href = mebtnopenurl;
  82. });
  83. });
  84. WeixinJSBridge.on('menu:share:weibo', function(argv) {
  85. WeixinJSBridge.invoke('shareWeibo', {
  86. "content": window.shareData.tContent,
  87. "url": window.shareData.timeLineLink
  88. }, function(res) {
  89. document.location.href = mebtnopenurl;
  90. });
  91. });
  92. }, false)
  93. </script>
  94. <img src="http://img.tongji.linezing.com/3455448/tongji.gif">
  95. <script type="text/javascript" src="http://tajs.qq.com/stats?sId=36313548" charset="UTF-8"></script></body>
  96. </html>
  97. >