products.vue 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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 ProductContent from '@/api/fusion/ProductContent';
  15. async function loadDetail(id: number, item: any) {
  16. const res = await ProductContent.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 ProductContent.getContentList(new GetContentListParams(), page, pageSize);
  30. return {
  31. page: page,
  32. total: res.total,
  33. data: res.list.map((item, index) => {
  34. return {
  35. id: item.id,
  36. title: item.title,
  37. desc: item.desc,
  38. image: item.image,
  39. addItems: [
  40. ],
  41. };
  42. }),
  43. }
  44. }
  45. </script>
  46. <style>
  47. </style>