foot1.vue 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. <template>
  2. <footer class="index_foot">
  3. <div class="call_us_box">
  4. <span v-for="(item, index) in bottomMenu" :key="index">
  5. <NuxtLink :to="{ path: `/specialList/${item.id}` }" target="_blank" v-if="item.type == 1" :title="item.name">
  6. {{ item.name }}
  7. </NuxtLink>
  8. <NuxtLink :to="{ path: `/speciaArticle/${item.id}` }" target="_blank" v-if="item.type == 0" :title="item.name">
  9. {{ item.name }}
  10. </NuxtLink>
  11. </span>
  12. </div>
  13. <div class="foot_text_box">
  14. <!-- <p>{{ bottomBase.statistics_onetext }} <a :href="'http://' + bottomBase.statistics_twourl">中农兴业</a> {{ bottomBase.statistics_twotext }}</p> -->
  15. <p>{{ bottomBase.statistics_onetext }} <a :href="bottomBase.record_number_url" target="_blank" title="中农兴业">中农兴业</a> {{ bottomBase.statistics_twotext }}</p>
  16. <p>{{ bottomBase.organizer }} <a :href="currentDomain" target="_blank" title="三农资讯网">三农资讯网</a> {{ currentDomainUrl }} 版权所有。</p>
  17. <!-- <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> -->
  18. <p><a :href="bottomBase.record_number_url" target="_blank" title="ICP备案号">{{ bottomBase.record_number }}</a> &nbsp;&nbsp; <img src="http://snzxwt.org/images/beian.png"><a :href="bottomBase.icp_number_url" target="_blank" title="京公网安备案号">{{ bottomBase.icp_number }}</a> </p>
  19. <p>{{ bottomBase.email }}</p>
  20. <p>{{ bottomBase.company_address }}</p>
  21. <p>{{ bottomBase.contact_number }}</p>
  22. </div>
  23. <div class="foot_logo_out" >
  24. <a :href="'http://' + bottomBase.company_url" :title="bottomBase.company_name" target="_blank">
  25. <img :src="bottomBase.project_logo" class="floatLogoLeft" :alt="bottomBase.company_name">
  26. </a>
  27. <a :href="'http://' + bottomBase.project_url" :title="bottomBase.project_name" target="_blank">
  28. <img :src="bottomBase.company_logo" class="floatLogoRight" :alt="bottomBase.project_name">
  29. </a>
  30. </div>
  31. <div class="foot_last_img_box">
  32. <a :href="item.url" v-for="(item, index) in bottomphoto" target="_blank">
  33. <img :src="item.logo_url" alt="">
  34. </a>
  35. </div>
  36. </footer>
  37. </template>
  38. <script setup>
  39. //获得底部基本信息 start---------------------------------------->
  40. //1.获得友情链接图片
  41. const bottomLink = ref([])
  42. async function getModelData1() {
  43. const { data: mkdata, error: mkdataError } = requestData('/web/selectWebsiteLinks', {
  44. method: 'GET',
  45. query: {
  46. 'type':1,
  47. 'num':7,
  48. },
  49. });
  50. if (mkdataError.value) {
  51. //console.error('模块1数据上部分请求失败!', mkdataError.value);
  52. } else {
  53. if (mkdata.value) {
  54. bottomLink.value = mkdata.value.data;
  55. }
  56. }
  57. }
  58. getModelData1();
  59. //2.获得友情链接文字
  60. const bottomText = ref([])
  61. async function getModelData2() {
  62. const { data: mkdata, error: mkdataError } = requestData('/web/selectWebsiteLinks', {
  63. method: 'GET',
  64. query: {
  65. 'type':2,
  66. 'num':8,
  67. },
  68. });
  69. if (mkdataError.value) {
  70. //console.error('模块1数据上部分请求失败!', mkdataError.value);
  71. } else {
  72. if (mkdata.value) {
  73. bottomText.value = mkdata.value.data;
  74. }
  75. }
  76. }
  77. getModelData2();
  78. //3.获得底部图片
  79. const bottomphoto = ref([])
  80. async function getModelData3() {
  81. const { data: mkdata, error: mkdataError } = requestData('/web/selectWebsiteLinks', {
  82. method: 'GET',
  83. query: {
  84. 'type':3,
  85. 'num':4,
  86. },
  87. });
  88. if (mkdataError.value) {
  89. //console.error('模块1数据上部分请求失败!', mkdataError.value);
  90. } else {
  91. if (mkdata.value) {
  92. bottomphoto.value = mkdata.value.data;
  93. }
  94. }
  95. }
  96. getModelData3();
  97. //4.获得底部导航
  98. const bottomMenu = ref([])
  99. async function getModelData4() {
  100. const { data: mkdata, error: mkdataError } = requestData('/web/getWebsiteFooterCategory', {
  101. method: 'GET',
  102. query: {
  103. },
  104. });
  105. if (mkdataError.value) {
  106. //console.error('模块1数据上部分请求失败!', mkdataError.value);
  107. } else {
  108. if (mkdata.value) {
  109. bottomMenu.value = mkdata.value.data;
  110. }
  111. }
  112. }
  113. getModelData4();
  114. //5.获得底部基本信息
  115. const bottomBase = ref({})
  116. async function getModelData5() {
  117. const { data: mkdata, error: mkdataError } = requestData('/web/getWebsiteFootInfo', {
  118. method: 'GET',
  119. query: {
  120. },
  121. });
  122. if (mkdataError.value) {
  123. //console.error('模块1数据上部分请求失败!', mkdataError.value);
  124. } else {
  125. if (mkdata.value) {
  126. bottomBase.value = mkdata.value.data.website_foot;
  127. }
  128. }
  129. }
  130. getModelData5();
  131. //6.获取当前域名
  132. const currentDomain = ref('')
  133. const currentDomainUrl = ref('')
  134. const getDomain = () => {
  135. if (process.client) {
  136. const url = new URL(window.location.href)
  137. currentDomainUrl.value = url.hostname // 获取域名
  138. currentDomain.value = url.origin //协议和域名
  139. }
  140. }
  141. getDomain();
  142. //获得底部基本信息 end---------------------------------------->
  143. </script>
  144. <style lang="less" scoped>
  145. @import '@/assets/css/foot.less';
  146. </style>