webOnServer.html 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta name="apple-mobile-web-app-capable" content="yes">
  5. <meta name="apple-mobile-web-app-status-bar-style" content="black">
  6. <meta content="text/html charset=UTF-8" http-equiv="Content-Type" />
  7. <meta charset="UTF-8">
  8. <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
  9. <link rel="icon" href="../static/img/favicon2.ico" type="img/x-ico">
  10. <link rel="stylesheet" href="../static/css/webOnServer.css">
  11. <!--快捷方式默认图标:icon-->
  12. <title>双子星</title>
  13. <!--快捷方式默认标题:name-->
  14. </head>
  15. <body>
  16. <div class="container">
  17. <div class="title">添加应用到桌面</div>
  18. <div>
  19. <img src="../static/img/webOnServer/phone.png" />
  20. </div>
  21. <a href="" id="qbt" style="display: none;"></a>
  22. <!--快捷方式参数url:url-->
  23. <span id="msg"></span>
  24. </div>
  25. </body>
  26. <script src="https://s3.pstatp.com/cdn/expire-1-M/jquery/3.1.1/jquery.min.js"></script>
  27. <script>
  28. (function ($) {
  29. $.extend({
  30. urlGet: function () {
  31. var aQuery = window.location.href.split("?"); //取得Get参数
  32. var aGET = new Array();
  33. if (aQuery.length > 1) {
  34. var aBuf = aQuery[1].split("&");
  35. for (var i = 0, iLoop = aBuf.length; i < iLoop; i++) {
  36. var aTmp = aBuf[i].split("="); //分离key与Value
  37. aGET[aTmp[0]] = aTmp[1];
  38. }
  39. }
  40. return aGET;
  41. }
  42. })
  43. var GET = $.urlGet(); //获取URL的Get参数
  44. var account = GET['account'];
  45. var phoneID = GET['phoneID'];
  46. var appID = GET['appID'];
  47. var icon = GET['icon'];
  48. var name = decodeURI(GET['name']);
  49. $(document).attr("title",name);
  50. var url = "shuangzixingiOSApp://h5/microserviceUserH5/vcloud/shortcut/webOnServer.html?"
  51. var href_srt = decodeURI("account="+account+"&phoneID="+phoneID+"&appID="+appID+"&icon="+icon+"&name="+name)
  52. $("#qbt").attr("href",url+href_srt)
  53. $("link[rel='apple-touch-icon']").attr("href",icon)
  54. if (window.navigator.standalone == true) {
  55. var lnk = document.getElementById("qbt").click();
  56. // todo 点击快捷方式 打开app引导页 样式
  57. }
  58. else {
  59. document.getElementById("msg").innerHTML = '<div style="font-size:12px">添加快捷方式引导页</div>';
  60. // todo 添加快捷方式引导页 样式
  61. }
  62. })(jQuery);
  63. </script>
  64. </html>