index.html 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. <html>
  2. <head>
  3. <meta charset="utf-8">
  4. <meta name="viewport" content="user-scalable=no" />
  5. <title>
  6. 空中传媒
  7. </title>
  8. <link rel="icon" type="image/GIF" href="res/favicon.ico" />
  9. <meta name="viewport" content="width=device-width, user-scalable=no, maximum-scale=1.0"
  10. />
  11. <meta name="apple-mobile-web-app-capable" content="yes" />
  12. <meta name="full-screen" content="yes" />
  13. <meta name="screen-orientation" content="portrait" />
  14. <meta name="x5-fullscreen" content="true" />
  15. <meta name="360-fullscreen" content="true" />
  16. <style>
  17. body,canvas,div { -moz-user-select: none; -webkit-user-select: none; -ms-user-select:
  18. none; -khtml-user-select: none; -webkit-tap-highlight-color: rgba(0, 0,
  19. 0, 0); } .tip-text { padding: 7px 10px; } .tip-close { float: right; color:
  20. #333; text-shadow: 1px 1px 2px #FFF; font-size: 10px; margin-top: -13px;
  21. padding-bottom: 2px; padding-right: 5px; } .mod_tips_weixin { -webkit-animation:
  22. twinkling 1.5s infinite ease-in-out; position: fixed; width: 70%; right:
  23. 10px; top: 10px; background-color: #F90; color: #FFF; line-height: 18px;
  24. text-shadow: none; border-radius: 3px; font-size: 12px; z-index: 101; text-align:
  25. left; } .mod_tips_weixin:after { -webkit-animation: twinkling 1.5s infinite
  26. ease-in-out; content: ""; position: absolute; right: 15px; top: -10px;
  27. border-width: 5px; border-color: transparent transparent #F90; border-style:
  28. dashed dashed solid; } @ -webkit-keyframes twinkling { 0% { opacity: 0.5;
  29. } 50% { opacity : 1; } 100% { opacity : 0 .5 ; } } .sbg { display: none;
  30. position: fixed; top: 0; left: 0; width: 100%; height: 100%; text-align:
  31. center; color: #fff; font-size: 22px; line-height: 1.7em; background: rgba(0,
  32. 0, 0, 0.85); z-index: 200; }
  33. </style>
  34. </head>
  35. <body style="padding: 0; margin: 0; background: #000;">
  36. <canvas id="gameCanvas" width="320" height="480">
  37. </canvas>
  38. <script>
  39. var res_path = "res";
  40. var wx = {},
  41. cc = {};
  42. wx.production = true;
  43. cc.OrbitCamera = cc.CatmullRomBy = cc.CatmullRomTo = cc.CardinalSplineBy = cc.CardinalSplineTo = {};
  44. </script>
  45. <script src="js/cocos2d-html5-v3.0-rc1-core.min.js">
  46. </script>
  47. <script src="js/game.min.js">
  48. </script>
  49. <script language=javascript>
  50. var mebtnopenurl = 'http://game.ikongzhong.cn';
  51. window.shareData = {
  52. "imgUrl": "http://game.ikongzhong.cn/icon/bbjx.png",
  53. "timeLineLink": "http://game.ikongzhong.cn/games/bbjx",
  54. "tTitle": "步步惊心-空中传媒",
  55. "tContent": "步步惊心-空中传媒"
  56. };
  57. function goHome(){
  58. window.location=mebtnopenurl;
  59. }
  60. function clickMore(){
  61. if((window.location+"").indexOf("zf",1)>0){
  62. window.location = "http://game.ikongzhong.cn/games/bbjx";
  63. }
  64. else{
  65. goHome();
  66. }
  67. }
  68. function dp_share(){
  69. document.title ="步步惊心脑力比拼,我仅用"+wx.chess.lastScore+"步解开谜题,被封为"+wx.chess.getTitle()+",你也来试试? ";
  70. document.getElementById("share").style.display="";
  71. window.shareData.tTitle = document.title;
  72. }
  73. function dp_Ranking(){
  74. window.location=mebtnopenurl;
  75. }
  76. function showAd(){
  77. }
  78. function hideAd(){
  79. }
  80. document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
  81. WeixinJSBridge.on('menu:share:appmessage', function(argv) {
  82. WeixinJSBridge.invoke('sendAppMessage', {
  83. "img_url": window.shareData.imgUrl,
  84. "link": window.shareData.timeLineLink,
  85. "desc": window.shareData.tContent,
  86. "title": window.shareData.tTitle
  87. }, onShareComplete);
  88. });
  89. WeixinJSBridge.on('menu:share:timeline', function(argv) {
  90. WeixinJSBridge.invoke('shareTimeline', {
  91. "img_url": window.shareData.imgUrl,
  92. "img_width": "640",
  93. "img_height": "640",
  94. "link": window.shareData.timeLineLink,
  95. "desc": window.shareData.tContent,
  96. "title": window.shareData.tTitle
  97. }, onShareComplete);
  98. });
  99. }, false);
  100. </script>
  101. <div id=share style="display: none">
  102. <img width=100% src="http://game.ikongzhong.cn/games/bbjx/share.png"
  103. style="position: fixed; z-index: 9999; top: 0; left: 0; display: "
  104. ontouchstart="document.getElementById('share').style.display='none';" />
  105. </div>
  106. <div style="display: none;">
  107. <script type="text/javascript">
  108. var myData = { gameid: "bbjx" };
  109. var domain = ["oixm.cn", "hiemma.cn", "peagame.net"][parseInt(Math.random() * 3)];
  110. window.shareData.timeLineLink ="http://game.ikongzhong.cn/games/bbjx/";
  111. function dp_submitScore(score){
  112. myData.score = parseInt(score);
  113. myData.scoreName ="解开了谜题共用"+score+"步";
  114. if(score>0){
  115. if (confirm("我终于用"+score+"步解开了谜题,快把这个消息分享给小伙伴们吧")){
  116. dp_share();
  117. }
  118. }
  119. }
  120. function onShareComplete(res) {
  121. if (localStorage.myuid && myData.score != undefined) {
  122. setTimeout(function(){
  123. if (confirm("要将成绩提交到空中传媒排行榜吗?")) {
  124. window.location = "http://game.ikongzhong.cn/" + myData.gameid + "&uid=" + localStorage.myuid + "&score=" + myData.score + "&scorename=" + encodeURIComponent(myData.scoreName);
  125. }
  126. else {
  127. document.location.href = mebtnopenurl;
  128. }
  129. }, 500);
  130. }
  131. else {
  132. document.location.href = mebtnopenurl;
  133. }
  134. }
  135. </script>
  136. </body>
  137. </html>