mirror of
https://github.com/PlayEdu/backend
synced 2025-06-22 20:36:09 +08:00
29 lines
621 B
TypeScript
29 lines
621 B
TypeScript
import { createSlice } from "@reduxjs/toolkit";
|
|
|
|
type SystemConfigStoreInterface = {
|
|
systemApiUrl?: string;
|
|
systemPcUrl?: string;
|
|
systemH5Url?: string;
|
|
systemLogo?: string;
|
|
systemName?: string;
|
|
memberDefaultAvatar?: string;
|
|
courseDefaultThumbs?: string[];
|
|
};
|
|
|
|
const systemConfigSlice = createSlice({
|
|
name: "systemConfig",
|
|
initialState: {
|
|
value: {},
|
|
},
|
|
reducers: {
|
|
saveConfigAction(stage, e) {
|
|
stage.value = e.payload;
|
|
},
|
|
},
|
|
});
|
|
|
|
export default systemConfigSlice.reducer;
|
|
export const { saveConfigAction } = systemConfigSlice.actions;
|
|
|
|
export type { SystemConfigStoreInterface };
|