调整C端展示

This commit is contained in:
2025-11-26 08:50:22 +08:00
parent f987e1c625
commit 92a3076638
23 changed files with 715 additions and 1309 deletions

View File

@@ -10,9 +10,8 @@ class StartupManager {
this.loadingWindow = null;
this.steps = [
{ id: 'init', label: '正在初始化应用...', progress: 0 },
{ id: 'check-mysql-port', label: '正在检MySQL端口...', progress: 15 },
{ id: 'start-mysql', label: '正在启动MySQL数据库...', progress: 30 },
{ id: 'wait-mysql', label: '等待MySQL就绪...', progress: 45 },
{ id: 'check-mysql-port', label: '正在检MySQL服务...', progress: 20 },
{ id: 'wait-mysql', label: '确保MySQL服务运行...', progress: 40 },
{ id: 'check-java-port', label: '正在检测后端服务端口...', progress: 60 },
{ id: 'generate-config', label: '正在生成配置文件...', progress: 70 },
{ id: 'start-java', label: '正在启动后端服务...', progress: 80 },
@@ -26,6 +25,11 @@ class StartupManager {
* 创建 Loading 窗口
*/
createLoadingWindow() {
const isDev = !process.resourcesPath;
const iconPath = isDev
? path.join(__dirname, '..', 'public', 'images', 'icon.png')
: path.join(process.resourcesPath, 'app.asar.unpacked', 'public', 'images', 'icon.png');
this.loadingWindow = new BrowserWindow({
width: 500,
height: 300,
@@ -34,6 +38,7 @@ class StartupManager {
resizable: false,
alwaysOnTop: true,
skipTaskbar: true, // 不在任务栏显示
icon: iconPath,
webPreferences: {
nodeIntegration: true,
contextIsolation: false
@@ -41,7 +46,12 @@ class StartupManager {
});
// 加载 loading 页面
const loadingHtml = path.join(__dirname, '../public/html/loading.html');
const isDev2 = !process.resourcesPath;
const loadingHtml = isDev2
? path.join(__dirname, '..', 'public', 'html', 'loading.html')
: path.join(process.resourcesPath, 'app.asar', 'public', 'html', 'loading.html');
console.log('[StartupManager] Loading HTML from:', loadingHtml);
this.loadingWindow.loadFile(loadingHtml);
return this.loadingWindow;