hk-macao-and-taiwan.vue 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <template>
  2. <!-- 传播交流 - 台港澳地区文化交流 -->
  3. <CommonListPage
  4. :title="'港澳台地区文化交流'"
  5. :prevPage="{ title: '传播交流' }"
  6. :dropDownNames="[]"
  7. :pageSize="8"
  8. :load="loadData"
  9. :loadDetail="loadDetail"
  10. />
  11. </template>
  12. <script setup lang="ts">
  13. import { GetContentListParams } from '@/api/CommonContent';
  14. import CommunicateContent from '@/api/communicate/CommunicateContent';
  15. async function loadDetail(id: number, item: any) {
  16. const res = await CommunicateContent.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 CommunicateContent.getContentList(new GetContentListParams().setSelfValues({
  30. mainBodyColumnId: 261
  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>