                }, 3000);
            }
        }

        // 登录函数
        async function login(username, password) {
            try {
                console.log('Attempting login...');
                
                const apiPrefix = window.APP_CONFIG ? window.APP_CONFIG.apiPrefix : '/web/admin/api';
                const response = await fetch(apiPrefix + '/login', {
                    method: 'POST',
                    headers: {
                        'Content-Type': 'application/json',
 