<template>
   <CommonListPage
    :title="'闽南文化生态保护区(厦门市)基本情况'"
    :prevPage="{ title: '保护区概况' }"
    :dropDownNames="[]"
    :pageSize="8"
    :rowCount="1"
    :load="loadData"
  />
</template>

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

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

  const res = await NewsIndexContent.getContentList(
    new GetContentListParams()
      .setKeywords(searchText)
      .setModelId(17)
      .setMainBodyColumnId([ 256, 283, 284, ])
    , 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>

