foot1.vue 7.9 KB

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