index.html 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  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. <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"/>
  13. <style>
  14. body, canvas, div {
  15. -moz-user-select: none;
  16. -webkit-user-select: none;
  17. -ms-user-select: none;
  18. -khtml-user-select: none;
  19. -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  20. }
  21. </style>
  22. </head>
  23. <body style="padding:0; margin: 0; background: #000;">
  24. <canvas id="gameCanvas" width="320" height="480" style="position: absolute; z-index: 0"></canvas>
  25. <script src="frameworks/cocos2d-html5/CCBoot.js"></script>
  26. <script src="src/main.js"></script>
  27. <script language=javascript>
  28. var mebtnopenurl = 'http://game.ikongzhong.cn/index.html';
  29. var thegameurl ="http://game.ikongzhong.cn/games/symdsb/";
  30. var guanzhuurl ="http://mp.weixin.qq.com/s?__biz=MzI4MjA2MjE0MQ==&mid=246005295&idx=1&sn=490f8141976d607ba079d48f52a3fcd7#rd";
  31. window.shareData = {
  32. "imgUrl": "http://game.ikongzhong.cn/games/symdsb/icon.png",
  33. "timeLineLink": thegameurl,
  34. "tTitle": "随意门(屌丝版)",
  35. "tContent": "随意门(屌丝版)"
  36. };
  37. function goHome(){
  38. window.location=mebtnopenurl;
  39. }
  40. function clickMore(){
  41. if((window.location+"").indexOf("f=zf",1)>0){
  42. window.location =mebtnopenurl;
  43. }
  44. else{
  45. goHome();
  46. }
  47. }
  48. function dp_share(){
  49. document.getElementById("share").style.display="";
  50. }
  51. function dp_Ranking(){
  52. window.location=mebtnopenurl;
  53. }
  54. function showAd(){
  55. }
  56. function hideAd(){
  57. }
  58. document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
  59. WeixinJSBridge.on('menu:share:appmessage', function(argv) {
  60. WeixinJSBridge.invoke('sendAppMessage', {
  61. "img_url": window.shareData.imgUrl,
  62. "link": window.shareData.timeLineLink,
  63. "desc": window.shareData.tContent,
  64. "title": window.shareData.tTitle
  65. }, onShareComplete);
  66. });
  67. WeixinJSBridge.on('menu:share:timeline', function(argv) {
  68. WeixinJSBridge.invoke('shareTimeline', {
  69. "img_url": window.shareData.imgUrl,
  70. "img_width": "640",
  71. "img_height": "640",
  72. "link": window.shareData.timeLineLink,
  73. "desc": window.shareData.tContent,
  74. "title": window.shareData.tTitle
  75. }, onShareComplete);
  76. });
  77. }, false);
  78. </script>
  79. <div id=share style="display: none">
  80. <img width=100% src="./share.png"
  81. style="position: fixed; z-index: 9999; top: 0; left: 0; display: "
  82. ontouchstart="document.getElementById('share').style.display='none';" />
  83. </div>
  84. <div style="display: none;">
  85. <script type="text/javascript">
  86. var myData = { gameid: "symdsb" };
  87. function dp_submitScore(score){
  88. myData.score =parseInt(score*100);
  89. myData.scoreName = "用时"+score+"秒";
  90. document.title =window.shareData.tTitle = "我在随意门勇闯20扇门中只用了"+score+"秒,小伙伴们也来试一试吧!【9G游戏】";
  91. }
  92. function onShareComplete(res) {
  93. if (localStorage.myuid && myData.score != undefined) {
  94. setTimeout(function(){
  95. if (confirm("?")) {
  96. window.location = mebtnopenurl;
  97. }
  98. else {
  99. document.location.href = mebtnopenurl;
  100. }
  101. }, 500);
  102. }
  103. else {
  104. document.location.href = guanzhuurl ;
  105. }
  106. }
  107. </script>
  108. <div style="display: none;">
  109. <script type="text/javascript" src="http://tajs.qq.com/stats?sId=36313548" charset="UTF-8"></script>
  110. </div>
  111. <script type="text/javascript" src="js/game9g.utils.js"></script>
  112. </body>
  113. </html>