|
@@ -33,7 +33,10 @@ async function loadData(
|
|
|
tabSelect: number,
|
|
tabSelect: number,
|
|
|
) {
|
|
) {
|
|
|
|
|
|
|
|
- const list = page == 1 ? await VillageApi.getVallageList(tabSelect) : [];
|
|
|
|
|
|
|
+ const res = await CommonContent.getCategoryList(151);
|
|
|
|
|
+ const it2 = res.find(p => p.title == '省级');
|
|
|
|
|
+ if (it2) it2.title = '传统村落';
|
|
|
|
|
+ const list = page == 1 ? await VillageApi.getVallageList(it2?.id) : [];
|
|
|
list.filter((p) => !searchText || p.title.includes(searchText)).forEach((p) => {
|
|
list.filter((p) => !searchText || p.title.includes(searchText)).forEach((p) => {
|
|
|
p.desc = p.desc;
|
|
p.desc = p.desc;
|
|
|
p.badge = p.district;
|
|
p.badge = p.district;
|
|
@@ -54,12 +57,7 @@ function goDetails(item: any) {
|
|
|
const tabs = ref<{id: number, text: string}[]>();
|
|
const tabs = ref<{id: number, text: string}[]>();
|
|
|
|
|
|
|
|
onMounted(async () => {
|
|
onMounted(async () => {
|
|
|
- const res = await CommonContent.getCategoryList(151);
|
|
|
|
|
- const it1 = res.find(p => p.title == '特色村舍');
|
|
|
|
|
- const it2 = res.find(p => p.title == '省级');
|
|
|
|
|
- if (it1) it1.title = '美丽村舍';
|
|
|
|
|
- if (it2) it2.title = '传统村落';
|
|
|
|
|
- tabs.value = res.slice(1).map((p) => ({ id: p.id, text: p.title }));
|
|
|
|
|
|
|
+ //tabs.value = res.slice(1).map((p) => ({ id: p.id, text: p.title }));
|
|
|
await waitTimeOut(400);
|
|
await waitTimeOut(400);
|
|
|
list.value.load();
|
|
list.value.load();
|
|
|
})
|
|
})
|