index.html 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="user-scalable=no width=device-width">
  6. <title>火爆朋友圈</title>
  7. <link rel="stylesheet" href="css/style.css">
  8. <STYLE TYPE="text/css" MEDIA=screen>
  9. #desktop-ad {
  10. display: block;
  11. margin-left: -160px;
  12. width: 320px;
  13. position: absolute;
  14. top: 0px;
  15. left: 50%;
  16. z-Index: 1000;
  17. text-align: center;
  18. }
  19. </STYLE>
  20. <script src="js/jquery.min.js"></script>
  21. <script type="text/javascript" src="js/cookies.js"></script>
  22. <script>
  23. if (!window.paper) {
  24. var paperScript = document.createElement('script');
  25. paperScript.src = "js/paper-full.min.js";
  26. document.head.appendChild(paperScript);
  27. }
  28. </script>
  29. </head>
  30. <body>
  31. <div id='wx_logo' style='margin:0 auto;display:none;'>
  32. <img src='logo/balance.png' />
  33. </div>
  34. <canvas id="canvas" resize stats hidpi="on"></canvas>
  35. <div id="inputpage">
  36. <div id="middle">
  37. <div id="name_form">
  38. <p>载入中,请稍等。。。</p>
  39. </div>
  40. </div>
  41. </div>
  42. <script type="text/paperscript" canvas="canvas" src="js/game.min.js"></script>
  43. <script language=javascript>
  44. var mebtnopenurl = 'http://game.ikongzhong.cn/games/qpjzg/';
  45. window.shareData = {
  46. "imgUrl": "http://game.ikongzhong.cn/icon/qpjzg.png",
  47. "timeLineLink": "http://game.ikongzhong.cn/games/qpjzg/",
  48. "tTitle": "强迫症患者",
  49. "tContent": "强迫症患者"
  50. };
  51. function goHome(){
  52. window.location=mebtnopenurl;
  53. }
  54. function clickMore(){
  55. if((window.location+"").indexOf("zf",1)>0){
  56. window.location = "http://game.ikongzhong.cn/";
  57. }
  58. else{
  59. goHome();
  60. }
  61. }
  62. function dp_share(){
  63. document.title ="我有强迫症,"+myData.scoreName+",你觉得你可以超越我么?";
  64. document.getElementById("share").style.display="";
  65. window.shareData.tTitle = document.title;
  66. }
  67. function dp_Ranking(){
  68. window.location=mebtnopenurl;
  69. }
  70. function showAd(){
  71. }
  72. function hideAd(){
  73. }
  74. document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
  75. WeixinJSBridge.on('menu:share:appmessage', function(argv) {
  76. WeixinJSBridge.invoke('sendAppMessage', {
  77. "img_url": window.shareData.imgUrl,
  78. "link": window.shareData.timeLineLink,
  79. "desc": window.shareData.tContent,
  80. "title": window.shareData.tTitle
  81. }, onShareComplete);
  82. });
  83. WeixinJSBridge.on('menu:share:timeline', function(argv) {
  84. WeixinJSBridge.invoke('shareTimeline', {
  85. "img_url": window.shareData.imgUrl,
  86. "img_width": "640",
  87. "img_height": "640",
  88. "link": window.shareData.timeLineLink,
  89. "desc": window.shareData.tContent,
  90. "title": window.shareData.tTitle
  91. }, onShareComplete);
  92. });
  93. }, false);
  94. </script>
  95. <div id=share style="display: none">
  96. <img width=100% src="http://game.ikongzhong.cn/icon/qpjzg.png"
  97. style="position: fixed; z-index: 9999; top: 0; left: 0; display: "
  98. ontouchstart="document.getElementById('share').style.display='none';" />
  99. </div>
  100. <div style="display: none;">
  101. <script type="text/javascript">
  102. var myData = { gameid: "qpzhz" };
  103. window.shareData.timeLineLink = "http://game.ikongzhong.cn/games/qpjzg" + myData.gameid + (localStorage.myuid ? "&uid=" + localStorage.myuid : "");
  104. function dp_submitScore(score){
  105. myData.score = score*100;
  106. myData.scoreName ="坚持了"+ score+"秒";
  107. if(score>0){
  108. if (confirm("我的强迫症在矫正棍上搞了"+score+"秒,看来强迫症快治好了!")){
  109. dp_share();
  110. }
  111. }
  112. }
  113. function onShareComplete(res) {
  114. document.location.href = mebtnopenurl;
  115. }
  116. </script>
  117. </body>
  118. </html>