foot.vue 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  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" :title="item.title">
  10. <img :src="item.logo_url" :alt="item.title">
  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" :title="item.title">{{ 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}` }" v-if="item.type == 1" :title="item.name">
  22. {{ item.name }}
  23. </NuxtLink>
  24. <NuxtLink :to="{ path: `/speciaArticle/${item.id}` }" v-if="item.type == 0" :title="item.name">
  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" :title="中农兴业">中农兴业</a> {{ bottomBase.statistics_twotext }}</p>
  32. <p>{{ bottomBase.organizer }} <a :href="currentDomain" :title="三农资讯网">三农资讯网</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" title="ICP备案号">{{ bottomBase.record_number }}</a> &nbsp;&nbsp; <img :src="bottomBase.icp_number_img"><a :href="bottomBase.icp_number_url" title="京公网安备案号">{{ 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">
  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">
  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" :title="item.title">
  49. <img :src="item.logo_url" :alt="item.title">
  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 mkdata = await requestDataPromise('/web/selectWebsiteLinks', {
  60. method: 'GET',
  61. query: {
  62. 'type':1,
  63. 'num':12,
  64. },
  65. });
  66. bottomLink.value = mkdata.data;
  67. }
  68. getModelData1();
  69. //2.获得友情链接文字
  70. const bottomText = ref([])
  71. async function getModelData2() {
  72. const mkdata = await requestDataPromise('/web/selectWebsiteLinks', {
  73. method: 'GET',
  74. query: {
  75. 'type':2,
  76. 'num':8,
  77. },
  78. });
  79. bottomText.value = mkdata.data;
  80. }
  81. getModelData2();
  82. //3.获得底部图片
  83. const bottomphoto = ref([])
  84. async function getModelData3() {
  85. const mkdata = await requestDataPromise('/web/selectWebsiteLinks', {
  86. method: 'GET',
  87. query: {
  88. 'type':3,
  89. 'num':4,
  90. },
  91. });
  92. bottomphoto.value = mkdata.data;
  93. }
  94. getModelData3();
  95. //4.获得底部导航
  96. const bottomMenu = ref([])
  97. async function getModelData4() {
  98. const mkdata = await requestDataPromise('/web/getWebsiteFooterCategory', {
  99. method: 'GET',
  100. query: {
  101. },
  102. });
  103. bottomMenu.value = mkdata.data;
  104. }
  105. getModelData4();
  106. //5.获得底部基本信息
  107. const bottomBase = ref({})
  108. async function getModelData5() {
  109. const mkdata = await requestDataPromise('/web/getWebsiteFootInfo', {
  110. method: 'GET',
  111. query: {
  112. },
  113. });
  114. bottomBase.value = mkdata.data.website_foot;
  115. }
  116. getModelData5();
  117. //6.获取当前域名
  118. const currentDomain = ref('')
  119. const currentDomainUrl = ref('')
  120. const getDomain = () => {
  121. if (process.client) {
  122. const url = new URL(window.location.href)
  123. currentDomainUrl.value = url.hostname // 获取域名
  124. currentDomain.value = url.origin //协议和域名
  125. }
  126. }
  127. getDomain();
  128. //获得底部基本信息 end---------------------------------------->
  129. </script>
  130. <style lang="less" scoped>
  131. @import '@/assets/css/foot.less';
  132. </style>