foot.vue 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  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> {{ webSiteUrl }} 版权所有。</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. if(mkdata.code == 200){
  65. bottomLink.value = mkdata.data;
  66. }else{
  67. console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
  68. console.log("错误位置:获取友情链接图片")
  69. console.log("后端错误反馈:",mkdata.message)
  70. console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
  71. }
  72. }
  73. getModelData1();
  74. //2.获得友情链接文字
  75. const bottomText = ref([])
  76. async function getModelData2() {
  77. const mkdata = await requestDataPromise('/web/selectWebsiteLinks', {
  78. method: 'GET',
  79. query: {
  80. 'type':2,
  81. 'num':8,
  82. },
  83. });
  84. if(mkdata.code == 200){
  85. bottomText.value = mkdata.data;
  86. }else{
  87. console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
  88. console.log("错误位置:获取友情链接文字")
  89. console.log("后端错误反馈:",mkdata.message)
  90. console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
  91. }
  92. }
  93. getModelData2();
  94. //3.获得底部图片
  95. const bottomphoto = ref([])
  96. async function getModelData3() {
  97. const mkdata = await requestDataPromise('/web/selectWebsiteLinks', {
  98. method: 'GET',
  99. query: {
  100. 'type':3,
  101. 'num':4,
  102. },
  103. });
  104. if(mkdata.code == 200){
  105. bottomphoto.value = mkdata.data;
  106. }else{
  107. console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
  108. console.log("错误位置:获取底部图片")
  109. console.log("后端错误反馈:",mkdata.message)
  110. console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
  111. }
  112. }
  113. getModelData3();
  114. //4.获得底部导航
  115. const bottomMenu = ref([])
  116. async function getModelData4() {
  117. const mkdata = await requestDataPromise('/web/getWebsiteFooterCategory', {
  118. method: 'GET',
  119. query: {
  120. },
  121. });
  122. if(mkdata.code == 200){
  123. bottomMenu.value = mkdata.data;
  124. }else{
  125. console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
  126. console.log("错误位置:获取底部导航")
  127. console.log("后端错误反馈:",mkdata.message)
  128. console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
  129. }
  130. }
  131. getModelData4();
  132. //5.获得底部基本信息
  133. const bottomBase = ref({})
  134. const webSiteName = ref("")
  135. const webSiteUrl = ref("")
  136. async function getModelData5() {
  137. const mkdata = await requestDataPromise('/web/getWebsiteFootInfo', {
  138. method: 'GET',
  139. query: {
  140. },
  141. });
  142. if(mkdata.code == 200){
  143. bottomBase.value = mkdata.data.website_foot;
  144. webSiteName.value = mkdata.data.website_head.title;
  145. //获得最后一个域名
  146. webSiteUrl.value = mkdata.data.website_head.website_url[mkdata.data.website_head.website_url.length - 1];
  147. }else{
  148. console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
  149. console.log("错误位置:获取底部基本信息")
  150. console.log("后端错误反馈:",mkdata.message)
  151. console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
  152. }
  153. }
  154. getModelData5();
  155. //6.获取当前域名
  156. // const currentDomain = ref('')
  157. // const currentDomainUrl = ref('')
  158. // const getDomain = () => {
  159. // if (process.client) {
  160. // const url = new URL(window.location.href)
  161. // currentDomainUrl.value = url.hostname // 获取域名
  162. // currentDomain.value = url.origin //协议和域名
  163. // }
  164. // }
  165. // getDomain();
  166. //获得底部基本信息 end---------------------------------------->
  167. </script>
  168. <style lang="less" scoped>
  169. @import '@/assets/css/foot.less';
  170. </style>