|
@@ -2,7 +2,6 @@
|
|
|
<!-- 文化传承 - 非遗活动 -->
|
|
|
<CommonListPage
|
|
|
:title="'非遗活动'"
|
|
|
- :prevPage="{ title: '保护传承' }"
|
|
|
:dropDownNames="[]"
|
|
|
:showSearch="true"
|
|
|
:pageSize="8"
|
|
@@ -18,21 +17,27 @@ import { ref } from 'vue';
|
|
|
import { GetContentListParams } from '@/api/CommonContent';
|
|
|
import CustomContent from '@/api/introduction/CustomContent';
|
|
|
|
|
|
+let _selectedTag = 0;
|
|
|
+
|
|
|
async function loadDetail(id: number, item: any) {
|
|
|
- return await CustomContent.getContentDetail(id);
|
|
|
+ return await CustomContent.getContentDetail(
|
|
|
+ id,
|
|
|
+ tagsData.value.find((item) => item.id == _selectedTag)?.modelId || 0
|
|
|
+ );
|
|
|
}
|
|
|
async function loadData(
|
|
|
page: number,
|
|
|
pageSize: number,
|
|
|
selectedTag: number,
|
|
|
searchText: string,
|
|
|
- dropDownValues: number[]
|
|
|
+ dropDownValues: number[],
|
|
|
) {
|
|
|
-
|
|
|
- const res = await CustomContent.getContentList(new GetContentListParams().setSelfValues({
|
|
|
- mainBodyColumnId: selectedTag,
|
|
|
- keywords: searchText,
|
|
|
- }), page, pageSize);
|
|
|
+ _selectedTag = selectedTag;
|
|
|
+ const res = await CustomContent.getContentList(new GetContentListParams()
|
|
|
+ .setModelId(tagsData.value.find((item) => item.id == selectedTag)?.modelId || 0)
|
|
|
+ .setMainBodyColumnId(selectedTag > 0 ? selectedTag : 0)
|
|
|
+ .setKeywords(searchText)
|
|
|
+ , page, pageSize);
|
|
|
|
|
|
return {
|
|
|
page: page,
|
|
@@ -43,6 +48,7 @@ async function loadData(
|
|
|
title: item.title,
|
|
|
desc: item.desc,
|
|
|
image: item.image,
|
|
|
+ addItems: [],
|
|
|
};
|
|
|
}),
|
|
|
}
|
|
@@ -50,11 +56,10 @@ async function loadData(
|
|
|
|
|
|
//子分类
|
|
|
const tagsData = ref([
|
|
|
- { id: 290, name: '全部' },
|
|
|
- { id: 291, name: '闽南音乐' },
|
|
|
- { id: 187, name: '讲古' },
|
|
|
- { id: 292, name: '方言' },
|
|
|
- { id: 293, name: '民俗习俗' },
|
|
|
+ { modelId: 18, id: 290, name: '全部' },
|
|
|
+ { modelId: 16, id: 187, name: '讲古' },
|
|
|
+ { modelId: 5, id: -1, name: '方言' },
|
|
|
+ { modelId: 4, id: -2, name: '民俗习俗' },
|
|
|
]);
|
|
|
</script>
|
|
|
|