index.html 2.7 KB

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