footCopy.vue 10 KB

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