mirror of
https://github.com/SECTL/SecScore.git
synced 2026-07-19 19:04:23 +08:00
新增奖励兑换模式与奖励设置,并持久化兑换记录
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user