project.json 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. <html><head><meta charset="utf-8"><meta name="viewport" content="user-scalable=no"/><title>步步惊心</title><link rel="icon" type="image/GIF" href="res/favicon.ico"/><meta name="viewport" content="width=device-width, user-scalable=no, maximum-scale=1.0"/><meta name="apple-mobile-web-app-capable" content="yes"/><meta name="full-screen" content="yes"/><meta name="screen-orientation" content="portrait"/><meta name="x5-fullscreen" content="true"/><meta name="360-fullscreen" content="true"/><style>body, canvas, div {
  2. -moz-user-select: none;
  3. -webkit-user-select: none;
  4. -ms-user-select: none;
  5. -khtml-user-select: none;
  6. -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  7. }
  8. .tip-text {
  9. padding: 7px 10px;
  10. }
  11. .tip-close {
  12. float:right;
  13. color:#333;
  14. text-shadow: 1px 1px 2px #FFF;
  15. font-size: 10px;
  16. margin-top: -13px;
  17. padding-bottom: 2px;
  18. padding-right: 5px;
  19. }
  20. .mod_tips_weixin {
  21. -webkit-animation: twinkling 1.5s infinite ease-in-out;
  22. position: fixed;
  23. width: 70%;
  24. right: 10px;
  25. top: 10px;
  26. background-color: #F90;
  27. color: #FFF;
  28. line-height: 18px;
  29. text-shadow: none;
  30. border-radius: 3px;
  31. font-size: 12px;
  32. z-index: 101;
  33. text-align:left;
  34. }
  35. .mod_tips_weixin:after {
  36. -webkit-animation: twinkling 1.5s infinite ease-in-out;
  37. content: "";
  38. position: absolute;
  39. right: 15px;
  40. top: -10px;
  41. border-width: 5px;
  42. border-color: transparent transparent #F90;
  43. border-style: dashed dashed solid;
  44. }
  45. @-webkit-keyframes twinkling {
  46. 0% {
  47. opacity: 0.5;
  48. }
  49. 50% {
  50. opacity: 1;
  51. }
  52. 100% {
  53. opacity: 0.5;
  54. }
  55. }
  56. .sbg {
  57. display: none;
  58. position: fixed;
  59. top: 0;
  60. left: 0;
  61. width: 100%;
  62. height: 100%;
  63. text-align: center;
  64. color: #fff;
  65. font-size: 22px;
  66. line-height: 1.7em;
  67. background: rgba(0,0,0,0.85);
  68. z-index: 200;
  69. }
  70. .sbg .arron {
  71. position: absolute;
  72. top: 8px;
  73. right: 8px;
  74. width: 100px;
  75. height: 100px;
  76. background: url(http://enjoy360.qiniudn.com//images/arron.gif) no-repeat;
  77. background-size: 100px 100px;
  78. }
  79. .sbg p {
  80. padding-top: 78px;
  81. }
  82. </style></head><body style="padding:0; margin: 0; background: #000;"><canvas id="gameCanvas" width="320" height="480"></canvas><script>function game_over_action()
  83. {
  84. document.getElementById("share_to").style.display = "block";
  85. }
  86. function game_begin_action()
  87. {
  88. document.getElementById("share_to").style.display = "none";
  89. }
  90. function click_share_action()
  91. {
  92. setTimeout(function(){
  93. document.getElementById('sbg').style.display = 'block';
  94. },500);
  95. }
  96. var res_path = "http://wxzg.zhengguzhiwang.com/static_res//bbjx/res";
  97. var _host = "http://" + window.location.host;
  98. (function () {
  99. function onBridgeReady() {
  100. var onShare = function(action) {
  101. var title = _.sprintf(
  102. "【步步惊心】我用%d步解开了迷局,被皇上赐封为【%s】,你的官职是什么?",
  103. wx.chess.lastScore, wx.chess.getTitle()
  104. );
  105. if (wx.chess.lastScore == 0 || wx.chess.shareType == "help") {
  106. title = "我在玩【步步惊心】的时候被难住了...求安抚!求帮助!";
  107. }
  108. WeixinJSBridge.invoke(action, {
  109. "appid": "",
  110. "img_url": "http://enjoy360.qiniudn.com//images/bbjx.jpg",
  111. "img_width": "200",
  112. "img_height": "200",
  113. "link": "http://u2765.o-o-0.com/index.php?r=" + _host + "/enjoy.php/tinygame/bbjx/from/tl",
  114. "desc": "智力小游戏《步步惊心》,等你来战!",
  115. "title": title
  116. }, function(res) {
  117. onShareComplete(res)
  118. });
  119. };
  120. WeixinJSBridge.on('menu:share:timeline', function() {
  121. onShare("shareTimeline");
  122. });
  123. WeixinJSBridge.on('menu:share:appmessage', function() {
  124. onShare('sendAppMessage');
  125. });
  126. WeixinJSBridge.call('showOptionMenu');
  127. }
  128. function attention_wx() {
  129. alert("《整蛊专家》最火爆的朋友圈整人游戏!\n点击确认立即关注!");
  130. location.href = 'http://mp.weixin.qq.com/s?__biz=MjM5Mjg3NjUwMA==&mid=203878037&idx=1&sn=0d99edf65bd472c5178d47d3d855e1b6#rd';
  131. }
  132. function onShareComplete(res) {
  133. setTimeout(function(){
  134. attention_wx();
  135. },500); }
  136. //显示右边上方的分享按钮
  137. var d = document;
  138. if (d.addEventListener) {
  139. d.addEventListener('WeixinJSBridgeReady', onBridgeReady);
  140. } else if (d.attachEvent) {
  141. d.attachEvent('WeixinJSBridgeReady', onBridgeReady);
  142. d.attachEvent('onWeixinJSBridgeReady', onBridgeReady);
  143. }
  144. })();
  145. </script><script> var wx = {}, cc = {};
  146. wx.production = true;
  147. cc.OrbitCamera = cc.CatmullRomBy = cc.CatmullRomTo = cc.CardinalSplineBy = cc.CardinalSplineTo = {};
  148. </script><script src="http://enjoy360.qiniudn.com//bbjx/cocos2d-html5-v3.0-rc1-core.min.js"></script><script src="http://enjoy360.qiniudn.com//bbjx/game.min.js"></script><div id="share_to" class="mod_tips_weixin" onClick="this.style.display='none'" style="display:none;"><div class="tip-text" >点击右上角按钮,分享到朋友圈,和微信好友一起比拼!</div><span class="tip-close">点击关闭</span></div><div id="sbg" class="sbg" onClick="document.getElementById('sbg').style.display = 'none';"><div class="arron"></div><p id="msg">请点击右上角按钮<br /> 再点击【分享到朋友圈】<br /> 去向小伙伴炫耀一下吧!</p></div><style>.ad {
  149. text-align: center;
  150. left:0px;
  151. right:0px;
  152. bottom: -5px;
  153. position: fixed;
  154. background-color:#FFF;
  155. z-index:999;
  156. }
  157. </style><div id='google_js'></div><div id="google_ad" class="ad"><ins
  158. class="adsbygoogle"
  159. style="display: inline-block; width: 320px; height: 50px"
  160. data-ad-client="ca-pub-9048483410846116" data-ad-slot="6220581246"></ins></div><script>(adsbygoogle = window.adsbygoogle || []).push({});
  161. function load_google_js()
  162. {
  163. var header = document.getElementById('google_js');
  164. var script = document.createElement('script');
  165. script.src = '//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js';
  166. header.appendChild(script);
  167. }
  168. setTimeout(function(){
  169. load_google_js();
  170. },100);
  171. </script></body></html>