index.html 3.3 KB

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