<template>
  <CommonListPage 
    title="文化景区、景点"
    itemType="article-common"
    showTotal
    detailsPage="/pages/article/details"
    :dropDownNames="dropdownNames"
    :detailsParams="detailsParams"
    :tabs="[
      {
        id: 353,
        text: '文化景区',
      },
      {
        id: 273,
        text: '文化景点',
      },
    ]"
    :load="loadData" 
  />
</template>

<script setup lang="ts">
import { onMounted, ref } from 'vue';
import { GetContentListParams } from '@/api/CommonContent';
import ScenicSpotContent from '@/api/fusion/ScenicSpotContent';
import CommonListPage, { type DropDownNames } from '@/pages/article/common/CommonListPage.vue';

const dropdownNames = ref<DropDownNames[]>([]);

async function loadData(
  page: number, 
  pageSize: number,
  searchText: string,
  dropDownValues: number[],
  tabId: number,
) {
  detailsParams.value.mainBodyColumnId = tabId;
  const res = (await ScenicSpotContent.getContentList(new GetContentListParams()
    .setMainBodyColumnId(tabId)
    .setKeywords(searchText)
    .setSelfValues({

    })
  , page, pageSize));
  return res;
}

const detailsParams = ref({
  mainBodyColumnId: 0,
  modelId: 16,
});

onMounted(async () => {
  
})
</script>
