foot.vue 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375
  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" target="_blank" :title="item.title">
  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" target="_blank" :title="item.title">{{ 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}` }" target="_blank" v-if="item.type == 1" :title="item.name">
  22. {{ item.name }}
  23. </NuxtLink>
  24. <NuxtLink :to="{ path: `/speciaArticle/${item.id}` }" target="_blank" v-if="item.type == 0" :title="item.name">
  25. {{ item.name }}
  26. </NuxtLink>
  27. </span>
  28. </div>
  29. <div class="foot_text_box">
  30. <!-- <p>{{ bottomBase.statistics_onetext }} <a :href="'http://' + bottomBase.statistics_twourl">中农兴业</a> {{ bottomBase.statistics_twotext }}</p> -->
  31. <p>{{ bottomBase.statistics_onetext }} <a :href="bottomBase.record_number_url" target="_blank" :title="中农兴业">中农兴业</a> {{ bottomBase.statistics_twotext }}</p>
  32. <p>{{ bottomBase.organizer }} <a :href="currentDomain" target="_blank" :title="三农资讯网">三农资讯网</a> {{ currentDomainUrl }} 版权所有。</p>
  33. <!-- <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> -->
  34. <p><a :href="bottomBase.record_number_url" target="_blank" title="ICP备案号">{{ bottomBase.record_number }}</a> &nbsp;&nbsp; <img :src="bottomBase.icp_number_img"><a :href="bottomBase.icp_number_url" target="_blank" title="京公网安备案号">{{ bottomBase.icp_number }}</a> </p>
  35. <p>{{ bottomBase.email }}</p>
  36. <p>{{ bottomBase.company_address }}</p>
  37. <p>{{ bottomBase.contact_number }}</p>
  38. </div>
  39. <div class="foot_logo_out" >
  40. <a :href="'http://' + bottomBase.company_url" :title="bottomBase.company_name" target="_blank">
  41. <img :src="bottomBase.project_logo" class="floatLogoLeft" :alt="bottomBase.company_name">
  42. </a>
  43. <a :href="'http://' + bottomBase.project_url" :title="bottomBase.project_name" target="_blank">
  44. <img :src="bottomBase.company_logo" class="floatLogoRight" :alt="bottomBase.project_name">
  45. </a>
  46. </div>
  47. <div class="foot_last_img_box">
  48. <a :href="item.url" v-for="(item, index) in bottomphoto" target="_blank" :title="item.title">
  49. <img :src="item.logo_url" :alt="item.title">
  50. </a>
  51. </div>
  52. </footer>
  53. </template>
  54. <script setup>
  55. //获得底部基本信息 start---------------------------------------->
  56. //1.获得友情链接图片
  57. const bottomLink = ref([])
  58. async function getModelData1() {
  59. const { data: mkdata, error: mkdataError } = requestData('/web/selectWebsiteLinks', {
  60. method: 'GET',
  61. query: {
  62. 'type':1,
  63. 'num':12,
  64. },
  65. });
  66. if (mkdataError.value) {
  67. //console.error('模块1数据上部分请求失败!', mkdataError.value);
  68. } else {
  69. if (mkdata.value) {
  70. bottomLink.value = mkdata.value.data;
  71. }
  72. }
  73. }
  74. getModelData1();
  75. //2.获得友情链接文字
  76. const bottomText = ref([])
  77. async function getModelData2() {
  78. const { data: mkdata, error: mkdataError } = requestData('/web/selectWebsiteLinks', {
  79. method: 'GET',
  80. query: {
  81. 'type':2,
  82. 'num':8,
  83. },
  84. });
  85. if (mkdataError.value) {
  86. //console.error('模块1数据上部分请求失败!', mkdataError.value);
  87. } else {
  88. if (mkdata.value) {
  89. bottomText.value = mkdata.value.data;
  90. }
  91. }
  92. }
  93. getModelData2();
  94. //3.获得底部图片
  95. const bottomphoto = ref([])
  96. async function getModelData3() {
  97. const { data: mkdata, error: mkdataError } = requestData('/web/selectWebsiteLinks', {
  98. method: 'GET',
  99. query: {
  100. 'type':3,
  101. 'num':4,
  102. },
  103. });
  104. if (mkdataError.value) {
  105. //console.error('模块1数据上部分请求失败!', mkdataError.value);
  106. } else {
  107. if (mkdata.value) {
  108. bottomphoto.value = mkdata.value.data;
  109. }
  110. }
  111. }
  112. getModelData3();
  113. //4.获得底部导航
  114. const bottomMenu = ref([])
  115. async function getModelData4() {
  116. const { data: mkdata, error: mkdataError } = requestData('/web/getWebsiteFooterCategory', {
  117. method: 'GET',
  118. query: {
  119. },
  120. });
  121. if (mkdataError.value) {
  122. //console.error('模块1数据上部分请求失败!', mkdataError.value);
  123. } else {
  124. if (mkdata.value) {
  125. bottomMenu.value = mkdata.value.data;
  126. }
  127. }
  128. }
  129. getModelData4();
  130. //5.获得底部基本信息
  131. const bottomBase = ref({})
  132. async function getModelData5() {
  133. const { data: mkdata, error: mkdataError } = requestData('/web/getWebsiteFootInfo', {
  134. method: 'GET',
  135. query: {
  136. },
  137. });
  138. if (mkdataError.value) {
  139. //console.error('模块1数据上部分请求失败!', mkdataError.value);
  140. } else {
  141. if (mkdata.value) {
  142. bottomBase.value = mkdata.value.data.website_foot;
  143. }
  144. }
  145. }
  146. getModelData5();
  147. //6.获取当前域名
  148. const currentDomain = ref('')
  149. const currentDomainUrl = ref('')
  150. const getDomain = () => {
  151. if (process.client) {
  152. const url = new URL(window.location.href)
  153. currentDomainUrl.value = url.hostname // 获取域名
  154. currentDomain.value = url.origin //协议和域名
  155. }
  156. }
  157. getDomain();
  158. //获得底部基本信息 end---------------------------------------->
  159. </script>
  160. <style lang="less" scoped>
  161. .index_foot {
  162. box-sizing: border-box;
  163. width: 1200px;
  164. margin: 0 auto;
  165. }
  166. .index_foot_name_box {
  167. margin: 40px auto 0px;
  168. text-align: center;
  169. font-size: 0px;
  170. }
  171. .index_foot_name {
  172. display: inline-block;
  173. height: 67px;
  174. line-height: 67px;
  175. color: #f2f9f4;
  176. font-size: 51px;
  177. font-weight: bold;
  178. overflow: hidden;
  179. }
  180. .index_foot_name:nth-of-type(even) {
  181. color: #333;
  182. font-size: 32px;
  183. }
  184. .foot_img_box {
  185. overflow: hidden;
  186. display: block;
  187. // margin: 40px auto 0;
  188. width: 100%;
  189. display: flex;
  190. justify-content: space-between;
  191. flex-wrap: wrap;
  192. }
  193. .foot_img_box>* {
  194. margin-top: 20px;
  195. float: left;
  196. width: 170px;
  197. height: 57px;
  198. overflow: hidden;
  199. /* box-sizing: border-box; */
  200. border: solid 1px #D7EDD4;
  201. }
  202. .foot_img_box>* * {
  203. display: block;
  204. width: 100%;
  205. height: 100%;
  206. }
  207. .foot_img_box>*:nth-of-type(7n) {
  208. margin-right: 0px;
  209. }
  210. .foot_frind_box {
  211. display: block;
  212. margin: 30px auto;
  213. overflow: hidden;
  214. display: flex;
  215. width: 100%;
  216. }
  217. .foot_frind_box span {
  218. word-break: keep-all;
  219. white-space: nowrap;
  220. line-height: 22px;
  221. font-size: 16px;
  222. color: #333;
  223. font-weight: bold;
  224. }
  225. .foot_frind_box div {
  226. width: 100%;
  227. overflow: hidden;
  228. }
  229. .foot_frind_box div * {
  230. float: left;
  231. line-height: 22px;
  232. height: 22px;
  233. color: #333;
  234. font-size: 16px;
  235. margin: 0 30px;
  236. }
  237. .call_us_box {
  238. display: block;
  239. width: 100%;
  240. margin: 30px auto 0;
  241. overflow: hidden;
  242. text-align: center;
  243. font-size: 0px;
  244. background: #a01c0e;
  245. a {
  246. color: #fff;
  247. }
  248. }
  249. .inner {
  250. width: 1200px;
  251. margin: 0 auto;
  252. }
  253. .inner>* {
  254. height: 12px;
  255. line-height: 12px;
  256. color: #fff;
  257. font-size: 14px;
  258. display: inline-block;
  259. box-sizing: border-box;
  260. padding: 0 19px;
  261. font-weight: bold;
  262. border-left: solid 1px #7e1c11;
  263. margin: 18px 0;
  264. }
  265. .inner>*:nth-of-type(1) {
  266. border-left: 0px;
  267. }
  268. .foot_text_box {
  269. margin: 20px auto 0px;
  270. text-align: center;
  271. color: #333;
  272. font-size: 14px;
  273. line-height: 25px;
  274. p {
  275. a {
  276. color: #333;
  277. font-size: 14px;
  278. }
  279. .webSitecolor {
  280. color: #a01c0e;
  281. }
  282. }
  283. }
  284. .top_content {
  285. padding: 0 170px;
  286. }
  287. .webSitecolor {
  288. color: #a01c0e;
  289. }
  290. .foot_text_box_green {
  291. color: #a01c0e;
  292. }
  293. .foot_text_box img {
  294. display: inline-block;
  295. height: 20px;
  296. vertical-align: middle;
  297. }
  298. .foot_logo_out {
  299. position: relative;
  300. margin: 0px auto;
  301. width: 100%;
  302. height: 0px;
  303. }
  304. .foot_logo_out * {
  305. width: 120px;
  306. display: block;
  307. }
  308. .foot_logo_out>* {
  309. position: absolute;
  310. top: -100px;
  311. }
  312. .foot_logo_out>*:nth-of-type(1) {
  313. left: 0px;
  314. }
  315. .foot_logo_out>*:nth-of-type(2) {
  316. right: 0px;
  317. }
  318. .foot_last_img_box {
  319. margin: 20px auto 10px;
  320. text-align: center;
  321. overflow: hidden;
  322. width: 100%;
  323. font-size: 0px;
  324. padding-bottom: 40px;
  325. }
  326. .foot_last_img_box>* {
  327. height: 50px;
  328. width: 150px;
  329. margin: 0px 12px;
  330. display: inline-block;
  331. overflow: hidden;
  332. }
  333. .foot_last_img_box>* * {
  334. display: block;
  335. height: 100%;
  336. width: 100%;
  337. overflow: hidden;
  338. }
  339. </style>