foot.vue 4.9 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" target="_blank">
  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" 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}` }" 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" v-if="bottomBase">
  30. <p>{{ bottomBase.statistics_onetext }} <a :href="bottomBase.record_number_url" :title="中农兴业">中农兴业</a> {{ bottomBase.statistics_twotext }}</p>
  31. <p>{{ bottomBase.organizer }} <a :href="currentDomain" :title="webSiteName">{{ webSiteName }}</a> {{ currentDomainUrl }} 版权所有。</p>
  32. <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>
  33. <p>{{ bottomBase.email }}</p>
  34. <p>{{ bottomBase.company_address }}</p>
  35. <p>{{ bottomBase.contact_number }}</p>
  36. </div>
  37. <div class="foot_logo_out" v-if="bottomBase">
  38. <a :href="'http://' + bottomBase.company_url" :title="bottomBase.company_name">
  39. <img :src="bottomBase.project_logo" class="floatLogoLeft" :alt="bottomBase.company_name">
  40. </a>
  41. <a :href="'http://' + bottomBase.project_url" :title="bottomBase.project_name">
  42. <img :src="bottomBase.company_logo" class="floatLogoRight" :alt="bottomBase.project_name">
  43. </a>
  44. </div>
  45. <div class="foot_last_img_box">
  46. <a :href="item.url" v-for="(item, index) in bottomphoto" :title="item.title">
  47. <img :src="item.logo_url" :alt="item.title">
  48. </a>
  49. </div>
  50. </footer>
  51. </template>
  52. <script setup>
  53. //获得底部基本信息 start---------------------------------------->
  54. //1.获得友情链接图片
  55. const bottomLink = ref([])
  56. async function getModelData1() {
  57. const mkdata = await requestDataPromise('/web/selectWebsiteLinks', {
  58. method: 'GET',
  59. query: {
  60. 'type':1,
  61. 'num':12,
  62. },
  63. });
  64. bottomLink.value = mkdata.data;
  65. }
  66. getModelData1();
  67. //2.获得友情链接文字
  68. const bottomText = ref([])
  69. async function getModelData2() {
  70. const mkdata = await requestDataPromise('/web/selectWebsiteLinks', {
  71. method: 'GET',
  72. query: {
  73. 'type':2,
  74. 'num':8,
  75. },
  76. });
  77. bottomText.value = mkdata.data;
  78. }
  79. getModelData2();
  80. //3.获得底部图片
  81. const bottomphoto = ref([])
  82. async function getModelData3() {
  83. const mkdata = await requestDataPromise('/web/selectWebsiteLinks', {
  84. method: 'GET',
  85. query: {
  86. 'type':3,
  87. 'num':4,
  88. },
  89. });
  90. bottomphoto.value = mkdata.data;
  91. }
  92. getModelData3();
  93. //4.获得底部导航
  94. const bottomMenu = ref([])
  95. async function getModelData4() {
  96. const mkdata = await requestDataPromise('/web/getWebsiteFooterCategory', {
  97. method: 'GET',
  98. query: {
  99. },
  100. });
  101. bottomMenu.value = mkdata.data;
  102. }
  103. getModelData4();
  104. //5.获得底部基本信息
  105. const bottomBase = ref({})
  106. const webSiteName = ref("")
  107. async function getModelData5() {
  108. const mkdata = await requestDataPromise('/web/getWebsiteFootInfo', {
  109. method: 'GET',
  110. query: {
  111. },
  112. });
  113. bottomBase.value = mkdata.data.website_foot;
  114. webSiteName.value = mkdata.data.website_head.title;
  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>