index.html 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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: #000000;">
  23. <canvas id="gameCanvas" width="640" height="960"></canvas>
  24. <script src="wzzz_game.min.js"></script>
  25. <script language=javascript>
  26. window.homeurl="";
  27. window.shareData={};
  28. window.shareData.imgUrl="http://game.ikongzhong.cn/games/wzdz/icon.png";
  29. window.shareData.timeLineLink="http://game.ikongzhong.cn/games/wzdz/";
  30. window.shareData.tTitle = "蚊子战争";
  31. window.shareData.tContent = "蚊子战争";
  32. function goHome(){
  33. window.location=window.homeurl;
  34. }
  35. function clickMore(){
  36. window.location=window.homeurl;
  37. }
  38. function dp_share(){
  39. document.getElementById("share").style.display="";
  40. }
  41. function dp_submitScore(score){
  42. if(score>0){
  43. window.shareData.tTitle="我为预防登革热击杀了"+score+"只蚊子!求超越!";
  44. window.shareData.tContent="我为预防登革热击杀了"+score+"只蚊子!求超越!";
  45. dp_share();
  46. }
  47. }
  48. document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
  49. WeixinJSBridge.on('menu:share:appmessage', function(argv) {
  50. WeixinJSBridge.invoke('sendAppMessage', {
  51. "img_url": window.shareData.imgUrl,
  52. "link": window.shareData.timeLineLink,
  53. "desc": window.shareData.tContent,
  54. "title": window.shareData.tTitle
  55. }, function(res) {
  56. document.location.href = mebtnopenurl;
  57. })
  58. });
  59. WeixinJSBridge.on('menu:share:timeline', function(argv) {
  60. WeixinJSBridge.invoke('shareTimeline', {
  61. "img_url": window.shareData.imgUrl,
  62. "img_width": "640",
  63. "img_height": "640",
  64. "link": window.shareData.timeLineLink,
  65. "desc": window.shareData.tContent,
  66. "title": window.shareData.tTitle
  67. }, function(res) {
  68. document.location.href = mebtnopenurl;
  69. });
  70. });
  71. }, false);
  72. </script>
  73. <div id='share' style="display: none">
  74. <img width='100%' src="share.png"
  75. style="position: fixed; z-index: 9999; top: 0; left: 0; display: "
  76. ontouchstart="document.getElementById('share').style.display='none';" />
  77. </div>
  78. </body>
  79. </html>