point.vue 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <template>
  2. <CommonListPage
  3. :title="'非遗研学点'"
  4. :prevPage="{ title: '文旅融合' }"
  5. :dropDownNames="[]"
  6. :pageSize="8"
  7. :rowType="4"
  8. :load="loadData"
  9. :loadDetail="loadDetail"
  10. />
  11. </template>
  12. <script setup lang="ts">
  13. import CommonContent, { GetContentListParams } from '@/api/CommonContent';
  14. import DiscussContent from '@/api/research/DiscussContent';
  15. async function loadDetail(id: number, item: any) {
  16. const res = await DiscussContent.getContentDetail(id);
  17. res.content = res.content || res.intro as string;
  18. res.addItems = [
  19. ];
  20. return res;
  21. }
  22. async function loadData(
  23. page: number,
  24. pageSize: number,
  25. selectedTag: number,
  26. searchText: string,
  27. dropDownValues: number[]
  28. ) {
  29. const res = await CommonContent.getContentList(new GetContentListParams()
  30. .setModelId(17)
  31. .setMainBodyColumnId(319)
  32. .setKeywords(searchText)
  33. , page, pageSize);
  34. return {
  35. page: page,
  36. total: res.total,
  37. data: res.list.map((item, index) => {
  38. return {
  39. id: item.id,
  40. title: item.title,
  41. desc: item.desc,
  42. image: item.thumbnail || item.image,
  43. addItems: [
  44. { name: '联系人', text: item.contact as string, span: 12 },
  45. { name: '联系电话', text: item.mobile as string, span: 12 },
  46. ],
  47. };
  48. }),
  49. }
  50. }
  51. </script>
  52. <style>
  53. </style>