12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- <template>
- <CommonListPage
- title="闽南民俗"
- itemType="image-large-2"
- :detailsPage="[
- '/pages/inhert/intangible/details',
- '/pages/article/details',
- ]"
- showTotal
- :dropDownNames="dropdownNames"
- :load="loadData"
-
- :detailsParams="{
- modelId: 4,
- }"
- />
- <!-- :tabs="[
- { id: 0, name: '非遗民俗' },
- { id: 1, name: '民俗资讯' },
- ]" -->
- </template>
- <script setup lang="ts">
- import { ref } from 'vue';
- import CommonListPage, { type DropDownNames } from '@/pages/article/common/CommonListPage.vue';
- import CommonContent, { GetContentListParams } from '@/api/CommonContent';
- import ProjectsContent from '@/api/inheritor/ProjectsContent';
- const dropdownNames = ref<DropDownNames[]>([]);
- async function loadData(
- page: number,
- pageSize: number,
- searchText: string,
- dropDownValues: number[],
- tabSelect: number,
- ) {
- let res;
- switch (tabSelect) {
- /* case 0:
- res = await ProjectsContent.getContentList(new GetContentListParams()
- .setKeywords('民俗 ' + searchText)
- , page, pageSize);
- res.list.forEach((item) => {
- item.bottomTags = [
- item.levelText,
- item.ichTypeText,
- item.batchText,
- item.regionText,
- ]
- })
- break;
- case 1: */
- default:
- res = await CommonContent.getContentList(new GetContentListParams()
- .setKeywords(searchText)
- .setModelId(4)
- .setMainBodyColumnId([ 245,248 ])
- , page, pageSize);
- break;
- }
- return { list: res.list, total: res.total }
- }
- </script>
|