<template>
  <CommonListPage
    :title="'重要相关文物古迹'"
    :prevPage="{ title: '文化传承' }"
    :dropDownNames="[]"
    :showSearch="true"
    :pageSize="8"
    :load="loadData"
    :detailsParams="{ modelId: 17 }"
  />
</template>

<script setup lang="ts">
import CommonContent, { GetContentListParams } from '@/api/CommonContent';

async function loadData(
  page: number, 
  pageSize: number,
  selectedTag: number,
  searchText: string,
  dropDownValues: number[]
) {

  const res = await CommonContent.getContentList(new GetContentListParams()
    .setKeywords(searchText)
    .setModelId(17)
    .setMainBodyColumnId(286)
  , page, pageSize);

  return { 
    page: page,
    total: res.total,
    data: res.list.map((item, index) => {
      return {
        id: item.id,
        title: item.title,
        desc: item.desc,
        image: item.thumbnail || item.image,
      };
    }),
  }
}
</script>

<style>
</style>

