2025.11.28.22.40

This commit is contained in:
RUI
2025-11-28 22:44:54 +08:00
parent 0d73d0c63b
commit 21da21925e
71 changed files with 2924 additions and 1834 deletions

View File

@@ -58,10 +58,6 @@ if (!MONGODB_URI) {
// ------------------------------------------------------------------
const getRandomInt = (min: number, max: number) => Math.floor(Math.random() * (max - min + 1)) + min;
const getRandomItem = <T>(arr: T[]): T => arr[Math.floor(Math.random() * arr.length)];
const getRandomItems = <T>(arr: T[], count: number): T[] => {
const shuffled = [...arr].sort(() => 0.5 - Math.random());
return shuffled.slice(0, count);
};
// ------------------------------------------------------------------
// 3. 主逻辑