fujian-and-taiwan.vue 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <template>
  2. <CommonListPage
  3. :title="'闽台文化交流'"
  4. :prevPage="{ title: '传播交流' }"
  5. :dropDownNames="[]"
  6. :pageSize="8"
  7. :load="loadData"
  8. :loadDetail="loadDetail"
  9. />
  10. </template>
  11. <script setup lang="ts">
  12. import { GetContentListParams } from '@/api/CommonContent';
  13. import CommunicateContent from '@/api/communicate/CommunicateContent';
  14. async function loadDetail(id: number, item: any) {
  15. const res = await CommunicateContent.getContentDetail(id);
  16. res.content = res.content || res.intro as string;
  17. res.addItems = [
  18. ];
  19. return res;
  20. }
  21. async function loadData(
  22. page: number,
  23. pageSize: number,
  24. selectedTag: number,
  25. searchText: string,
  26. dropDownValues: number[]
  27. ) {
  28. const res = await CommunicateContent.getContentList(new GetContentListParams()
  29. .setKeywords(searchText)
  30. .setSelfValues({
  31. mainBodyColumnId: 260
  32. })
  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.image,
  43. addItems: [
  44. ],
  45. };
  46. }),
  47. }
  48. }
  49. </script>
  50. <style>
  51. </style>