feat: 完善官网配置、预约管理与文章编辑
This commit is contained in:
@@ -77,7 +77,6 @@ const printConsoleWelcome = (status) => {
|
||||
};
|
||||
|
||||
const PageLayout = () => {
|
||||
console.log('[PageLayout] Component rendering...');
|
||||
const [userState, userDispatch] = useContext(UserContext);
|
||||
const [statusState, statusDispatch] = useContext(StatusContext);
|
||||
const isMobile = useIsMobile();
|
||||
@@ -96,7 +95,8 @@ const PageLayout = () => {
|
||||
const shouldInnerPadding =
|
||||
location.pathname.includes('/console') &&
|
||||
!location.pathname.startsWith('/console/chat') &&
|
||||
location.pathname !== '/console/playground';
|
||||
location.pathname !== '/console/playground' &&
|
||||
location.pathname !== '/console/website-setting';
|
||||
|
||||
const isConsoleRoute = location.pathname.startsWith('/console');
|
||||
const showSider = isConsoleRoute && (!isMobile || drawerOpen);
|
||||
@@ -226,10 +226,8 @@ const PageLayout = () => {
|
||||
};
|
||||
|
||||
const loadStatus = async () => {
|
||||
console.log('[PageLayout] Loading status from API...');
|
||||
try {
|
||||
const res = await API.get('/api/status');
|
||||
console.log('[PageLayout] API response received:', res.data);
|
||||
const { success, data } = res.data;
|
||||
if (success) {
|
||||
statusDispatch({ type: 'set', payload: data });
|
||||
@@ -243,7 +241,6 @@ const PageLayout = () => {
|
||||
if (data.theme_config !== undefined) {
|
||||
applyTheme(data.theme_config);
|
||||
}
|
||||
console.log('[PageLayout] Status loaded successfully');
|
||||
} else {
|
||||
console.error('[PageLayout] API returned success=false');
|
||||
showError('Unable to connect to server');
|
||||
|
||||
Reference in New Issue
Block a user