index.html 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport" content="width=device-width,initial-scale=1.0">
  7. <link rel="icon" id="favicon" href="<%= BASE_URL %>favicon.ico">
  8. <title>Loading...</title>
  9. <link rel="stylesheet" href="./fontIcon.css">
  10. <script type="text/javascript" src="./echarts.min.js"></script>
  11. <script src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
  12. </head>
  13. <body>
  14. <noscript>
  15. <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled.
  16. Please enable it to continue.</strong>
  17. </noscript>
  18. <div id="app"></div>
  19. <script>
  20. const domainSettings = {
  21. 'szwlh.sunzee.com.cn': {
  22. favicon: 'favicon.ico',
  23. title: 'Sunzee'
  24. },
  25. 'szwltest.sunzee.com.cn': {
  26. favicon: 'favicon.ico',
  27. title: 'Sunzee'
  28. },
  29. 'localhost': {
  30. favicon: 'favicon.ico',
  31. title: 'Sunzee'
  32. },
  33. 'portalmcc.com.cn': {
  34. favicon: 'aetiFavicon.ico',
  35. title: 'AETI GLOBAL'
  36. }
  37. };
  38. const currentDomain = window.location.hostname;
  39. const settings = domainSettings[currentDomain]
  40. if (settings) {
  41. document.getElementById('favicon').setAttribute('href', settings.favicon)
  42. document.title = settings.title
  43. } else {
  44. console.log('Domain settings not found');
  45. }
  46. </script>
  47. </body>
  48. </html>