index.html 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge" viewport-fit="cover" />
  6. <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0" />
  7. <title>临时停车</title>
  8. <script>
  9. // CONFIGURATIONS_PLACEHOLDER
  10. if (/dev-/.test(window?.injectConfig?.api) || window.location.href.indexOf(8080) > -1) {
  11. window.injectConfig = {
  12. ...window.injectConfig,
  13. api: 'https://qa-crm-kpl.kerryprops.com.cn',
  14. TRACKING_API_URL:
  15. 'https://qa-tracking-cip.kerryplus.com/sa?project=kerry_tracking',
  16. profileApi: 'https://qa-apim.kerryplus.com/c/api',
  17. qaPayment: 'https://qa-payment.kerryonvip.com',
  18. };
  19. }
  20. window.isAlipayClient = false
  21. // const userAgent = window.navigator.userAgent.toLowerCase()
  22. // if(!/miniprogram/g.test(userAgent)) {
  23. // document.getElementsByTagName('title')[0].innerText= '临时停车'
  24. // }
  25. </script>
  26. <script>
  27. try {
  28. // 或者使用配置参数来初始化,详情见文档
  29. // 开发环境和qa环境 打开debug
  30. // const debug = /dev-t?-?|qa-t?-?|sl-t?-?|2486/.test(window.location.origin);
  31. let debug = false;
  32. const keys = ['https://dev-','https://qa-','https://lt-','https://sl-','http://127.0.0.1', 'http://localhost:8080'];
  33. keys.forEach(key => {
  34. if(!debug && window.location.origin.indexOf(key) > -1) {
  35. debug = true
  36. }
  37. })
  38. if (debug) {
  39. const script = document.createElement('script');
  40. script.src = 'https://unpkg.com/vconsole@latest/dist/vconsole.min.js';
  41. document.head.appendChild(script);
  42. script.addEventListener('load', () => {
  43. setTimeout(() => {
  44. window.vConsole = new window.VConsole();
  45. }, 200);
  46. });
  47. }
  48. } catch (error) {
  49. console.log(error);
  50. }
  51. if (/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent) ) {
  52. // https://developers.weixin.qq.com/community/develop/doc/000ae2cb950808f90d8bc415551800
  53. window.H5_LAUNCH_URL = location.href;
  54. }
  55. </script>
  56. <!--引入https://appx/web-view.min.js, 如该 H5 页面需要同时在非支付宝客户端内使用,为避免该请求404,可参考以下写法 -->
  57. <script>
  58. if (navigator.userAgent.indexOf('AlipayClient') > -1) {
  59. document.writeln('<script src="https://appx/web-view.min.js"' + '>' + '<' + '/' + 'script>');
  60. window.isAlipayClient = true
  61. }
  62. </script>
  63. </head>
  64. <body>
  65. <div id="app"></div>
  66. <script type="module" src="./src/main.js"></script>
  67. </body>
  68. </html>