index.php 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>火贱兔奔月</title>
  6. <meta name="viewport"
  7. content="width=device-width,initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no,target-densitydpi=device-dpi"/>
  8. <meta name="apple-mobile-web-app-capable" content="yes"/>
  9. <meta name="full-screen" content="true"/>
  10. <meta name="screen-orientation" content="portrait"/>
  11. <meta name="x5-fullscreen" content="true"/>
  12. <meta name="360-fullscreen" content="true"/>
  13. <style>
  14. body {
  15. text-align: center;
  16. background: #000000;
  17. padding: 0;
  18. border: 0;
  19. margin: 0;
  20. height: 100%;
  21. }
  22. body a{
  23. display: none;
  24. }
  25. html {
  26. -ms-touch-action: none; /* Direct all pointer events to JavaScript code. */
  27. font-size: 200%
  28. }
  29. #weChat_tips{
  30. display: none;
  31. width: 100%;
  32. height: 100%;
  33. position: fixed;
  34. top: 0;
  35. left: 0;
  36. z-index: 99;
  37. background: rgba(0,0,0,0.8);
  38. /*height: 2.4375rem;*/
  39. /*line-height: 2.4375rem;*/
  40. /*text-align: center;*/
  41. /*position: absolute;*/
  42. /*top: 0;*/
  43. /*right: 0;*/
  44. /*z-index: 99;*/
  45. /*color: #fff;*/
  46. /*background: #ff6600;*/
  47. }
  48. #weChat_tips .txt{
  49. color: #fff;
  50. font-size: 0.875rem;
  51. font-family: "Microsoft YaHei", simsun;
  52. width: 100%;
  53. text-align: left;
  54. text-indent: 0.2rem;
  55. height: 2.4375rem;
  56. line-height: 2.4375rem;
  57. }
  58. #weChat_tips .close{
  59. display: block;
  60. position: absolute;
  61. top: 0;
  62. right: 0;
  63. width: 100%;
  64. /*line-height: 2.4375rem;*/
  65. /*height: 2.4375rem;*/
  66. /*width: 1.8125rem;*/
  67. z-index: 100;
  68. }
  69. @media (max-width: 719px) {
  70. html{
  71. font-size: 28px;
  72. }
  73. }
  74. @media (max-width: 639px) {
  75. html{
  76. font-size: 24px;
  77. }
  78. }
  79. @media (max-width: 532px) {
  80. html{
  81. font-size: 20px;
  82. }
  83. }
  84. @media (max-width: 479px) {
  85. html{
  86. font-size: 16px;
  87. }
  88. }
  89. @media (max-width: 319px) {
  90. html{
  91. font-size: 12px;
  92. }
  93. }
  94. </style>
  95. </head>
  96. <body>
  97. <div style="display:inline-block;width:100%; height:100%;margin: 0 auto; background: #fff; position:relative;"
  98. id="gameDiv">
  99. <canvas id="gameCanvas" width="720" height="1280" style="background-color: #0d0c0d"></canvas>
  100. </div>
  101. <script>var document_class = "GameApp";</script><!--这部分内容在编译时会被替换,要修改文档类,请到工程目录下的egretProperties.json内编辑。-->
  102. <script src="egret_loader.js"></script>
  103. <script src="game-min.js"></script>
  104. <script>
  105. egret_h5.startGame();
  106. </script>
  107. <script src="launcher/zepto.min.js"></script>
  108. <script language=javascript>
  109. var mebtnopenurl = 'http://cnhklm.com/game/';
  110. window.shareData = {
  111. "imgUrl": "http://cnhklm.com/game/youxi/hjby/icon.png",
  112. "timeLineLink": "http://cnhklm.com/game/youxi/hjby/",
  113. "tTitle": "火贱兔奔月",
  114. "tContent": "一只火贱兔流落人间,中秋月圆夜,一心飞奔回嫦娥姐姐身边的故事。"
  115. };
  116. window.openWebsite = function(){
  117. clickMore();
  118. }
  119. window.log = function(str){
  120. //$("#logo").append(str+"\n");
  121. }
  122. window.shareGame = function(){
  123. dp_share();
  124. };
  125. function goHome(){
  126. window.location=mebtnopenurl;
  127. }
  128. function clickMore(){
  129. if((window.location+"").indexOf("f=zf",1)>0){
  130. window.location = "http://cnhklm.com/game/";
  131. }
  132. else{
  133. goHome();
  134. }
  135. }
  136. function dp_share(){
  137. document.getElementById("share").style.display="";
  138. }
  139. function dp_Ranking(){
  140. window.location=mebtnopenurl;
  141. }
  142. function showAd(){
  143. }
  144. function hideAd(){
  145. }
  146. document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
  147. WeixinJSBridge.on('menu:share:appmessage', function(argv) {
  148. WeixinJSBridge.invoke('sendAppMessage', {
  149. "img_url": window.shareData.imgUrl,
  150. "link": window.shareData.timeLineLink,
  151. "desc": window.shareData.tContent,
  152. "title": window.shareData.tTitle
  153. }, onShareComplete);
  154. });
  155. WeixinJSBridge.on('menu:share:timeline', function(argv) {
  156. WeixinJSBridge.invoke('shareTimeline', {
  157. "img_url": window.shareData.imgUrl,
  158. "img_width": "640",
  159. "img_height": "640",
  160. "link": window.shareData.timeLineLink,
  161. "desc": window.shareData.tContent,
  162. "title": window.shareData.tTitle
  163. }, onShareComplete);
  164. });
  165. }, false);
  166. </script>
  167. <div id=share style="display: none">
  168. <img width=100% src="http://cnhklm.com/game/youxi/hjby/share.png"
  169. style="position: fixed; z-index: 9999; top: 0; left: 0; display: "
  170. ontouchstart="document.getElementById('share').style.display='none';" />
  171. </div>
  172. <div style="display: none;">
  173. <script type="text/javascript">
  174. var myData = { gameid: "hjby" };
  175. var domain = ["oixm.cn", "hiemma.cn", "peagame.net"][parseInt(Math.random() * 3)];
  176. //window.shareData.timeLineLink = "http://"+ parseInt(Math.random()*100000) +"."+ myData.gameid +"."+domain+"/gamecenter.html?gameid=" + myData.gameid + (localStorage.myuid ? "&uid=" + localStorage.myuid : "");
  177. function dp_submitScore(score,stitle){
  178. myData.score = parseInt(score);
  179. myData.scoreName = (score/1000)+"米";
  180. document.title =stitle;
  181. window.shareData.tTitle = document.title;
  182. }
  183. function onShareComplete(res) {
  184. if (localStorage.myuid && myData.score != undefined) {
  185. setTimeout(function(){
  186. if (confirm("要将成绩提交到微赢游戏排行榜吗?")) {
  187. // window.location = "http://wx.9g.com/rank/submit2.jsp?gameid=" + myData.gameid + "&uid=" + localStorage.myuid + "&score=" + myData.score + "&scorename=" + encodeURIComponent(myData.scoreName);
  188. }
  189. else {
  190. document.location.href = mebtnopenurl;
  191. }
  192. }, 500);
  193. }
  194. else {
  195. document.location.href = mebtnopenurl;
  196. }
  197. }
  198. </script>
  199. <div style="display: none;">
  200. </div>
  201. </body>
  202. </html>