foot1.vue 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  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 }}</a>
  17. </div>
  18. </div> -->
  19. <div class="call_us_box">
  20. <span v-for="(item, index) in bottomMenu" :key="index">
  21. <NuxtLink :to="{ path: `/specialList/${item.id}` }" target="_blank" v-if="item.type == 1">
  22. {{ item.name }}
  23. </NuxtLink>
  24. <NuxtLink :to="{ path: `/speciaArticle/${item.id}` }" target="_blank" v-if="item.type == 0">
  25. {{ item.name }}
  26. </NuxtLink>
  27. </span>
  28. </div>
  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> {{ bottomBase.statistics_twotext }}</p>
  32. <p>{{ bottomBase.organizer }} <a :href="currentDomain" target="_blank">三农资讯网</a> {{ currentDomainUrl }} 版权所有。</p>
  33. <!-- <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> -->
  34. <p><a :href="bottomBase.record_number_url" target="_blank">{{ bottomBase.record_number }}</a> &nbsp;&nbsp; <img :src="bottomBase.icp_number_img"><a :href="bottomBase.icp_number_url" target="_blank">{{ bottomBase.icp_number }}</a> </p>
  35. <p>{{ bottomBase.email }}</p>
  36. <p>{{ bottomBase.company_address }}</p>
  37. <p>{{ bottomBase.contact_number }}</p>
  38. </div>
  39. <div class="foot_logo_out" >
  40. <a :href="'http://' + bottomBase.company_url" :title="bottomBase.company_name" target="_blank">
  41. <img :src="bottomBase.project_logo" class="floatLogoLeft" :alt="bottomBase.company_name">
  42. </a>
  43. <a :href="'http://' + bottomBase.project_url" :title="bottomBase.project_name" target="_blank">
  44. <img :src="bottomBase.company_logo" class="floatLogoRight" :alt="bottomBase.project_name">
  45. </a>
  46. </div>
  47. <div class="foot_last_img_box">
  48. <a :href="item.url" v-for="(item, index) in bottomphoto" target="_blank">
  49. <img :src="item.logo_url" alt="">
  50. </a>
  51. </div>
  52. </footer>
  53. </template>
  54. <script setup>
  55. import { onMounted } from 'vue';
  56. const nuxtApp = useNuxtApp();
  57. const axios = nuxtApp.$axios;
  58. // const props = defineProps({
  59. // bottomLink: Array,
  60. // bottomMenu: Array,
  61. // bottomBase: Object
  62. // });
  63. //获得友情链接 图片
  64. const bottomLink = ref([])
  65. const getBottomLink = async () => {
  66. const response = await axios.get(`/web/selectWebsiteLinks?&type=${1}&num=${7}`);
  67. bottomLink.value = response.data;
  68. console.log(bottomLink.value)
  69. }
  70. //文字
  71. const bottomText = ref([])
  72. const getBottomLink2 = async () => {
  73. const response = await axios.get(`/web/selectWebsiteLinks?&type=${2}&num=${8}`);
  74. bottomText.value = response.data;
  75. console.log(bottomLink.value)
  76. }
  77. //底部
  78. const bottomphoto = ref([])
  79. const getBottomLink1 = async () => {
  80. const response = await axios.get(`/web/selectWebsiteLinks?&type=${3}&num=${4}`);
  81. bottomphoto.value = response.data;
  82. console.log(bottomphoto.value)
  83. }
  84. //获得底部导航
  85. const bottomMenu = ref([])
  86. const getBottomMenu = async () => {
  87. const response = await axios.get(`/web/getWebsiteFooterCategory`);
  88. bottomMenu.value = response.data;
  89. console.log(bottomMenu.value)
  90. }
  91. //获得底部基本信息
  92. const bottomBase = ref({})
  93. const getBottomBase = async () => {
  94. const response = await axios.get(`/web/getWebsiteFootInfo`);
  95. bottomBase.value = response.data.website_foot;
  96. console.log(7777777)
  97. console.log('bottomBase', bottomBase.value)
  98. }
  99. onMounted(() => {
  100. getBottomLink();
  101. getBottomLink1();
  102. getBottomLink2();
  103. getBottomMenu();
  104. getBottomBase();
  105. //获取域名
  106. getDomain()
  107. })
  108. //获取当前域名
  109. const currentDomain = ref('')
  110. const currentDomainUrl = ref('')
  111. const getDomain = () => {
  112. if (process.client) {
  113. const url = new URL(window.location.href)
  114. currentDomainUrl.value = url.hostname // 获取域名
  115. currentDomain.value = url.origin //协议和域名
  116. }
  117. }
  118. </script>
  119. <style lang="less" scoped>
  120. .index_foot{box-sizing:border-box;width: 1200px;margin: 0 auto;}
  121. .index_foot_name_box{margin:40px auto 0px; text-align:center;font-size:0px;}
  122. .index_foot_name{display:inline-block;height:67px;line-height:67px;color:#f2f9f4;font-size:51px;font-weight:bold;overflow:hidden;}
  123. .index_foot_name:nth-of-type(even){color:#333;font-size:32px;}
  124. .foot_img_box{overflow:hidden;display:block;margin:40px auto 0;width:100%; }
  125. .foot_img_box>*{float: left;width:150px;height:50px;overflow:hidden;box-sizing:border-box;border:solid 1px #D7EDD4;margin:0px 25px 10px 0px;}
  126. .foot_img_box>* *{display: block;width:100%;height:100%;}
  127. .foot_img_box>*:nth-of-type(7n){margin-right:0px; }
  128. .foot_frind_box{ display:block;margin:11px auto;overflow:hidden;display:flex;width:100%;border-bottom:solid 2px #49A769;padding-bottom:35px;}
  129. .foot_frind_box span{word-break: keep-all; white-space: nowrap;line-height:22px;font-size:16px;color:#333;font-weight:bold;}
  130. .foot_frind_box div{width:100%;overflow:hidden; }
  131. .foot_frind_box div *{float:left;line-height:22px;height:22px;color:#333;font-size:16px;margin:0 30px;}
  132. .call_us_box{
  133. display:block;width:100%;margin:40px auto 0;overflow:hidden;text-align:center;font-size:0px;background:#49A769;
  134. a {
  135. color: #fff;
  136. }
  137. }
  138. .call_us_box>*{height:12px;line-height:12px;color:#fff;font-size:14px;display:inline-block;box-sizing:border-box;padding:0 19px;font-weight:bold;border-left:solid 1px #5B8D54;margin:18px 0;}
  139. .call_us_box>*:nth-of-type(1){border-left:0px;}
  140. .foot_text_box{
  141. margin:40px auto 0px;text-align:center;color:#333;font-size:14px;line-height:25px;
  142. p {
  143. a {
  144. color: #333;
  145. font-size: 14px;
  146. }
  147. }
  148. }
  149. .foot_text_box_green{color:#40663B;}
  150. .foot_text_box img{display:inline-block;height:20px;vertical-align:middle;}
  151. .foot_logo_out{position:relative;margin:0px auto;width:100%;height:0px;}
  152. .foot_logo_out *{width:120px;display:block; }
  153. .foot_logo_out>*{position:absolute;top:-166px;}
  154. .foot_logo_out>*:nth-of-type(1){left:0px;}
  155. .foot_logo_out>*:nth-of-type(2){right:0px;}
  156. .foot_last_img_box {margin:40px auto 10px;text-align:center;overflow:hidden;width:100%;font-size:0px;padding-bottom: 40px;}
  157. .foot_last_img_box>*{height:50px;width:150px;margin:0px 12px;display:inline-block;overflow:hidden;}
  158. .foot_last_img_box>* *{display:block;height:100%;width:100%;overflow:hidden;}
  159. </style>