foot1.vue 5.4 KB

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