From 0d71dee801b825f7c16f9896995ae24709942657 Mon Sep 17 00:00:00 2001 From: zhuhao <979263092@qq.com> Date: Tue, 24 Sep 2024 11:03:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E5=90=8D=E6=96=87=E6=9E=A2=E8=AF=BE?= =?UTF-8?q?=E5=A0=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.lt => .env.old | 2 +- .env.production | 2 +- electron-builder-lt.yml => electron-builder-old.yml | 6 +++--- electron-builder-prod.yml | 4 ++-- src/main/index.js | 5 +++++ 5 files changed, 12 insertions(+), 7 deletions(-) rename .env.lt => .env.old (93%) rename electron-builder-lt.yml => electron-builder-old.yml (93%) diff --git a/.env.lt b/.env.old similarity index 93% rename from .env.lt rename to .env.old index 79007b1..8640aa3 100644 --- a/.env.lt +++ b/.env.old @@ -1,5 +1,5 @@ # 页面标题 -VITE_APP_TITLE = 文枢课堂 +VITE_APP_TITLE = AIX智慧课堂 # 生产环境配置 VITE_APP_ENV = 'production' diff --git a/.env.production b/.env.production index 8640aa3..79007b1 100644 --- a/.env.production +++ b/.env.production @@ -1,5 +1,5 @@ # 页面标题 -VITE_APP_TITLE = AIX智慧课堂 +VITE_APP_TITLE = 文枢课堂 # 生产环境配置 VITE_APP_ENV = 'production' diff --git a/electron-builder-lt.yml b/electron-builder-old.yml similarity index 93% rename from electron-builder-lt.yml rename to electron-builder-old.yml index 01f2e2e..9dfb51e 100644 --- a/electron-builder-lt.yml +++ b/electron-builder-old.yml @@ -1,10 +1,10 @@ appId: com.electron.app -productName: 文枢课堂 +productName: AIx directories: output: dist buildResources: build win: - executableName: 文枢课堂 + executableName: AIx icon: resources/logo2.ico files: - '!**/.vscode/*' @@ -17,7 +17,7 @@ asarUnpack: nsis: oneClick: false allowToChangeInstallationDirectory: true - artifactName: ${name}-${version}-setup-lt.${ext} + artifactName: ${name}-${version}-setup.${ext} shortcutName: ${productName} uninstallDisplayName: ${productName} createDesktopShortcut: always diff --git a/electron-builder-prod.yml b/electron-builder-prod.yml index 9dfb51e..f8e0b9a 100644 --- a/electron-builder-prod.yml +++ b/electron-builder-prod.yml @@ -1,10 +1,10 @@ appId: com.electron.app -productName: AIx +productName: 文枢课堂 directories: output: dist buildResources: build win: - executableName: AIx + executableName: 文枢课堂 icon: resources/logo2.ico files: - '!**/.vscode/*' diff --git a/src/main/index.js b/src/main/index.js index 49433ec..0b84cd4 100644 --- a/src/main/index.js +++ b/src/main/index.js @@ -273,9 +273,14 @@ function handleAll() { }) // 用于监听-状态管理变化-同步所有窗口 ipcMain.handle('pinia-state-change', (e, storeName, jsonStr) => { + console.log('pinia-state-change-1', storeName, jsonStr) + for(const curWin of BrowserWindow.getAllWindows()){ const id = curWin.webContents.id const bool = id !== e.sender.id && !curWin.isDestroyed() + if (id === e.sender.id) { + console.log('pinia-state-change-2', 'windows-send', curWin.type) + } if (bool) { // 除了消息发送窗口和销毁的窗口 其他都发送 curWin.webContents.send('pinia-state-set', storeName, jsonStr) }