新增奖励兑换模式与奖励设置,并持久化兑换记录

This commit is contained in:
JSR
2026-03-20 17:59:06 +08:00
parent ad6b0808cb
commit 8155dac75e
22 changed files with 1507 additions and 17 deletions
+18
View File
@@ -13,6 +13,8 @@ const loadScoreManager = () => import("./ScoreManager")
const loadLeaderboard = () => import("./Leaderboard")
const loadSettlementHistory = () => import("./SettlementHistory")
const loadAutoScoreManager = () => import("./AutoScoreManager")
const loadRewardExchange = () => import("./RewardExchange")
const loadRewardSettings = () => import("./RewardSettings")
const Home = lazy(() => loadHome().then((m) => ({ default: m.Home })))
const StudentManager = lazy(() => loadStudentManager().then((m) => ({ default: m.StudentManager })))
@@ -26,6 +28,12 @@ const SettlementHistory = lazy(() =>
const AutoScoreManager = lazy(() =>
loadAutoScoreManager().then((m) => ({ default: m.AutoScoreManager }))
)
const RewardExchange = lazy(() =>
loadRewardExchange().then((m) => ({ default: m.RewardExchange }))
)
const RewardSettings = lazy(() =>
loadRewardSettings().then((m) => ({ default: m.RewardSettings }))
)
const warmupRouteChunks = () =>
Promise.allSettled([
@@ -37,6 +45,8 @@ const warmupRouteChunks = () =>
loadLeaderboard(),
loadSettlementHistory(),
loadAutoScoreManager(),
loadRewardExchange(),
loadRewardSettings(),
])
const { Content } = Layout
@@ -235,6 +245,14 @@ export function ContentArea({
<Route path="/settlements" element={<SettlementHistory />} />
<Route path="/reasons" element={<ReasonManager canEdit={permission === "admin"} />} />
<Route path="/auto-score" element={<AutoScoreManager />} />
<Route
path="/reward-exchange"
element={<RewardExchange canEdit={permission === "admin" || permission === "points"} />}
/>
<Route
path="/reward-settings"
element={<RewardSettings canEdit={permission === "admin"} />}
/>
<Route path="/settings" element={<Settings permission={permission} />} />
<Route path="*" element={<Navigate to="/" replace />} />
</Routes>