Footer.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. <template>
  2. <!-- 底部 -->
  3. <footer>
  4. <div class="container">
  5. <div class="row d-flex flex-row justify-content-center">
  6. <div class="col col-12">
  7. <slot />
  8. </div>
  9. </div>
  10. <div class="row d-flex flex-row justify-content-center">
  11. <div class="col col-sm-12 col-md-6 col-lg-6">
  12. <div class="footer-select">
  13. <select name="related-links-superior" id="related-links-superior" @change="handleLinkChange">
  14. <option value="">上级主管部门</option>
  15. <option value="http://www.ncha.gov.cn/index.html">国家文物局</option>
  16. <option value="https://wlt.fujian.gov.cn/">福建省文化和旅游厅</option>
  17. <option value="http://wlj.xm.gov.cn/">厦门市文化和旅游局</option>
  18. </select>
  19. <select name="related-links-municipal" id="related-links-municipal" @change="handleLinkChange">
  20. <option value="">市政府部门网站</option>
  21. <option value="https://www.xm.gov.cn/">厦门市人民政府</option>
  22. </select>
  23. <select name="related-links-units" id="related-links-units" @change="handleLinkChange">
  24. <option value="">局属单位</option>
  25. <option value="https://www.ihchina.cn/">中国非物质文化遗产网</option>
  26. <option value="https://www.xmlib.net/">厦门市图书馆</option>
  27. <option value="https://www.xmwhg.com.cn/">厦门市文化馆</option>
  28. <option value="http://xmmuseum.com/">厦门市博物馆</option>
  29. </select>
  30. </div>
  31. <div class="footer-links">
  32. <template v-for="link in footerInfo.links" :key="link.url">
  33. <template v-if="link.url.startsWith('http')">
  34. <a :href="link.url" class="footer-link">
  35. {{ link.name }}
  36. </a>
  37. </template>
  38. <template v-else>
  39. <router-link :to="link.url" class="footer-link">
  40. {{ link.name }}
  41. </router-link>
  42. </template>
  43. </template>
  44. </div>
  45. <div class="footer-info">
  46. <p>闽公网安备35020302036685号 | <a href="https://beian.miit.gov.cn/">闽ICP备2025115303号-1</a> |
  47. <span id="_ideConac"><a href="https://bszs.conac.cn/sitename?method=show&amp;id=43C18E2A812B1ABAE06310291AACF961" target="_blank"><img id="imgConac" vspace="0" hspace="0" border="0" src="https://dcs.conac.cn/image/blue_error.png" data-bd-imgshare-binded="1"></a></span>
  48. </p>
  49. <p>联系地址: {{ footerInfo.address }}</p>
  50. <p>联系电话: {{ footerInfo.contactPhone }} | 工作电话: {{ footerInfo.workPhone }}</p>
  51. </div>
  52. </div>
  53. </div>
  54. </div>
  55. </footer>
  56. </template>
  57. <script setup lang="ts">
  58. import { ref } from 'vue';
  59. // 底部信息
  60. const footerInfo = ref({
  61. contactPhone: "0592-5024292",
  62. workPhone: "0592-5045291",
  63. address: "厦门市思明区体育路95号 邮编:361012",
  64. links: [
  65. { name: "关于我们", url: "/about/" },
  66. { name: "联系我们", url: "/about/" },
  67. { name: "使用帮助", url: "/channel/57/" },
  68. { name: "网站地图", url: "/sitemap" }
  69. ]
  70. });
  71. // 相关网站链接选择框事件处理
  72. function handleLinkChange(event: Event) {
  73. const selectElement = event.target as HTMLSelectElement;
  74. const selectedValue = selectElement.value;
  75. if (selectedValue) {
  76. window.location.href = selectedValue;
  77. }
  78. }
  79. </script>
  80. <style scoped lang="scss">
  81. .footer-select {
  82. display: flex;
  83. flex-direction: row;
  84. align-items: center;
  85. justify-content: space-between;
  86. gap: 10px;
  87. select {
  88. width: 33%;;
  89. }
  90. }
  91. .media-matrix {
  92. width: 100%;
  93. height: 100%;
  94. max-width: 250px;
  95. object-fit: cover;
  96. }
  97. </style>