foot1.vue 4.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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. const bottomText = ref([])
  41. const bottomphoto = ref([])
  42. const bottomMenu = ref([])
  43. async function getModelDataAll() {
  44. const mkdata = await requestDataPromise('/web/getWebsiteFootAll', {
  45. method: 'GET',
  46. query: {
  47. 'link_textnum':8,
  48. 'link_imgnum':12,
  49. 'link_footnum':4
  50. },
  51. });
  52. if(mkdata.code == 200){
  53. bottomLink.value = mkdata.data.link_img;
  54. bottomText.value = mkdata.data.link_text;
  55. bottomphoto.value = mkdata.data.link_foot;
  56. bottomMenu.value = mkdata.data.foot_cate;
  57. }else{
  58. console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
  59. console.log("错误位置:获取友情链接图片")
  60. console.log("后端错误反馈:",mkdata.message)
  61. console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
  62. }
  63. }
  64. getModelDataAll();
  65. //2.获得底部基本信息
  66. const bottomBase = ref({})
  67. const webSiteName = ref("")
  68. const webSiteUrl = ref("")
  69. async function getModelData5() {
  70. const mkdata = await requestDataPromise('/web/getWebsiteFootInfo', {
  71. method: 'GET',
  72. query: {
  73. },
  74. });
  75. if(mkdata.code == 200){
  76. bottomBase.value = mkdata.data.website_foot;
  77. webSiteName.value = mkdata.data.website_head.title;
  78. //获得最后一个域名
  79. webSiteUrl.value = mkdata.data.website_head.website_url[mkdata.data.website_head.website_url.length - 1];
  80. }else{
  81. console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
  82. console.log("错误位置:获取底部基本信息")
  83. console.log("后端错误反馈:",mkdata.message)
  84. console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
  85. }
  86. }
  87. getModelData5();
  88. //获得底部基本信息 end---------------------------------------->
  89. </script>
  90. <style lang="less" scoped>
  91. @import '@/assets/css/foot.less';
  92. </style>