Footer.vue 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366
  1. <template>
  2. <footer class="footer">
  3. <!-- 主要内容区域 -->
  4. <div class="footer-main">
  5. <div class="container">
  6. <div class="footer-content">
  7. <!-- 左侧联系方式 -->
  8. <div class="contact-section">
  9. <h3 class="section-title">联系我们</h3>
  10. <div class="contact-item phone">
  11. <img src="@assets/footer-phone.png" alt="电话" class="contact-icon">
  12. <span class="contact-text">{{ companyInfo.mobile || '400-624-0069' }}</span>
  13. </div>
  14. <div class="contact-item addr">
  15. <img src="@assets/footer-addr.png" alt="地址" class="contact-icon">
  16. <span class="contact-text">{{ companyInfo.address || '贵州省贵阳市观山湖区金融城MAX-A座' }}</span>
  17. </div>
  18. <div class="qrcode-section">
  19. <img :src="imgHost + companyInfo.wechatQrcode || '@assets/footer-qrcode.png'" alt="微信公众号" class="qrcode"
  20. @error="handleImageError">
  21. <p class="qrcode-text">微信公众号入口</p>
  22. </div>
  23. </div>
  24. <!-- 右侧导航链接 -->
  25. <div class="nav-sections">
  26. <!-- 达泽科技 -->
  27. <div class="nav-column">
  28. <h3 class="section-title">达泽科技</h3>
  29. <ul class="nav-list">
  30. <li><a href="/" class="nav-link">首页</a></li>
  31. <li><a href="/about" class="nav-link">关于我们</a></li>
  32. <li><a href="/cases" class="nav-link">解决方案</a></li>
  33. <li><a href="/products" class="nav-link">技术框架</a></li>
  34. </ul>
  35. </div>
  36. <!-- 关于我们 -->
  37. <div class="nav-column">
  38. <h3 class="section-title">关于我们</h3>
  39. <ul class="nav-list">
  40. <li><a @click="goToAboutSection('about-us')" class="nav-link">企业简介</a></li>
  41. <li><a @click="goToAboutSection('history')" class="nav-link">发展历程</a></li>
  42. <li><a @click="goToAboutSection('qualification-section')" class="nav-link">企业荣誉</a></li>
  43. </ul>
  44. </div>
  45. <!-- 联系我们 -->
  46. <div class="nav-column">
  47. <h3 class="section-title">联系我们</h3>
  48. <ul class="nav-list">
  49. <li><a href="/contact" class="nav-link">联系方式</a></li>
  50. </ul>
  51. </div>
  52. </div>
  53. </div>
  54. </div>
  55. </div>
  56. <!-- 底部版权信息 -->
  57. <div class="footer-bottom">
  58. <div class="container">
  59. <div class="copyright-content">
  60. <p class="copyright-text"><a href="https://beian.miit.gov.cn/" target="_blank">{{ companyInfo.filingInfo||'' }}</a></p>
  61. </div>
  62. </div>
  63. </div>
  64. </footer>
  65. </template>
  66. <script>
  67. import { ref, onMounted } from 'vue'
  68. import { useRouter } from 'vue-router'
  69. import { getCompanyInfo } from '@/api/modules/home'
  70. import defaultQrcode from '@assets/footer-qrcode.png'
  71. export default {
  72. name: 'Footer',
  73. setup() {
  74. const router = useRouter()
  75. // 环境变量
  76. const imgHost = import.meta.env.VITE_APP_IMG_HOST
  77. const companyInfo = ref({})
  78. const loading = ref(false)
  79. const fetchCompanyInfo = async () => {
  80. try {
  81. loading.value = true
  82. const response = await getCompanyInfo()
  83. if (response.data) {
  84. companyInfo.value = response.data
  85. }
  86. } catch (error) {
  87. console.error('获取公司信息失败:', error)
  88. } finally {
  89. loading.value = false
  90. }
  91. }
  92. const handleImageError = (event) => {
  93. // 如果微信二维码图片加载失败,使用默认图片
  94. event.target.src = defaultQrcode
  95. }
  96. // 跳转到关于我们页面的指定模块
  97. const goToAboutSection = (section) => {
  98. router.push({
  99. name: 'About',
  100. hash: `#${section}`
  101. })
  102. }
  103. onMounted(() => {
  104. fetchCompanyInfo()
  105. })
  106. return {
  107. router,
  108. imgHost,
  109. companyInfo,
  110. loading,
  111. handleImageError,
  112. goToAboutSection
  113. }
  114. }
  115. }
  116. </script>
  117. <style lang="scss" scoped>
  118. .footer {
  119. // background: linear-gradient(135deg, #4a6cf7 0%, #1e3a8a 50%, #0f172a 100%);
  120. background: url('@assets/footer-bg.png') no-repeat center top;
  121. background-size: cover;
  122. // background-color: #07122A;
  123. color: white;
  124. position: relative;
  125. }
  126. .footer-main {
  127. padding: 205px 0 $spacing-xl 0;
  128. }
  129. .container {
  130. max-width: $container-width;
  131. margin: 0 auto;
  132. padding: 0 $container-padding;
  133. }
  134. .footer-content {
  135. display: grid;
  136. grid-template-columns: 1fr 2fr;
  137. gap: 300px;
  138. align-items: flex-start;
  139. }
  140. .contact-section {
  141. .section-title {
  142. font-size: 32px;
  143. font-weight: 400;
  144. margin-bottom: 50px;
  145. color: white;
  146. padding-bottom: 15px;
  147. display: inline-block;
  148. position: relative;
  149. ;
  150. &::after {
  151. content: '';
  152. width: 64px;
  153. height: 4px;
  154. position: absolute;
  155. left: 0;
  156. bottom: 0;
  157. background-color: #2E64AF;
  158. }
  159. }
  160. .contact-item {
  161. font-size: 18px;
  162. display: flex;
  163. align-items: baseline;
  164. margin-bottom: $spacing-base;
  165. .contact-icon {
  166. width: 20px;
  167. height: 20px;
  168. margin-right: 10px;
  169. margin-top: 2px;
  170. flex-shrink: 0;
  171. }
  172. .contact-text {
  173. color: rgba(255, 255, 255, 0.9);
  174. line-height: 1.5;
  175. }
  176. &.phone {
  177. font-size: 32px;
  178. margin-bottom: 24px;
  179. }
  180. &.addr {
  181. margin-bottom: 32px;
  182. }
  183. }
  184. .qrcode-section {
  185. margin-top: 12px;
  186. text-align: left;
  187. .qrcode {
  188. width: 120px;
  189. height: 120px;
  190. border-radius: $border-radius-base;
  191. background: white;
  192. padding: 4px;
  193. }
  194. .qrcode-text {
  195. margin-top: $spacing-small;
  196. color: rgba(255, 255, 255, 0.8);
  197. }
  198. }
  199. }
  200. .nav-sections {
  201. display: grid;
  202. grid-template-columns: repeat(3, 1fr);
  203. gap: $spacing-xl;
  204. }
  205. .nav-column {
  206. .section-title {
  207. font-size: 28px;
  208. font-weight: 400;
  209. margin-bottom: 50px;
  210. color: white;
  211. display: inline-block;
  212. }
  213. .nav-list {
  214. list-style: none;
  215. padding: 0;
  216. margin: 0;
  217. li {
  218. margin-bottom: 30px;
  219. }
  220. .nav-link {
  221. color: rgba(255, 255, 255, 0.8);
  222. text-decoration: none;
  223. font-size: 18px;
  224. transition: color 0.3s ease;
  225. &:hover {
  226. color: white;
  227. // text-decoration: underline;
  228. }
  229. }
  230. }
  231. }
  232. .footer-bottom {
  233. // background: rgba(0, 0, 0, 0.3);
  234. padding: $spacing-base 0;
  235. border-top: 1px solid rgba(255, 255, 255, 0.1);
  236. .copyright-content {
  237. text-align: center;
  238. .copyright-text {
  239. font-size: $font-size-small;
  240. color: rgba(255, 255, 255, 0.4);
  241. margin: 0;
  242. line-height: 1.5;
  243. }
  244. }
  245. }
  246. // 移动端适配
  247. @media (max-width: 768px) {
  248. .footer-main {
  249. padding: $spacing-xl 0 $spacing-large 0;
  250. }
  251. .footer-content {
  252. grid-template-columns: 1fr;
  253. gap: $spacing-large;
  254. }
  255. .contact-section {
  256. .contact-item {
  257. .contact-text {
  258. font-size: $font-size-small;
  259. }
  260. }
  261. .qrcode-section {
  262. text-align: center;
  263. margin-top: $spacing-medium;
  264. .qrcode {
  265. width: 100px;
  266. height: 100px;
  267. }
  268. }
  269. }
  270. .nav-sections {
  271. // grid-template-columns: 1fr;
  272. gap: $spacing-medium;
  273. }
  274. .nav-column {
  275. .section-title {
  276. font-size: $font-size-medium;
  277. }
  278. .nav-list {
  279. .nav-link {
  280. font-size: $font-size-small;
  281. }
  282. }
  283. }
  284. .footer-bottom {
  285. .copyright-text {
  286. font-size: 11px;
  287. padding: 0 $spacing-small;
  288. }
  289. }
  290. }
  291. // 超小屏幕适配
  292. @media (max-width: 480px) {
  293. .footer {
  294. background-position: 0px -35px;
  295. background-color: #07122A;
  296. }
  297. .container {
  298. padding: 0 $spacing-base;
  299. }
  300. .footer-main {
  301. padding: $spacing-large 0;
  302. }
  303. .contact-section {
  304. .contact-item {
  305. flex-direction: row;
  306. align-items: center;
  307. .contact-icon {
  308. margin-bottom: $spacing-xs;
  309. // margin-right: 0;
  310. }
  311. }
  312. }
  313. .nav-sections {
  314. gap: $spacing-base;
  315. }
  316. }
  317. </style>