fix(worker-hall): 优化抢单大厅两级分类联动体验并支持分类图片浏览器长效缓存
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user