index.html 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  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="viewport" content="width=device-width, user-scalable=no">
  8. <meta name="apple-mobile-web-app-capable" content="yes"/>
  9. <meta name="full-screen" content="yes"/>
  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, 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="640" height="1000"></canvas>
  25. <script src="js/game.min.js?20140825"></script>
  26. <script language=javascript>
  27. var mebtnopenurl = 'http://game.ikongzhong.cn';
  28. var thegameurl ="http://game.ikongzhong.cn/games/lbyhbyc/";
  29. var guanzhuurl ="http://mp.weixin.qq.com/s?__biz=MzI4MjA2MjE0MQ==&mid=246005295&idx=1&sn=490f8141976d607ba079d48f52a3fcd7#rd";
  30. window.shareData = {
  31. "imgUrl": "http://mmbiz.qpic.cn/mmbiz/2zpp2iaH4HWFX6tke5uPDQdhox50ehxKfkhXc6UibYO4Kd62Z8Gan6NGUtAIODUFuC0P1HViaf2Vmv24d9VmHgEDA/640",
  32. "timeLineLink": thegameurl,
  33. "tTitle": "路边的野花不要采",
  34. "tContent": "路边的野花真呀真漂亮~~~"
  35. };
  36. function goHome(){
  37. window.location=mebtnopenurl;
  38. }
  39. function clickMore(){
  40. if((window.location+"").indexOf("zf",1)>0){
  41. window.location = mebtnopenurl;
  42. }
  43. else{
  44. goHome();
  45. }
  46. }
  47. function dp_share(){
  48. document.title ="我一共采了"+myData.score+"朵小野花,获得了“"+myData.title+"”称号,你也来试试吧!";
  49. document.getElementById("share").style.display="";
  50. window.shareData.tTitle = document.title;
  51. }
  52. function dp_Ranking(){
  53. window.location=mebtnopenurl;
  54. }
  55. function showAd(){
  56. }
  57. function hideAd(){
  58. }
  59. document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
  60. WeixinJSBridge.on('menu:share:appmessage', function(argv) {
  61. WeixinJSBridge.invoke('sendAppMessage', {
  62. "img_url": window.shareData.imgUrl,
  63. "link": window.shareData.timeLineLink,
  64. "desc": window.shareData.tContent,
  65. "title": window.shareData.tTitle
  66. }, onShareComplete);
  67. });
  68. WeixinJSBridge.on('menu:share:timeline', function(argv) {
  69. WeixinJSBridge.invoke('shareTimeline', {
  70. "img_url": window.shareData.imgUrl,
  71. "img_width": "640",
  72. "img_height": "640",
  73. "link": window.shareData.timeLineLink,
  74. "desc": window.shareData.tContent,
  75. "title": window.shareData.tTitle
  76. }, onShareComplete);
  77. });
  78. }, false);
  79. </script>
  80. <div id=share style="display: none">
  81. <img width=100% src="share.png"
  82. style="position: fixed; z-index: 9999; top: 0; left: 0; display: "
  83. ontouchstart="document.getElementById('share').style.display='none';" />
  84. </div>
  85. <div style="display: none;">
  86. <script type="text/javascript">
  87. var myData = { gameid: "lbyhbyc" };
  88. var domain = ["oixm.cn", "hiemma.cn", "peagame.net"][parseInt(Math.random() * 3)];
  89. window.shareData.timeLineLink =thegameurl;
  90. function dp_submitScore(score,title){
  91. myData.score =parseInt(score);
  92. myData.title=title;
  93. myData.scoreName = "采了"+score+"朵";
  94. if(score>0){
  95. if (confirm("你不错哟,采了"+score+"朵小野花,快告诉你的小伙伴们吧!")){
  96. dp_share();
  97. }
  98. }
  99. }
  100. function onShareComplete(res) {
  101. if (localStorage.myuid && myData.score != undefined) {
  102. setTimeout(function(){
  103. if (confirm("要将成绩提交到9G游戏排行榜吗?")) {
  104. window.location =mebtnopenurl;
  105. }
  106. else {
  107. document.location.href = mebtnopenurl;
  108. }
  109. }, 500);
  110. }
  111. else {
  112. document.location.href = guanzhuurl;
  113. }
  114. }
  115. </script>
  116. <div style="display: none;">
  117. </div>
  118. </body>
  119. </html>