Footer.vue 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356
  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 href="/about" class="nav-link">企业简介</a></li>
  41. <li><a href="/about" class="nav-link">发展历程</a></li>
  42. <li><a href="/about" 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">
  61. CopyRight © 贵州达泽科技有限公司 Guizhou Gui Daze Technology Co.,Ltd. 黔ICP备19000775号-1 贵公网安备52062102001026号
  62. </p>
  63. </div>
  64. </div>
  65. </div>
  66. </footer>
  67. </template>
  68. <script>
  69. import { ref, onMounted } from 'vue'
  70. import { getCompanyInfo } from '@/api/modules/home'
  71. import defaultQrcode from '@assets/footer-qrcode.png'
  72. export default {
  73. name: 'Footer',
  74. setup() {
  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. onMounted(() => {
  97. fetchCompanyInfo()
  98. })
  99. return {
  100. imgHost,
  101. companyInfo,
  102. loading,
  103. handleImageError
  104. }
  105. }
  106. }
  107. </script>
  108. <style lang="scss" scoped>
  109. .footer {
  110. // background: linear-gradient(135deg, #4a6cf7 0%, #1e3a8a 50%, #0f172a 100%);
  111. background: url('@assets/footer-bg.png') no-repeat center top;
  112. background-size: cover;
  113. // background-color: #07122A;
  114. color: white;
  115. position: relative;
  116. }
  117. .footer-main {
  118. padding: 205px 0 $spacing-xl 0;
  119. }
  120. .container {
  121. max-width: $container-width;
  122. margin: 0 auto;
  123. padding: 0 $container-padding;
  124. }
  125. .footer-content {
  126. display: grid;
  127. grid-template-columns: 1fr 2fr;
  128. gap: 300px;
  129. align-items: flex-start;
  130. }
  131. .contact-section {
  132. .section-title {
  133. font-size: 32px;
  134. font-weight: 400;
  135. margin-bottom: 50px;
  136. color: white;
  137. padding-bottom: 15px;
  138. display: inline-block;
  139. position: relative;
  140. ;
  141. &::after {
  142. content: '';
  143. width: 64px;
  144. height: 4px;
  145. position: absolute;
  146. left: 0;
  147. bottom: 0;
  148. background-color: #2E64AF;
  149. }
  150. }
  151. .contact-item {
  152. font-size: 18px;
  153. display: flex;
  154. align-items: baseline;
  155. margin-bottom: $spacing-base;
  156. .contact-icon {
  157. width: 20px;
  158. height: 20px;
  159. margin-right: 10px;
  160. margin-top: 2px;
  161. flex-shrink: 0;
  162. }
  163. .contact-text {
  164. color: rgba(255, 255, 255, 0.9);
  165. line-height: 1.5;
  166. }
  167. &.phone {
  168. font-size: 32px;
  169. margin-bottom: 24px;
  170. }
  171. &.addr {
  172. margin-bottom: 32px;
  173. }
  174. }
  175. .qrcode-section {
  176. margin-top: 12px;
  177. text-align: left;
  178. .qrcode {
  179. width: 120px;
  180. height: 120px;
  181. border-radius: $border-radius-base;
  182. background: white;
  183. padding: 4px;
  184. }
  185. .qrcode-text {
  186. margin-top: $spacing-small;
  187. color: rgba(255, 255, 255, 0.8);
  188. }
  189. }
  190. }
  191. .nav-sections {
  192. display: grid;
  193. grid-template-columns: repeat(3, 1fr);
  194. gap: $spacing-xl;
  195. }
  196. .nav-column {
  197. .section-title {
  198. font-size: 28px;
  199. font-weight: 400;
  200. margin-bottom: 50px;
  201. color: white;
  202. display: inline-block;
  203. }
  204. .nav-list {
  205. list-style: none;
  206. padding: 0;
  207. margin: 0;
  208. li {
  209. margin-bottom: 30px;
  210. }
  211. .nav-link {
  212. color: rgba(255, 255, 255, 0.8);
  213. text-decoration: none;
  214. font-size: 18px;
  215. transition: color 0.3s ease;
  216. &:hover {
  217. color: white;
  218. // text-decoration: underline;
  219. }
  220. }
  221. }
  222. }
  223. .footer-bottom {
  224. // background: rgba(0, 0, 0, 0.3);
  225. padding: $spacing-base 0;
  226. border-top: 1px solid rgba(255, 255, 255, 0.1);
  227. .copyright-content {
  228. text-align: center;
  229. .copyright-text {
  230. font-size: $font-size-small;
  231. color: rgba(255, 255, 255, 0.4);
  232. margin: 0;
  233. line-height: 1.5;
  234. }
  235. }
  236. }
  237. // 移动端适配
  238. @media (max-width: 768px) {
  239. .footer-main {
  240. padding: $spacing-xl 0 $spacing-large 0;
  241. }
  242. .footer-content {
  243. grid-template-columns: 1fr;
  244. gap: $spacing-large;
  245. }
  246. .contact-section {
  247. .contact-item {
  248. .contact-text {
  249. font-size: $font-size-small;
  250. }
  251. }
  252. .qrcode-section {
  253. text-align: center;
  254. margin-top: $spacing-medium;
  255. .qrcode {
  256. width: 100px;
  257. height: 100px;
  258. }
  259. }
  260. }
  261. .nav-sections {
  262. // grid-template-columns: 1fr;
  263. gap: $spacing-medium;
  264. }
  265. .nav-column {
  266. .section-title {
  267. font-size: $font-size-medium;
  268. }
  269. .nav-list {
  270. .nav-link {
  271. font-size: $font-size-small;
  272. }
  273. }
  274. }
  275. .footer-bottom {
  276. .copyright-text {
  277. font-size: 11px;
  278. padding: 0 $spacing-small;
  279. }
  280. }
  281. }
  282. // 超小屏幕适配
  283. @media (max-width: 480px) {
  284. .footer {
  285. background-position: 0px -35px;
  286. background-color: #07122A;
  287. }
  288. .container {
  289. padding: 0 $spacing-base;
  290. }
  291. .footer-main {
  292. padding: $spacing-large 0;
  293. }
  294. .contact-section {
  295. .contact-item {
  296. flex-direction: row;
  297. align-items: center;
  298. .contact-icon {
  299. margin-bottom: $spacing-xs;
  300. // margin-right: 0;
  301. }
  302. }
  303. }
  304. .nav-sections {
  305. gap: $spacing-base;
  306. }
  307. }
  308. </style>