index.html 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport"
  6. content="width=device-width,user-scalable=no,initial-scale=1.0" />
  7. <meta name="apple-mobile-web-app-capable" content="yes" />
  8. <title>贱人配对</title>
  9. <link type="text/css" href="css/game_base.css" rel="stylesheet" />
  10. <script type="text/javascript" src="js/jquery-2.1.0.min.js"></script>
  11. <script type="text/javascript" src="js/game_base.js"></script>
  12. <script type="text/javascript" src="js/createjs-2013.12.12.min.js"></script>
  13. <script type="text/javascript" src="js/createjs_game.js"></script>
  14. <script type="text/javascript" src="js/jquery.cookie.js"></script>
  15. <script type="text/javascript" src="js/main.js"></script>
  16. <style type="text/css">
  17. .follow {
  18. z-index: 100;
  19. position: absolute;
  20. left: -500px;
  21. bottom: 0px;
  22. width: 20%;
  23. opacity: 0;
  24. }
  25. .follow img {
  26. width: 100%
  27. }
  28. .moreGames {
  29. z-index: 100;
  30. position: absolute;
  31. bottom: 10px;
  32. margin-left: auto;
  33. margin-right: auto;
  34. width: 100%;
  35. text-align: center;
  36. }
  37. .moreGames a {
  38. font: 11px Arial;
  39. text-decoration: none;
  40. background-color: #C0C0C0;
  41. color: #FFFFFF;
  42. padding: 2px 10px 2px 10px;
  43. border-radius: 8px;
  44. -webkit-border-radius: 8px;
  45. }
  46. </style>
  47. </head>
  48. <body>
  49. <canvas id="stage">
  50. 您的浏览器不支持html5, 请换用支持html5的浏览器
  51. </canvas>
  52. <script language=javascript>
  53. var mebtnopenurl = 'http://game.ikongzhong.cn/index.html'; //更多游戏链接
  54. window.shareData = {
  55. "imgUrl": "./img/icon.png", //分享朋友圈时的图标
  56. "timeLineLink": "http://game.ikongzhong.cn/jrpd/", //分享朋友圈时的URL
  57. "tTitle": "贱人配对", //分享朋友圈时的标题
  58. "tContent": "贱人就是矫情……我配我配我配配配" //分享朋友圈时的内容
  59. };
  60. function goHome(){
  61. window.location=mebtnopenurl;
  62. }
  63. function dp_share(){
  64. document.title = "瞧瞧!我把"+myscore+"对贱人给办了!贱人配对我最牛,你敢来挑战吗?";
  65. document.getElementById("share").style.display="";
  66. window.shareData.tTitle = document.title;
  67. }
  68. function dp_Ranking(){
  69. //alert("到更多");
  70. window.location=mebtnopenurl;
  71. }
  72. function showAd(){
  73. }
  74. function hideAd(){
  75. }
  76. document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
  77. WeixinJSBridge.on('menu:share:appmessage', function(argv) {
  78. WeixinJSBridge.invoke('sendAppMessage', {
  79. "img_url": window.shareData.imgUrl,
  80. "link": window.shareData.timeLineLink,
  81. "desc": window.shareData.tContent,
  82. "title": window.shareData.tTitle
  83. }, onShareComplete);
  84. });
  85. WeixinJSBridge.on('menu:share:timeline', function(argv) {
  86. WeixinJSBridge.invoke('shareTimeline', {
  87. "img_url": window.shareData.imgUrl,
  88. "img_width": "640",
  89. "img_height": "640",
  90. "link": window.shareData.timeLineLink,
  91. "desc": window.shareData.tContent,
  92. "title": window.shareData.tTitle
  93. }, onShareComplete);
  94. });
  95. }, false);
  96. </script>
  97. <div id=share style="display: none">
  98. <img width=100% src="img/share.png"
  99. style="position: fixed; z-index: 9999; top: 0; left: 0; display: "
  100. ontouchstart="document.getElementById('share').style.display='none';">
  101. </div>
  102. <div style="display: none;">
  103. <script type="text/javascript">
  104. var myData = {};
  105. function dp_submitScore(score){
  106. myscore=score;
  107. myData.score = score;
  108. myData.scoreName = score+"对贱人";
  109. if(score>5){
  110. if (confirm("真行,配成了"+score+"对贱人!要不要通知下小伙伴们呢?")){
  111. dp_share();
  112. }
  113. }
  114. }
  115. function onShareComplete(res) {
  116. }
  117. </script>
  118. </body>
  119. </html>