Link2.vue 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. <script setup lang="ts">
  2. import { formatTime } from '@/utils/formatTime'
  3. import { getNews, type NewsData } from '@/api/home'
  4. import { queryFieldMethod } from '@/utils/queryFieldMethod'
  5. import { ref } from 'vue'
  6. import { useRouter } from 'vue-router'
  7. const router = useRouter();
  8. const financingLoans = ref<NewsData[]>([])
  9. const knowMore = (dickMapKey:string|undefined,dickMapValue:string|undefined)=>{
  10. router.push({
  11. path:'/creditDynamicsDetail',
  12. query:{
  13. dickMapKey,
  14. dickMapValue
  15. }
  16. });
  17. }
  18. const toDetail = (id:number|undefined)=>{
  19. if(!id){
  20. return
  21. }
  22. router.push({
  23. path:'/newsDetail',
  24. query:{
  25. id
  26. }
  27. })
  28. }
  29. const toOrtherLink = (index:number)=>{
  30. if(index == 1){
  31. window.open("https://credit.fgw.hunan.gov.cn/xyd/feature")
  32. }else if(index == 2){
  33. window.open("https://smecmd.digital.hnchasing.com/main/cms/static/html/loan.html")
  34. }else if(index == 3){
  35. window.open("https://credit.fgw.hunan.gov.cn/xyd/financeMarketDetail?id=414&isShow=ck")
  36. }else if(index == 4){
  37. window.open('https://credit.fgw.hunan.gov.cn/xyd/financeMarketDetail?id=26&isShow=ck')
  38. }else if(index == 5){
  39. window.open('http://www.hntpe.com/onlineweb/blRisk/index?menuId=101086');
  40. }
  41. }
  42. const init =async ()=>{
  43. const res1 = await getNews(queryFieldMethod('special_column','financial_need'))
  44. if(res1.code == 200){
  45. financingLoans.value = res1.data.slice(0,5);
  46. }
  47. const res2 = await getNews(queryFieldMethod('special_column','financing_loans'))
  48. if(res2.code == 200){
  49. financingLoans.value = res2.data.slice(0,5);
  50. }
  51. }
  52. init()
  53. </script>
  54. <template>
  55. <div>
  56. <div class="w-1112px bg-white ml-a mr-a text-16px mt-12px mb-10px line-height-44px border-dashed border-#e5e5e5 border-b-5px">
  57. <div class="w-240px border-solid border-#00306e border-b-5px relative">
  58. <img class="w-21px h-21px m-3px " src="/src/assets/img/信用小图标.png" />
  59. <span class="color-#003aac text-16px">园区企业融资贷款</span>
  60. <span class="absolute right--850px top-0px cursor-pointer text-#959595" @click="knowMore('financing_loans','园区企业融资贷款')">查看更多 ></span>
  61. </div>
  62. <div v-for="(item,index) in financingLoans" :key="index">
  63. <div class="flex justify-between">
  64. <div class="ml-20px cursor-pointer" @click="toDetail(item.id)">{{item.title}}</div>
  65. <div class="color-gray mr-20px text-14px">
  66. <span>数据来源:{{item.dataSource}}</span>
  67. <span>|</span>
  68. <span>{{formatTime(item.date)}}</span>
  69. </div>
  70. </div>
  71. <div class="h-1px bg-gray"></div>
  72. </div>
  73. </div>
  74. <div>
  75. <div class="w-1112px ml-auto mr-auto flex flex-wrap justify-between bg-white bg-opacity-22">
  76. <div class="w-174px h-116px mr-10px relative cursor-pointer" @click="toOrtherLink(1)">
  77. <img class="w-100% h-100%" src="/static/bg3.jpg" />
  78. <div class="absolute bottom-0 text-center w-100% h-22px text-white text-14px pt-4px pb-4px bg-#00306e bg-opacity-72">制造业中长期贷款</div>
  79. </div>
  80. <div class="w-174px h-116px mr-10px relative cursor-pointer" @click="toOrtherLink(2)">
  81. <img class="w-100% h-100%" src="/static/bg4.jpg" />
  82. <div class="absolute bottom-0 text-center w-100% h-22px text-white text-14px pt-4px pb-4px bg-#00306e bg-opacity-72">潇湘财银贷</div>
  83. </div>
  84. <div class="w-174px h-116px mr-10px relative cursor-pointer" @click="toOrtherLink(3)">
  85. <img class="w-100% h-100%" src="/static/bg5.jpg" />
  86. <div class="absolute bottom-0 text-center w-100% h-22px text-white text-14px pt-4px pb-4px bg-#00306e bg-opacity-72">农业银行流水贷</div>
  87. </div>
  88. <div class="w-174px h-116px mr-10px relative cursor-pointer" @click="toOrtherLink(4)">
  89. <img class="w-100% h-100%" src="/static/bg6.jpg" />
  90. <div class="absolute bottom-0 text-center w-100% h-22px text-white text-14px pt-4px pb-4px bg-#00306e bg-opacity-72">湖南银行流水贷</div>
  91. </div>
  92. <div class="w-174px h-116px relative cursor-pointer" @click="toOrtherLink(5)">
  93. <img class="w-100% h-100%" src="/static/bg7.jpg" />
  94. <div class="absolute bottom-0 text-center w-100% h-22px text-white text-14px pt-4px pb-4px bg-#00306e bg-opacity-72">科技贷</div>
  95. </div>
  96. </div>
  97. </div>
  98. </div>
  99. </template>
  100. <style scoped>
  101. </style>