index.html 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. 
  2. <!DOCTYPE HTML>
  3. <html>
  4. <head>
  5. <div id='wx_pic' style='margin:0 auto;display:none;'>
  6. <img src='photo.jpg' />
  7. </div>
  8. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  9. <meta id="viewport" name="viewport" content="width=480,user-scalable=no,target-densitydpi=high-dpi" />
  10. <script data-main="js/main2" src="js/require.js"></script>
  11. <title>坚持住,牛郎!织女靠你了!</title>
  12. <style type="text/css">
  13. body{
  14. margin:0px;
  15. padding:0px;
  16. overflow: hidden;
  17. }
  18. </style>
  19. <script>
  20. var product = 'other', ua = navigator.userAgent.toLowerCase();
  21. if(ua.indexOf('micromessenger') != -1) {
  22. product = 'micromessenger';
  23. }
  24. var isbaidu = ua.match(/baidubrowser\/([\w\.]+)\s\(Baidu;\s(P\d)\s([\w\.]+)\)$/i);
  25. if(isbaidu && isbaidu[2] != 'p2') {
  26. product = 'baidubrowser';
  27. }
  28. function submitScore(m,t){
  29. //console.log(['提交分数',m,t])
  30. }
  31. window.shareData = {
  32. "imgUrl": "http://game.ikongzhong.cn/games/qixi1/images/logo.png",
  33. "timeLineLink": "http://game.ikongzhong.cn/games/qixi1/",
  34. "tTitle": "坚持住,牛郎!织女靠你了!",
  35. "tContent": "帮助牛郎织女越过重重障碍。"
  36. };
  37. function shareGame(t){
  38. dp_share(t);
  39. }
  40. var mebtnopenurl = 'http://http://game.ikongzhong.cn/';
  41. function goHome()
  42. {
  43. window.location =
  44. "http://game.ikongzhong.cn/games/qixi1/";
  45. }
  46. function onShareComplete(res)
  47. {
  48. // document.location.href = mebtnopenurl;
  49. document.getElementById("share").style.display="none";
  50. }
  51. document.addEventListener('WeixinJSBridgeReady', function onBridgeReady()
  52. {
  53. WeixinJSBridge.on('menu:share:appmessage', function(argv)
  54. {
  55. WeixinJSBridge.invoke('sendAppMessage',
  56. {
  57. "img_url": window.shareData.imgUrl,
  58. "link": window.shareData.timeLineLink,
  59. "desc": window.shareData.tContent,
  60. "title": window.shareData.tTitle
  61. }, onShareComplete);
  62. });
  63. WeixinJSBridge.on('menu:share:timeline',
  64. function(argv)
  65. {
  66. WeixinJSBridge.invoke('shareTimeline',
  67. {
  68. "img_url": window.shareData.imgUrl,
  69. "img_width": "640",
  70. "img_height": "640",
  71. "link": window.shareData.timeLineLink,
  72. "desc": window.shareData.tContent,
  73. "title": window.shareData.tTitle
  74. },
  75. onShareComplete);
  76. });
  77. },
  78. false);
  79. function dp_share(score)
  80. {
  81. if (score > 0)
  82. {
  83. text = "我帮牛郎坚持了" + score + "秒,织女没见到…你能超过我吗?";
  84. }
  85. else
  86. {
  87. document.title = "坚持住,牛郎!织女靠你了!"
  88. }
  89. document.getElementById("share").style.display="";
  90. window.shareData.tTitle = document.title;
  91. }
  92. function showAd(){}
  93. function hideAd(){}
  94. </script>
  95. </head>
  96. <body>
  97. <div style="text-align:center;" >
  98. <canvas id="linkScreen">很遗憾,您的浏览器不支持HTML5,请使用支持HTML5的浏览器。</canvas>
  99. </div>
  100. <div id="share" style="display: none;">
  101. <img width=100% src="images/share.png" style="position: fixed;z-index:9999; top: 0; left: 0; display: " ontouchstart="document.getElementById('share').style.display='none';">
  102. </div><img src="http://img.tongji.linezing.com/3455448/tongji.gif">
  103. <script type="text/javascript" src="http://tajs.qq.com/stats?sId=36313548" charset="UTF-8"></script></body>
  104. </html>