Foot.vue 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340
  1. <template>
  2. <div class="call_us_box">
  3. <div class="inner">
  4. <span v-for="(item, index) in bottomMenu" :key="index">
  5. <NuxtLink :to="{ path: `/specialList/${item.id}` }" target="_blank" v-if="item.type == 1">
  6. {{ item.name }}
  7. </NuxtLink>
  8. <NuxtLink :to="{ path: `/speciaArticle/${item.id}` }" target="_blank" v-if="item.type == 0">
  9. {{ item.name }}
  10. </NuxtLink>
  11. </span>
  12. </div>
  13. </div>
  14. <footer class="index_foot">
  15. <div class="foot_text_box">
  16. <p class="top_content">
  17. {{ bottomBase.statement }}
  18. <a :href="bottomBase.record_number_url" target="_blank">乡村网</a>
  19. {{ bottomBase.statement_two }}
  20. </p>
  21. <!-- <p>{{ bottomBase.statistics_onetext }} <a :href="'http://' + bottomBase.statistics_twourl">中农兴业</a> {{ bottomBase.statistics_twotext }}</p> -->
  22. <p class="webSitecolor">
  23. {{ bottomBase.statistics_onetext }}
  24. <a :href="bottomBase.record_number_url" target="_blank" class="webSitecolor">中农兴业</a>
  25. {{ bottomBase.statistics_twotext }}
  26. </p>
  27. <p>
  28. {{ bottomBase.organizer }}
  29. <a :href="bottomBase.record_number_url" target="_blank">{{ bottomBase.record_number }}</a> &nbsp;&nbsp;
  30. <img :src="bottomBase.icp_number_img">
  31. <a :href="bottomBase.icp_number_url" target="_blank">
  32. {{ bottomBase.icp_number }}
  33. </a>
  34. </p>
  35. <p>{{ bottomBase.company_address }}</p>
  36. <p class="top_content">
  37. {{ bottomBase.email }}
  38. {{ bottomBase.contact_number }}
  39. </p>
  40. </div>
  41. <div class="foot_logo_out">
  42. <a :href="'http://' + bottomBase.company_url" :title="bottomBase.company_name" target="_blank">
  43. <img :src="bottomBase.project_logo" class="floatLogoLeft" :alt="bottomBase.company_name">
  44. </a>
  45. </div>
  46. <div class="foot_last_img_box">
  47. <a :href="item.url" v-for="(item, index) in bottomphoto" target="_blank">
  48. <img :src="item.logo_url" alt="">
  49. </a>
  50. </div>
  51. </footer>
  52. </template>
  53. <script setup>
  54. import { onMounted } from 'vue';
  55. const nuxtApp = useNuxtApp();
  56. const axios = nuxtApp.$axios;
  57. // const props = defineProps({
  58. // bottomLink: Array,
  59. // bottomMenu: Array,
  60. // bottomBase: Object
  61. // });
  62. //获得友情链接 图片
  63. const bottomLink = ref([])
  64. const getBottomLink = async () => {
  65. const response = await axios.get(`/web/selectWebsiteLinks?&type=${1}&num=${7}`);
  66. bottomLink.value = response.data;
  67. console.log(bottomLink.value)
  68. }
  69. //文字
  70. const bottomText = ref([])
  71. const getBottomLink2 = async () => {
  72. const response = await axios.get(`/web/selectWebsiteLinks?&type=${2}&num=${8}`);
  73. bottomText.value = response.data;
  74. console.log(bottomLink.value)
  75. }
  76. //底部
  77. const bottomphoto = ref([])
  78. const getBottomLink1 = async () => {
  79. const response = await axios.get(`/web/selectWebsiteLinks?&type=${3}&num=${4}`);
  80. bottomphoto.value = response.data;
  81. console.log(bottomphoto.value)
  82. }
  83. //获得底部导航
  84. const bottomMenu = ref([])
  85. const getBottomMenu = async () => {
  86. const response = await axios.get(`/web/getWebsiteFooterCategory`);
  87. bottomMenu.value = response.data;
  88. console.log(bottomMenu.value)
  89. }
  90. //获得底部基本信息
  91. const bottomBase = ref({})
  92. const getBottomBase = async () => {
  93. const response = await axios.get(`/web/getWebsiteFootInfo`);
  94. bottomBase.value = response.data.website_foot;
  95. console.log(7777777)
  96. console.log('bottomBase', bottomBase.value)
  97. }
  98. onMounted(() => {
  99. getBottomLink();
  100. getBottomLink1();
  101. getBottomLink2();
  102. getBottomMenu();
  103. getBottomBase();
  104. //获取域名
  105. getDomain()
  106. })
  107. //获取当前域名
  108. const currentDomain = ref('')
  109. const currentDomainUrl = ref('')
  110. const getDomain = () => {
  111. if (process.client) {
  112. const url = new URL(window.location.href)
  113. currentDomainUrl.value = url.hostname // 获取域名
  114. currentDomain.value = url.origin //协议和域名
  115. }
  116. }
  117. </script>
  118. <style lang="less" scoped>
  119. .index_foot {
  120. box-sizing: border-box;
  121. width: 1200px;
  122. margin: 0 auto;
  123. }
  124. .index_foot_name_box {
  125. margin: 40px auto 0px;
  126. text-align: center;
  127. font-size: 0px;
  128. }
  129. .index_foot_name {
  130. display: inline-block;
  131. height: 67px;
  132. line-height: 67px;
  133. color: #f2f9f4;
  134. font-size: 51px;
  135. font-weight: bold;
  136. overflow: hidden;
  137. }
  138. .index_foot_name:nth-of-type(even) {
  139. color: #333;
  140. font-size: 32px;
  141. }
  142. .foot_img_box {
  143. overflow: hidden;
  144. display: block;
  145. // margin: 40px auto 0;
  146. width: 100%;
  147. display: flex;
  148. justify-content: space-between;
  149. flex-wrap: wrap;
  150. }
  151. .foot_img_box>* {
  152. margin-top: 20px;
  153. float: left;
  154. width: 170px;
  155. height: 57px;
  156. overflow: hidden;
  157. /* box-sizing: border-box; */
  158. border: solid 1px #D7EDD4;
  159. }
  160. .foot_img_box>* * {
  161. display: block;
  162. width: 100%;
  163. height: 100%;
  164. }
  165. .foot_img_box>*:nth-of-type(7n) {
  166. margin-right: 0px;
  167. }
  168. .foot_frind_box {
  169. display: block;
  170. margin: 40px auto;
  171. overflow: hidden;
  172. display: flex;
  173. width: 100%;
  174. }
  175. .foot_frind_box span {
  176. word-break: keep-all;
  177. white-space: nowrap;
  178. line-height: 22px;
  179. font-size: 16px;
  180. color: #333;
  181. font-weight: bold;
  182. }
  183. .foot_frind_box div {
  184. width: 100%;
  185. overflow: hidden;
  186. }
  187. .foot_frind_box div * {
  188. float: left;
  189. line-height: 22px;
  190. height: 22px;
  191. color: #333;
  192. font-size: 16px;
  193. margin: 0 30px;
  194. }
  195. .call_us_box {
  196. display: block;
  197. width: 100%;
  198. margin: 40px auto 0;
  199. overflow: hidden;
  200. text-align: center;
  201. font-size: 0px;
  202. background: #a01c0e;
  203. a {
  204. color: #fff;
  205. }
  206. }
  207. .inner {
  208. width: 1200px;
  209. margin: 0 auto;
  210. }
  211. .inner>* {
  212. height: 12px;
  213. line-height: 12px;
  214. color: #fff;
  215. font-size: 14px;
  216. display: inline-block;
  217. box-sizing: border-box;
  218. padding: 0 19px;
  219. font-weight: bold;
  220. border-left: solid 1px #7e1c11;
  221. margin: 18px 0;
  222. }
  223. .inner>*:nth-of-type(1) {
  224. border-left: 0px;
  225. }
  226. .foot_text_box {
  227. margin: 40px auto 0px;
  228. text-align: center;
  229. color: #333;
  230. font-size: 14px;
  231. line-height: 25px;
  232. p {
  233. a {
  234. color: #333;
  235. font-size: 14px;
  236. }
  237. .webSitecolor {
  238. color: #a01c0e;
  239. }
  240. }
  241. }
  242. .top_content {
  243. padding: 0 170px;
  244. }
  245. .webSitecolor {
  246. color: #a01c0e;
  247. }
  248. .foot_text_box_green {
  249. color: #a01c0e;
  250. }
  251. .foot_text_box img {
  252. display: inline-block;
  253. height: 20px;
  254. vertical-align: middle;
  255. }
  256. .foot_logo_out {
  257. position: relative;
  258. margin: 0px auto;
  259. width: 100%;
  260. height: 0px;
  261. }
  262. .foot_logo_out * {
  263. width: 120px;
  264. display: block;
  265. }
  266. .foot_logo_out>* {
  267. position: absolute;
  268. top: -100px;
  269. }
  270. .foot_logo_out>*:nth-of-type(1) {
  271. left: 0px;
  272. }
  273. .foot_logo_out>*:nth-of-type(2) {
  274. right: 0px;
  275. }
  276. .foot_last_img_box {
  277. margin: 40px auto 10px;
  278. text-align: center;
  279. overflow: hidden;
  280. width: 100%;
  281. font-size: 0px;
  282. padding-bottom: 40px;
  283. }
  284. .foot_last_img_box>* {
  285. height: 50px;
  286. width: 150px;
  287. margin: 0px 12px;
  288. display: inline-block;
  289. overflow: hidden;
  290. }
  291. .foot_last_img_box>* * {
  292. display: block;
  293. height: 100%;
  294. width: 100%;
  295. overflow: hidden;
  296. }
  297. </style>