outside.vue 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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. .setMainBodyColumnId(262)
  31. , page, pageSize);
  32. return {
  33. page: page,
  34. total: res.total,
  35. data: res.list.map((item, index) => {
  36. return {
  37. id: item.id,
  38. title: item.title,
  39. desc: item.desc,
  40. image: item.image,
  41. addItems: [
  42. ],
  43. };
  44. }),
  45. }
  46. }
  47. </script>
  48. <style>
  49. </style>