<template>
   <CommonListPage
    :title="'文化文化景区'"
    :prevPage="{ title: '文旅融合' }"
    :dropDownNames="[]"
    :showSearch="true"
    :pageSize="8"
    :load="loadData"
  />
</template>

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

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

  const res = await ScenicSpotContent.getContentList(new GetContentListParams()
    .setKeywords(searchText)
    .setMainBodyColumnId(260)
  , 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,
        addItems: [
        ],
      };
    }),
  }
}

</script>

<style>
</style>
