below.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. <template>
  2. <div class="below-layout">
  3. <div class="content">
  4. <img :src="a" alt="" />
  5. <p>{{$t('sys.BrowserLow')}}</p>
  6. <span>{{$t('sys.BrowserJY')}}</span>
  7. <div class="list">
  8. <div v-for="item in items">
  9. <img :src="item.icon" />
  10. <!-- <img :src="b" /> -->
  11. <p @click="useClickHandler(item.link)">{{ item.name }}</p>
  12. </div>
  13. </div>
  14. </div>
  15. </div>
  16. </template>
  17. <script lang="ts" setup>
  18. const a = "images/err.png";
  19. const b = "images/download.png";
  20. function isDomesticOS() {
  21. const userAgent = navigator.userAgent.toLowerCase();
  22. const platform = navigator.platform.toLowerCase();
  23. return (
  24. /uos|kylin|deepin|neokylin/.test(userAgent) ||
  25. /linux/.test(platform) ||
  26. /国产|中国/.test(userAgent)
  27. );
  28. }
  29. // 国产浏览器
  30. const items = isDomesticOS()
  31. ? [
  32. {
  33. name: "Chromiun",
  34. icon: "./images/browser_Chromium.png",
  35. link: "./images/browser_Chromium.png",
  36. },
  37. {
  38. name: "奇安信可信浏览器",
  39. icon: "./images/browser_Qianxin.png",
  40. link: "./images/browser_Qianxin.png",
  41. },
  42. {
  43. name: "360安全浏览器",
  44. icon: "./images/browser_360.png",
  45. link: "./images/browser_360.png",
  46. },
  47. {
  48. name: "火狐",
  49. icon: "./images/browser_Firefox.png",
  50. link: "./images/browser_Firefox.png",
  51. },
  52. ]
  53. : [
  54. {
  55. name: "Firefox",
  56. icon: "images/ff.png",
  57. link: "http://www.firefox.com.cn/",
  58. },
  59. {
  60. name: "Microsoft Edge",
  61. icon: "images/eg.png",
  62. link: "https://www.microsoft.com/en-us/edge",
  63. },
  64. // {
  65. // icon: "images/safar.png",
  66. // link: "https://www.apple.com/safari/",
  67. // },
  68. {
  69. name: "Chrome",
  70. icon: "images/chrome.png",
  71. link: "https://www.google.com/chrome/",
  72. },
  73. ];
  74. const useClickHandler = (link: string) => {
  75. return;
  76. console.log(link);
  77. window.open(link);
  78. };
  79. </script>
  80. <style lang="scss" scoped>
  81. .below-layout {
  82. position: fixed;
  83. inset: 0;
  84. background: #f7f7f7;
  85. display: flex;
  86. align-items: center;
  87. justify-content: center;
  88. .content {
  89. color: #999;
  90. text-align: center;
  91. > img {
  92. width: 200px;
  93. }
  94. p {
  95. font-size: 16px;
  96. margin: 20px 0;
  97. }
  98. span {
  99. font-size: 14px;
  100. }
  101. }
  102. }
  103. .list {
  104. display: flex;
  105. align-items: center;
  106. justify-content: center;
  107. margin-top: 20px;
  108. p {
  109. color: #999;
  110. width: 100%;
  111. text-align: center;
  112. }
  113. > div {
  114. margin: 0 20px;
  115. > img {
  116. width: 70px !important;
  117. }
  118. }
  119. }
  120. </style>