foot.vue 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  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. //获得底部基本信息 start---------------------------------------->
  56. //1.获得友情链接图片
  57. const bottomLink = ref([])
  58. async function getModelData1() {
  59. const { data: mkdata, error: mkdataError } = requestData('/web/selectWebsiteLinks', {
  60. method: 'GET',
  61. query: {
  62. 'type':1,
  63. 'num':7,
  64. },
  65. });
  66. if (mkdataError.value) {
  67. //console.error('模块1数据上部分请求失败!', mkdataError.value);
  68. } else {
  69. if (mkdata.value) {
  70. bottomLink.value = mkdata.value.data;
  71. }
  72. }
  73. }
  74. getModelData1();
  75. //2.获得友情链接文字
  76. const bottomText = ref([])
  77. async function getModelData2() {
  78. const { data: mkdata, error: mkdataError } = requestData('/web/selectWebsiteLinks', {
  79. method: 'GET',
  80. query: {
  81. 'type':2,
  82. 'num':8,
  83. },
  84. });
  85. if (mkdataError.value) {
  86. //console.error('模块1数据上部分请求失败!', mkdataError.value);
  87. } else {
  88. if (mkdata.value) {
  89. bottomText.value = mkdata.value.data;
  90. }
  91. }
  92. }
  93. getModelData2();
  94. //3.获得底部图片
  95. const bottomphoto = ref([])
  96. async function getModelData3() {
  97. const { data: mkdata, error: mkdataError } = requestData('/web/selectWebsiteLinks', {
  98. method: 'GET',
  99. query: {
  100. 'type':3,
  101. 'num':4,
  102. },
  103. });
  104. if (mkdataError.value) {
  105. //console.error('模块1数据上部分请求失败!', mkdataError.value);
  106. } else {
  107. if (mkdata.value) {
  108. bottomphoto.value = mkdata.value.data;
  109. }
  110. }
  111. }
  112. getModelData3();
  113. //4.获得底部导航
  114. const bottomMenu = ref([])
  115. async function getModelData4() {
  116. const { data: mkdata, error: mkdataError } = requestData('/web/getWebsiteFooterCategory', {
  117. method: 'GET',
  118. query: {
  119. },
  120. });
  121. if (mkdataError.value) {
  122. //console.error('模块1数据上部分请求失败!', mkdataError.value);
  123. } else {
  124. if (mkdata.value) {
  125. bottomMenu.value = mkdata.value.data;
  126. }
  127. }
  128. }
  129. getModelData4();
  130. //5.获得底部基本信息
  131. const bottomBase = ref({})
  132. async function getModelData5() {
  133. const { data: mkdata, error: mkdataError } = requestData('/web/getWebsiteFootInfo', {
  134. method: 'GET',
  135. query: {
  136. },
  137. });
  138. if (mkdataError.value) {
  139. //console.error('模块1数据上部分请求失败!', mkdataError.value);
  140. } else {
  141. if (mkdata.value) {
  142. bottomBase.value = mkdata.value.data.website_foot;
  143. }
  144. }
  145. }
  146. getModelData5();
  147. //6.获取当前域名
  148. const currentDomain = ref('')
  149. const currentDomainUrl = ref('')
  150. const getDomain = () => {
  151. if (process.client) {
  152. const url = new URL(window.location.href)
  153. currentDomainUrl.value = url.hostname // 获取域名
  154. currentDomain.value = url.origin //协议和域名
  155. }
  156. }
  157. getDomain();
  158. //获得底部基本信息 end---------------------------------------->
  159. </script>
  160. <style lang="less" scoped>
  161. @import '@/assets/css/foot.less';
  162. </style>