|
...
|
...
|
@@ -29,7 +29,7 @@ function mergeDuplicates(data: Types[]) { |
|
|
|
} else {
|
|
|
|
const existing = map.get(item.id);
|
|
|
|
const existingChildIds = new Set(
|
|
|
|
existing.children.map((child: any) => child.id)
|
|
|
|
existing.children.map((child: any) => child.id),
|
|
|
|
);
|
|
|
|
item.children.forEach((child) => {
|
|
|
|
if (!existingChildIds.has(child.id)) {
|
|
...
|
...
|
@@ -44,6 +44,7 @@ function mergeDuplicates(data: Types[]) { |
|
|
|
const detailRes = await getAppDetail(Number(route.params.id));
|
|
|
|
DetailData.value = detailRes.data;
|
|
|
|
DetailData.value.types = mergeDuplicates(detailRes.data.types);
|
|
|
|
console.log(DetailData.value);
|
|
|
|
if (DetailData.value.types?.length > 0) {
|
|
|
|
const firstType = DetailData.value.types[0];
|
|
|
|
const typeAlias = firstType.alias || firstType.children?.[0]?.alias;
|
|
...
|
...
|
@@ -60,8 +61,8 @@ if (DetailData.value.types?.length > 0) { |
|
|
|
}
|
|
|
|
|
|
|
|
useHead({
|
|
|
|
title: DetailData.value.popupContent
|
|
|
|
? `${DetailData.value.title} - ${DetailData.value.popupContent}`
|
|
|
|
title: DetailData.value.description
|
|
|
|
? `${DetailData.value.title} - ${DetailData.value.description}`
|
|
|
|
: DetailData.value.title,
|
|
|
|
meta: [
|
|
|
|
{ name: "description", content: DetailData.value.description },
|
|
...
|
...
|
@@ -79,7 +80,7 @@ useHead({ |
|
|
|
? ` - ${DetailData.value.popupContent}`
|
|
|
|
: `- ${DetailData.value.description} | ${webSite.value.webname.slice(
|
|
|
|
0,
|
|
|
|
7
|
|
|
|
7,
|
|
|
|
)}`
|
|
|
|
}`,
|
|
|
|
},
|
...
|
...
|
|