footer.vue 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. <template>
  2. <div id="proginn-footer">
  3. <div id="friend-links">
  4. <div class="links">
  5. <a href="/">
  6. <img class="logo" src="https://www.proginn.com/Public/image/common/logo_new.png">
  7. </a>
  8. <div class="items">
  9. <div class="item-box" v-for="(link, index) of links" :key="index">
  10. <span class="name">{{link.name}}</span>
  11. <div class="item">
  12. <div class="list" :class="{expand: link.expand}">
  13. <a v-for="(item, ii) of link.data" :key="ii" :href="item.url" target="_blank">{{item.name}}</a>
  14. </div>
  15. <span
  16. class="more"
  17. style="display: inline;"
  18. @click="clickMore(link, index)"
  19. >{{link.expand ? '收起' : '更多'}}</span>
  20. </div>
  21. </div>
  22. </div>
  23. </div>
  24. </div>
  25. <div class="footer" id="footer">
  26. <div class="footer-container">
  27. <div class="footer-links">
  28. <a class="item" href="https://www.proginn.com/index/app" rel="nofollow">APP下载</a>
  29. <a class="item" href="http://support.proginn.com/" rel="nofollow">帮助</a>
  30. <a class="item" href="https://www.proginn.com/about" rel="nofollow">关于我们</a>
  31. <a class="item" href="https://www.proginn.com/about/mediareports" rel="nofollow">媒体报道</a>
  32. <a class="item" href="https://inn.proginn.com/sites/" rel="nofollow">合作伙伴</a>
  33. <a class="item" href="https://www.proginn.com/about/suggestion" rel="nofollow">意见反馈</a>
  34. <span style="color: rgb(204, 204, 204);" class="ui item">© 程序员客栈</span>
  35. </div>
  36. <div class="safe">
  37. <a href="http://www.miibeian.gov.cn" target="_blank" rel="nofollow">浙ICP备15029175号</a>
  38. <div>
  39. <a
  40. style="display: flex;"
  41. target="_blank"
  42. href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=33011002011566"
  43. rel="nofollow"
  44. >
  45. <img
  46. width="20"
  47. height="20"
  48. src="https://www.proginn.com/Public/image/common/badge.png"
  49. >
  50. <span
  51. style="height:20px;line-height:20px;margin: 0px 0px 0px 5px;"
  52. >浙公网安备 33011002011566号</span>
  53. </a>
  54. </div>
  55. </div>
  56. </div>
  57. </div>
  58. </div>
  59. </template>
  60. <script>
  61. export default {
  62. data() {
  63. return {
  64. isCity: false,
  65. isBusiness: false,
  66. isDirection: false,
  67. isRecommend: false,
  68. links: [],
  69. }
  70. },
  71. mounted() {
  72. this.getLinks()
  73. },
  74. methods: {
  75. clickMore(link, index) {
  76. link.expand = !link.expand
  77. this.$set(this.links, index, link)
  78. },
  79. async getLinks() {
  80. let res = await this.$axios.$post('https://www.proginn.com/api/public_config/get_seo_footer_links')
  81. if(res) {
  82. this.links = res.data.links
  83. }
  84. }
  85. }
  86. }
  87. </script>
  88. <style scoped>
  89. #proginn-footer {
  90. width: 100%;
  91. }
  92. #friend-links,
  93. #footer {
  94. display: flex;
  95. justify-content: center;
  96. background: white;
  97. }
  98. #friend-links {
  99. padding: 50px 0 40px;
  100. }
  101. .links,
  102. .footer-container {
  103. display: flex;
  104. justify-content: space-between;
  105. width: 1000px;
  106. font-size: 12px;
  107. color: #4a4a4a;
  108. }
  109. .logo {
  110. width: 115px;
  111. height: 38px;
  112. margin-top: 10px;
  113. }
  114. .items {
  115. display: flex;
  116. flex-direction: column;
  117. align-items: center;
  118. width: 840px;
  119. }
  120. .item {
  121. display: flex;
  122. }
  123. .name {
  124. line-height: 30px;
  125. font-weight: 800;
  126. }
  127. .list {
  128. --height: 30px;
  129. flex: 1;
  130. height: var(--height);
  131. line-height: var(--height);
  132. overflow: hidden;
  133. }
  134. .list a {
  135. display: inline-block;
  136. margin: 0 15px 0 0;
  137. }
  138. .expand {
  139. height: auto;
  140. }
  141. .footer-container a,
  142. .list a {
  143. color: #4a4a4a;
  144. }
  145. .footer-container {
  146. display: flex;
  147. align-items: center;
  148. border-top: 1px solid #ddd;
  149. padding: 20px 0 10px;
  150. }
  151. .footer-links {
  152. display: flex;
  153. align-items: center;
  154. }
  155. .footer-container a {
  156. margin: 0 30px 0 0;
  157. }
  158. .safe {
  159. text-align: right;
  160. }
  161. .safe a {
  162. margin: 0;
  163. }
  164. .more {
  165. line-height: 30px;
  166. cursor: pointer;
  167. }
  168. .more:hover {
  169. color: #1782d9;
  170. }
  171. </style>