index.html 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0 target-densitydpi=device-dpi"/>
  6. <link rel="icon" type="image/GIF" href="res/favicon.ico"/>
  7. <meta http-equiv="cache-control" content="no-cache">
  8. <meta name="viewport" content="user-scalable=no" />
  9. <meta name="apple-mobile-web-app-capable" content="yes"/>
  10. <meta name="full-screen" content="yes"/>
  11. <meta name="screen-orientation" content="portrait"/>
  12. <meta name="x5-fullscreen" content="true"/>
  13. <meta name="360-fullscreen" content="true"/>
  14. <title>逼死强迫症-空中传媒</title>
  15. <script src="js/cocos2d-3.0rc1.canvas.v2.min.js"></script>
  16. <style type="text/css">
  17. body {
  18. background-color: black;
  19. }
  20. </style>
  21. </head>
  22. <body>
  23. <canvas id="gameCanvas" width="640" height="1136"></canvas>
  24. <script type="text/javascript">
  25. window.onload = function(){
  26. cc.game.onStart = function(){
  27. cc.view.enableAutoFullScreen(false);
  28. cc.view.setDesignResolutionSize(640, 1136, cc.ResolutionPolicy.SHOW_ALL);
  29. cc.view.resizeWithBrowserSize(true);
  30. cc.director.setDisplayStats(cc.game.config.showFPS);
  31. //load resources
  32. //cc._loaderImage = "";
  33. cc.LoaderScene.preload(["res/bg.jpg","res/imgs.png", "res/imgs.json", "icon.png"], function () {
  34. cc.spriteFrameCache.addSpriteFrames('res/imgs.json', 'res/imgs.png');
  35. cc.director.runScene(new HelloWorldScene());
  36. }, this);
  37. };
  38. cc.game.run("gameCanvas");
  39. };
  40. </script>
  41. <script language=javascript>
  42. var mebtnopenurl = 'http://game.ikongzhong.cn/index.html';
  43. var thegameurl ="http://game.ikongzhong.cn/games/bsqpz2/";
  44. var guanzhuurl ="http://mp.weixin.qq.com/s?__biz=MzI4MjA2MjE0MQ==&mid=246005295&idx=1&sn=490f8141976d607ba079d48f52a3fcd7#rd";
  45. var is9gUser=false;
  46. window.shareData = {
  47. "imgUrl": "http://game.ikongzhong.cn/games/bsqpz2/icon.png",
  48. "timeLineLink":thegameurl,
  49. "tTitle": "逼死强迫症-空中传媒",
  50. "tContent": "逼死强迫症-空中传媒:mkongzhong"
  51. };
  52. function goHome(){
  53. window.location=mebtnopenurl;
  54. }
  55. function clickMore(){
  56. if((window.location+"").indexOf("zf",1)>0){
  57. window.location = mebtnopenurl;
  58. }
  59. else{
  60. goHome();
  61. }
  62. }
  63. function dp_share(){
  64. document.getElementById("share").style.display="";
  65. }
  66. function dp_Ranking(){
  67. window.location=mebtnopenurl;
  68. }
  69. function showAd(){
  70. }
  71. function hideAd(){
  72. }
  73. document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
  74. WeixinJSBridge.on('menu:share:appmessage', function(argv) {
  75. WeixinJSBridge.invoke('sendAppMessage', {
  76. "img_url": window.shareData.imgUrl,
  77. "link": window.shareData.timeLineLink,
  78. "desc": window.shareData.tContent,
  79. "title": window.shareData.tTitle
  80. }, onShareComplete);
  81. });
  82. WeixinJSBridge.on('menu:share:timeline', function(argv) {
  83. WeixinJSBridge.invoke('shareTimeline', {
  84. "img_url": window.shareData.imgUrl,
  85. "img_width": "640",
  86. "img_height": "640",
  87. "link": window.shareData.timeLineLink,
  88. "desc": window.shareData.tContent,
  89. "title": window.shareData.tTitle
  90. }, onShareComplete);
  91. });
  92. }, false);
  93. </script>
  94. <div id=share style="display: none">
  95. <img width=100% src="share.png"
  96. style="position: fixed; z-index: 9999; top: 0; left: 0; display: "
  97. ontouchstart="document.getElementById('share').style.display='none';" />
  98. </div>
  99. <div style="display: none;">
  100. <script type="text/javascript">
  101. var myData = { gameid: "bsqpz" };
  102. function dp_submitScore(score){
  103. myData.score = parseInt(score);
  104. myData.scoreName = "干掉了"+score+"个新提示";
  105. document.title ="强迫症真的伤不起,我干掉了"+score+"个新提示,你也来试试";
  106. window.shareData.tTitle = document.title;
  107. }
  108. function onShareComplete(res) {
  109. if (localStorage.myuid && myData.score>0) {
  110. setTimeout(function(){
  111. if (confirm("?")) {
  112. window.location = mebtnopenurl;
  113. }
  114. else {
  115. document.location.href = mebtnopenurl;
  116. }
  117. }, 500);
  118. }
  119. else {
  120. document.location.href = guanzhuurl ;
  121. }
  122. }
  123. </script>
  124. <div style="display: none;">
  125. <script type="text/javascript" src="http://tajs.qq.com/stats?sId=36313548" charset="UTF-8"></script>
  126. </div>
  127. <script type="text/javascript" src="js/game9g.utils.js?r="+Math.rand()></script>
  128. </body>
  129. </html>