fix: 0 票最佳匹配时展示"都不太满意"引导页,替代尴尬的 Trophy 展示

This commit is contained in:
2026-02-24 19:26:54 +08:00
parent b406acc813
commit 30329df136
3 changed files with 88 additions and 4 deletions
+9 -3
View File
@@ -32,9 +32,15 @@ export async function GET(
matchLikes = data.users.length;
} else if (allFinished && data.restaurants.length > 0) {
const best = findBestMatch(data.likes, data.restaurants);
match = best.id;
matchType = "best";
matchLikes = best.likes;
if (best.likes > 0) {
match = best.id;
matchType = "best";
matchLikes = best.likes;
} else {
match = best.id;
matchType = "no_match";
matchLikes = 0;
}
}
const likeCounts: Record<string, number> = {};