Foot.vue 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320
  1. <template>
  2. <div class="footer">
  3. <div class="inner">
  4. <div class="tips" v-if="bottomBase">
  5. <p>{{ bottomBase.statement }} <a :href="currentDomain">三农资讯网</a> {{ bottomBase.statement_two }}</p>
  6. </div>
  7. <div class="tipsList" v-if="bottomBase">
  8. <!-- <p>{{ bottomBase.statistics_onetext }} <a :href="'http://' + bottomBase.statistics_twourl">中农兴业</a> {{ bottomBase.statistics_twotext }}</p> -->
  9. <p>{{ bottomBase.statistics_onetext }} <a :href="bottomBase.record_number_url">中农兴业</a> {{ bottomBase.statistics_twotext }}</p>
  10. <p>{{ bottomBase.organizer }} <a :href="currentDomain">三农资讯网</a> {{ currentDomainUrl }} 版权所有。</p>
  11. <!-- <p><img :src="bottomBase.icp_number_img"><a :href="'http://' + bottomBase.statistics_twourl">{{ bottomBase.record_number }}</a> <a :href="'http://' + bottomBase.icp_number_url">{{ bottomBase.icp_number }}</a> </p> -->
  12. <p><a :href="bottomBase.record_number_url">{{ bottomBase.record_number }}</a> &nbsp;&nbsp; <img :src="bottomBase.icp_number_img"><a :href="bottomBase.icp_number_url">{{ bottomBase.icp_number }}</a> </p>
  13. <p>{{ bottomBase.email }}</p>
  14. <p>{{ bottomBase.company_address }}</p>
  15. <p>{{ bottomBase.contact_number }}</p>
  16. <a :href="'http://' + bottomBase.company_url" :title="bottomBase.company_name">
  17. <img :src="bottomBase.project_logo" class="floatLogoLeft" :alt="bottomBase.company_name">
  18. </a>
  19. <a :href="'http://' + bottomBase.project_url" :title="bottomBase.project_name">
  20. <img :src="bottomBase.company_logo" class="floatLogoRight" :alt="bottomBase.project_name">
  21. </a>
  22. </div>
  23. <!-- 图片列表 -->
  24. <ul class="logoList1">
  25. <li v-for="(item, index) in bottomphoto" :key=index class="left">
  26. <a :href="item.url">
  27. <img :src="item.logo_url" alt="">
  28. </a>
  29. </li>
  30. </ul>
  31. </div>
  32. </div>
  33. </template>
  34. <script setup>
  35. import { onMounted } from 'vue';
  36. const nuxtApp = useNuxtApp();
  37. const axios = nuxtApp.$axios;
  38. // const props = defineProps({
  39. // bottomLink: Array,
  40. // bottomMenu: Array,
  41. // bottomBase: Object
  42. // });
  43. //获得友情链接 图片
  44. const bottomLink = ref([])
  45. const getBottomLink = async () => {
  46. const response = await axios.get(`/web/selectWebsiteLinks?&type=${1}&num=${7}`);
  47. bottomLink.value = response.data;
  48. console.log(bottomLink.value)
  49. }
  50. //文字
  51. const bottomText = ref([])
  52. const getBottomLink2 = async () => {
  53. const response = await axios.get(`/web/selectWebsiteLinks?&type=${2}&num=${8}`);
  54. bottomText.value = response.data;
  55. console.log(bottomLink.value)
  56. }
  57. //底部
  58. const bottomphoto = ref([])
  59. const getBottomLink1 = async () => {
  60. const response = await axios.get(`/web/selectWebsiteLinks?&type=${3}&num=${4}`);
  61. bottomphoto.value = response.data;
  62. console.log(bottomphoto.value)
  63. }
  64. //获得底部导航
  65. const bottomMenu = ref([])
  66. const getBottomMenu = async () => {
  67. const response = await axios.get(`/web/getWebsiteFooterCategory`);
  68. bottomMenu.value = response.data;
  69. console.log(bottomMenu.value)
  70. }
  71. //获得底部基本信息
  72. const bottomBase = ref({})
  73. const getBottomBase = async () => {
  74. const response = await axios.get(`/web/getWebsiteFootInfo`);
  75. bottomBase.value = response.data.website_foot;
  76. console.log(7777777)
  77. console.log('bottomBase', bottomBase.value)
  78. }
  79. onMounted(() => {
  80. getBottomLink();
  81. getBottomLink1();
  82. getBottomLink2();
  83. getBottomMenu();
  84. getBottomBase();
  85. //获取域名
  86. getDomain()
  87. })
  88. //获取当前域名
  89. const currentDomain = ref('')
  90. const currentDomainUrl = ref('')
  91. const getDomain = () => {
  92. if (process.client) {
  93. const url = new URL(window.location.href)
  94. currentDomainUrl.value = url.hostname // 获取域名
  95. currentDomain.value = url.origin //协议和域名
  96. }
  97. }
  98. </script>
  99. <style lang="less" scoped>
  100. .footer {
  101. width: 100%;
  102. height: 400px;
  103. background-color: #40663b;
  104. overflow: hidden;
  105. .inner {
  106. width: 1200px;
  107. height: 100%;
  108. // 图片列表
  109. .logoList {
  110. height: 50px;
  111. margin-top: 43px;
  112. >li {
  113. width: 150px;
  114. height: 50px;
  115. margin-right: 25px;
  116. img {
  117. width: 150px;
  118. height: 50px;
  119. }
  120. }
  121. >li:nth-child(7) {
  122. margin-right: 0;
  123. }
  124. }
  125. .link,
  126. .service {
  127. width: 1200px;
  128. height: 26px;
  129. padding-left: 40px;
  130. box-sizing: border-box;
  131. >h5 {
  132. width: 48px;
  133. height: 18px;
  134. line-height: 18px;
  135. font-family: Source Han Sans, Source Han Sans;
  136. font-weight: bold;
  137. font-size: 12px;
  138. color: #FFFFFF;
  139. text-align: center;
  140. font-style: normal;
  141. text-transform: none;
  142. }
  143. }
  144. //友情链接
  145. .link {
  146. margin-top: 47px;
  147. width: 1200px;
  148. border-bottom: 1px solid #fff;
  149. h5 {
  150. margin-right: 109px;
  151. }
  152. >ul>li {
  153. margin-right: 40px;
  154. }
  155. ul>li {
  156. float: left;
  157. >a {
  158. font-family: Source Han Sans, Source Han Sans;
  159. font-weight: 500;
  160. font-size: 12px;
  161. color: #FFFFFF;
  162. line-height: 18px;
  163. text-align: center;
  164. font-style: normal;
  165. text-transform: none;
  166. }
  167. }
  168. }
  169. //快捷服务
  170. .service {
  171. width: 1200px;
  172. margin-top: 8px;
  173. h5 {
  174. margin-right: 80px;
  175. }
  176. >p {
  177. >span {
  178. border-right: 1px solid #fff;
  179. >a {
  180. font-family: Source Han Sans, Source Han Sans;
  181. font-weight: 400;
  182. font-size: 12px;
  183. color: #FFFFFF;
  184. line-height: 18px;
  185. text-align: center;
  186. font-style: normal;
  187. text-transform: none;
  188. padding: 0 13px;
  189. }
  190. }
  191. >span:last-child {
  192. border: none;
  193. }
  194. }
  195. }
  196. p {
  197. font-family: Inter, Inter;
  198. font-weight: bold;
  199. font-size: 12px;
  200. color: #FFFFFF;
  201. line-height: 14px;
  202. text-align: center;
  203. font-style: normal;
  204. text-transform: none;
  205. >em {
  206. display: inline-block;
  207. width: 20px;
  208. height: 20px;
  209. background-image: url("../../static/images/beian 1.png");
  210. vertical-align: middle;
  211. }
  212. }
  213. .tips {
  214. width: 784px;
  215. height: 30px;
  216. margin: 70px auto 30px;
  217. p {
  218. line-height: 22px;
  219. }
  220. a {
  221. color: #fff;
  222. text-decoration: underline;
  223. }
  224. }
  225. .tipsList {
  226. margin: 0 auto;
  227. width: 750px;
  228. height: 108px;
  229. line-height: 30px;
  230. position: relative;
  231. .floatLogoLeft,.floatLogoRight {
  232. position: absolute;
  233. top:-50px;
  234. width: 120px;
  235. height: 120px;
  236. }
  237. .floatLogoLeft {
  238. left: -220px;
  239. }
  240. .floatLogoRight {
  241. right: -220px;
  242. }
  243. p {
  244. line-height: 22px;
  245. }
  246. img {
  247. display: inline-block;
  248. vertical-align: middle;
  249. margin-right: 5px;
  250. margin-top: -2px;
  251. }
  252. a {
  253. color: #fff;
  254. text-decoration: underline;
  255. }
  256. }
  257. .logoList1 {
  258. width: 445px;
  259. height: 40px;
  260. margin: 70px auto 57px;
  261. >li {
  262. width: 96px;
  263. height: 40px;
  264. margin-right: 20px;
  265. img {
  266. width: 96px;
  267. height: 40px;
  268. }
  269. }
  270. >li:last-child {
  271. margin-right: 0px;
  272. }
  273. }
  274. }
  275. }
  276. </style>