foot1.vue 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  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="'http://' + bottomBase.statistics_twourl">中农兴业</a> {{ bottomBase.statistics_twotext }}</p> -->
  15. <p>{{ bottomBase.statistics_onetext }} <a :href="bottomBase.record_number_url" title="中农兴业">中农兴业</a> {{ bottomBase.statistics_twotext }}</p>
  16. <p>{{ bottomBase.organizer }} <a :href="currentDomain" :title="webSiteName">{{ webSiteName }}</a> {{ webSiteUrl }} 版权所有。</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" 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>
  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" v-if="bottomBase">
  24. <a :href="'http://' + bottomBase.company_url" :title="bottomBase.company_name">
  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">
  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">
  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 mkdata = await requestDataPromise('/web/selectWebsiteLinks', {
  44. // method: 'GET',
  45. // query: {
  46. // 'type':1,
  47. // 'num':7,
  48. // },
  49. // });
  50. // bottomLink.value = mkdata.data;
  51. // }
  52. // getModelData1();
  53. // //2.获得友情链接文字
  54. // const bottomText = ref([])
  55. // async function getModelData2() {
  56. // const mkdata = await requestDataPromise('/web/selectWebsiteLinks', {
  57. // method: 'GET',
  58. // query: {
  59. // 'type':2,
  60. // 'num':8,
  61. // },
  62. // });
  63. // bottomText.value = mkdata.data;
  64. // }
  65. // getModelData2();
  66. //3.获得底部图片
  67. const bottomphoto = ref([])
  68. async function getModelData3() {
  69. const mkdata = await requestDataPromise('/web/selectWebsiteLinks', {
  70. method: 'GET',
  71. query: {
  72. 'type':3,
  73. 'num':4,
  74. },
  75. });
  76. if(mkdata.code == 200){
  77. bottomphoto.value = mkdata.data;
  78. }else{
  79. console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
  80. console.log("错误位置:获取底部图片")
  81. console.log("后端错误反馈:",mkdata.message)
  82. console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
  83. }
  84. }
  85. getModelData3();
  86. //4.获得底部导航
  87. const bottomMenu = ref([])
  88. async function getModelData4() {
  89. const mkdata = await requestDataPromise('/web/getWebsiteFooterCategory', {
  90. method: 'GET',
  91. query: {
  92. },
  93. });
  94. if(mkdata.code == 200){
  95. bottomMenu.value = mkdata.data;
  96. }else{
  97. console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
  98. console.log("错误位置:获取底部导航")
  99. console.log("后端错误反馈:",mkdata.message)
  100. console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
  101. }
  102. }
  103. getModelData4();
  104. //5.获得底部基本信息
  105. const bottomBase = ref({})
  106. const webSiteName = ref("")
  107. const webSiteUrl = ref("")
  108. async function getModelData5() {
  109. const mkdata = await requestDataPromise('/web/getWebsiteFootInfo', {
  110. method: 'GET',
  111. query: {
  112. },
  113. });
  114. if(mkdata.code == 200){
  115. bottomBase.value = mkdata.data.website_foot;
  116. webSiteName.value = mkdata.data.website_head.title;
  117. //获得最后一个域名
  118. webSiteUrl.value = mkdata.data.website_head.website_url[mkdata.data.website_head.website_url.length - 1];
  119. }else{
  120. console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
  121. console.log("错误位置:获取底部基本信息")
  122. console.log("后端错误反馈:",mkdata.message)
  123. console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
  124. }
  125. }
  126. getModelData5();
  127. //6.获取当前域名
  128. // const currentDomain = ref('')
  129. // const currentDomainUrl = ref('')
  130. // const getDomain = () => {
  131. // if (process.client) {
  132. // const url = new URL(window.location.href)
  133. // currentDomainUrl.value = url.hostname // 获取域名
  134. // currentDomain.value = url.origin //协议和域名
  135. // }
  136. // }
  137. // getDomain();
  138. //获得底部基本信息 end---------------------------------------->
  139. </script>
  140. <style lang="less" scoped>
  141. @import '@/assets/css/foot.less';
  142. </style>