download.html 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8" />
  5. <title></title>
  6. <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
  7. <meta http-equiv="Pragma" content="no-cache" />
  8. <meta http-equiv="Expires" content="0" />
  9. <script type="text/javascript" src="https://code.jquery.com/jquery-2.2.4.min.js"></script>
  10. </head>
  11. <body>
  12. <script type="text/javascript">
  13. var id = request("id");
  14. var androidUrl = "" + id;
  15. var iosUrl = "" + id;
  16. if (navigator.userAgent.match(/(iPhone|iPod|iPad)/i)) {
  17. openApp(iosUrl,"https://itunes.apple.com/cn/app/%E7%A2%B0%E8%AF%8D%E5%84%BF-%E5%85%A8%E8%83%BD%E7%9A%84%E5%8D%95%E8%AF%8D%E8%AE%B0%E5%BF%86%E5%8A%A9%E6%89%8B/id1353692603?mt=8")
  18. } else if (navigator.userAgent.match(/(android|linux)/i)) {
  19. var state = null;
  20. try {
  21. window.location = androidUrl;
  22. } catch (e) { }
  23. if (state) {
  24. window.close();
  25. } else {
  26. window.location = "http://liqucn.com/rj/1007384.wml";
  27. //window.location = "https://play.google.com/store/apps/details?id=com.sands.yummy";
  28. }
  29. }
  30. var timeout;
  31. function preventPopup() {
  32. clearTimeout(timeout);
  33. timeout = null;
  34. window.removeEventListener('pagehide', preventPopup);
  35. }
  36. function openApp(appurl,url) {
  37. $('<iframe />')
  38. .attr('src', appurl)
  39. .attr('style', 'display:none;')
  40. .appendTo('body');
  41. timeout = setTimeout(function () {
  42. document.location = url;
  43. }, 500);
  44. window.addEventListener('pagehide', preventPopup);
  45. }
  46. function request(name, url) {
  47. if (!url) url = window.location.href;
  48. name = name.replace(/[\[\]]/g, '\\$&');
  49. var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'),
  50. results = regex.exec(url);
  51. if (!results) return null;
  52. if (!results[2]) return '';
  53. return decodeURIComponent(results[2].replace(/\+/g, ' '));
  54. }
  55. </script>
  56. </body>
  57. </html>