index.html 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no" />
  6. <title>火爆朋友圈</title>
  7. <!--jQuery-->
  8. <script type="text/javascript" src="js/createjs.min.js"></script>
  9. <script type="text/javascript" src="js/zepto.min.js"></script>
  10. <script src="js/common.js"></script>
  11. <link type="text/css" href="js/common.css" rel="stylesheet" />
  12. <style>
  13. body,html{padding:0;margin:0;width:100%;height:100%;background:#000;-webkit-tap-highlight-color: transparent;}
  14. canvas{width:100%;height:100%;}
  15. #container{
  16. position:absolute;
  17. bottom:0;left:0;width:100%;height:100%;
  18. }
  19. </style>
  20. </head>
  21. <body>
  22. <div id="container">
  23. <canvas id="canvas"></canvas>
  24. </div>
  25. <div style="display: none;">
  26. </div>
  27. <script src="js/index.js"></script>
  28. <script src="js/flyline.js"></script>
  29. <script language=javascript>
  30. var mebtnopenurl = '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/dqe/img/icon.png",
  33. "timeLineLink": "http://game.ikongzhong.cn/games/dqe",
  34. "tTitle": "打企鹅-火爆朋友圈",
  35. "tContent": "打企鹅-火爆朋友圈"
  36. };
  37. function goHome(){
  38. window.location=mebtnopenurl;
  39. }
  40. function clickMore(){
  41. if((window.location+"").indexOf("zf",1)>0){
  42. window.location = "http://game.ikongzhong.cn/";
  43. }
  44. else{
  45. goHome();
  46. }
  47. }
  48. function dp_share(){
  49. document.title ="你把企鹅击飞出"+myData.scoreName+",谁还能超越我?-玄元南山郡";
  50. document.getElementById("share").style.display="";
  51. window.shareData.tTitle = document.title;
  52. }
  53. function dp_Ranking(){
  54. window.location=mebtnopenurl;
  55. }
  56. function showAd(){
  57. }
  58. function hideAd(){
  59. }
  60. document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
  61. WeixinJSBridge.on('menu:share:appmessage', function(argv) {
  62. WeixinJSBridge.invoke('sendAppMessage', {
  63. "img_url": window.shareData.imgUrl,
  64. "link": window.shareData.timeLineLink,
  65. "desc": window.shareData.tContent,
  66. "title": window.shareData.tTitle
  67. }, onShareComplete);
  68. });
  69. WeixinJSBridge.on('menu:share:timeline', function(argv) {
  70. WeixinJSBridge.invoke('shareTimeline', {
  71. "img_url": window.shareData.imgUrl,
  72. "img_width": "640",
  73. "img_height": "640",
  74. "link": window.shareData.timeLineLink,
  75. "desc": window.shareData.tContent,
  76. "title": window.shareData.tTitle
  77. }, onShareComplete);
  78. });
  79. }, false);
  80. </script>
  81. <div id=share style="display: none">
  82. <img width=100% src="http://game.ikongzhong.cn/games/dqe/share.png"
  83. style="position: fixed; z-index: 9999; top: 0; left: 0; display: "
  84. ontouchstart="document.getElementById('share').style.display='none';" />
  85. </div>
  86. <div style="display: none;">
  87. <script type="text/javascript">
  88. var myData = { gameid: "dqe" };
  89. window.shareData.timeLineLink = "http://game.ikongzhong.cn/games/dqe/index.html?gameid=" + myData.gameid + (localStorage.myuid ? "&uid=" + localStorage.myuid : "");
  90. function dp_submitScore(score){
  91. myData.score = score*10;
  92. myData.scoreName = score+"米";
  93. if(score>0){
  94. if (confirm("你太猛了,大力出奇迹,一下把伦家击飞"+score+"米!要不要通知一下小伙伴")){
  95. dp_share();
  96. }
  97. }
  98. }
  99. function onShareComplete(res) {
  100. if (localStorage.myuid && myData.score != undefined) {
  101. setTimeout(function(){
  102. if (confirm("要将成绩提交到火爆朋友圈排行榜吗?")) {
  103. window.location = "http://game.ikongzhong.cn/games/dqe/index.html?gameid=" + myData.gameid + "&uid=" + localStorage.myuid + "&score=" + myData.score + "&scorename=" + encodeURIComponent(myData.scoreName);
  104. }
  105. else {
  106. document.location.href = mebtnopenurl;
  107. }
  108. }, 500);
  109. }
  110. else {
  111. document.location.href = mebtnopenurl;
  112. }
  113. }
  114. </script>
  115. <div style="display: none;">
  116. </div>
  117. </body>
  118. </html>