foot.vue 8.1 KB

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