fix(worker-hall): 优化抢单大厅两级分类联动体验并支持分类图片浏览器长效缓存

This commit is contained in:
yml2213
2026-09-13 11:02:10 +08:00
parent 9fcc4ef99d
commit 85272cde46
10 changed files with 169 additions and 11 deletions
@@ -98,6 +98,17 @@ export async function listWorkerHallOrders(query: JsonObject = {}, session: Work
})
}
export async function getWorkerHallCategories(session: WorkerSession) {
requireActiveWorkerSession(session)
const hallConfig = getWorkerHallConfig()
const categories = (await listWorkCategories()).map(mapWorkCategory)
return {
categories,
showSubcategories: hallConfig.showSubcategories,
allIconUrl: hallConfig.allIconUrl ? refreshStoredFileUrl(hallConfig.allIconUrl) : null,
}
}
export async function getWorkerHallLeaderboard(session: WorkerSession, period: unknown = 'all') {
requireActiveWorkerSession(session)
const leaderboardPeriod = period === 'daily' ? 'daily' : 'all'
@@ -44,6 +44,7 @@ export {
} from './worker-profile-service.js'
export {
getWorkerHallCategories,
getWorkerHallLeaderboard,
listWorkerHallOrders,
maskWorkerLeaderboardDisplayName,