diff --git a/build/start-my.ico b/build/start-my.ico new file mode 100644 index 0000000..2765b92 Binary files /dev/null and b/build/start-my.ico differ diff --git a/config/my.json b/config/my.json new file mode 100644 index 0000000..b30b329 --- /dev/null +++ b/config/my.json @@ -0,0 +1,57 @@ +{ + "appId": "agora.io.ElectronApiExample", + "asar": true, + "asarUnpack": [ + "node_modules/agora-electron-sdk" + ], + "buildDependenciesFromSource": true, + "compression": "normal", + "productName": "四川绵阳教研平台", + "publish": [ + { + "provider": "generic", + "url": "https://meeting-api.23544.com/meeting/my" + } + ], + "files": [ + "!*.log" + ], + "win": { + "icon": "build/start-my.ico", + "requestedExecutionLevel": "highestAvailable", + "target": [ + { + "target": "nsis", + "arch": [ + "ia32" + ] + } + ] + }, + "directories": { + "output": "electron" + }, + "extraResources": [ + { + "from": "src/assets/virtualBackground", + "to": "images", + "filter": [ + "**/*" + ] + } + ], + "nsis": { + "oneClick": false, + "installerIcon": "build/start-my.ico", + "uninstallerIcon": "build/start-my.ico", + "installerHeaderIcon": "build/start-my.ico", + "allowToChangeInstallationDirectory": true, + "createDesktopShortcut": true, + "createStartMenuShortcut": true, + "deleteAppDataOnUninstall": true, + "shortcutName": "四川绵阳教研平台", + "allowElevation": true, + "perMachine": true, + "include": "build/install.nsh" + } +} \ No newline at end of file diff --git a/main.js b/main.js index b044a2f..0654f4b 100644 --- a/main.js +++ b/main.js @@ -28,8 +28,8 @@ let isMaximized = false; let regKey; let connection = null; let startNumber = 0; -let env = 'development'; //development production xy xatyz -let buildStatus = false; //true 打包开发版本 false 本地开发 +let env = 'my'; //development production xy xatyz my +let buildStatus = true; //true 打包开发版本 false 本地开发 powerSaveBlocker.start('prevent-display-sleep') class AppWindow extends BrowserWindow { @@ -72,7 +72,13 @@ let tray; // 检查网络状态 function checkNetworkStatus() { if (!net.isOnline()) { - dialog.showErrorBox(`${env === 'xy' ? '湖北襄阳四中教研平台' : env === 'xatyz' ? '西安铁一中教研平台' : '智汇享'}-网络连接错误', '当前无网络连接,请检查您的网络设置。`); + const titleMap = { + xy: '湖北襄阳四中教研平台', + xatyz: '西安铁一中教研平台', + my: '四川绵阳教研平台' + }; + const title = `${titleMap[env] || '智汇享'}-网络连接错误`; + dialog.showErrorBox(title, '当前无网络连接,请检查您的网络设置。'); app.quit(); return false; } diff --git a/package.json b/package.json index 77e72aa..5e081e2 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,8 @@ "build:dev": "vite build & node build.js & electron-builder -w --config=./config/development.json", "build:prod": "vite build & node build.js & electron-builder -w --config=./config/production.json", "build:xy": "vite build & node build.js & electron-builder -w --config=./config/xy.json", - "build:xatyz": "vite build & node build.js & electron-builder -w --config=./config/xatyz.json" + "build:xatyz": "vite build & node build.js & electron-builder -w --config=./config/xatyz.json", + "build:my": "vite build & node build.js & electron-builder -w --config=./config/my.json" }, "agora_electron": { "platform": "win32", diff --git a/src/assets/icon62.png b/src/assets/icon62.png new file mode 100644 index 0000000..e4bb07d Binary files /dev/null and b/src/assets/icon62.png differ diff --git a/src/assets/icon63.png b/src/assets/icon63.png new file mode 100644 index 0000000..ff8470f Binary files /dev/null and b/src/assets/icon63.png differ diff --git a/src/page/Login/index.tsx b/src/page/Login/index.tsx index f4fc0b3..11634ef 100644 --- a/src/page/Login/index.tsx +++ b/src/page/Login/index.tsx @@ -213,7 +213,23 @@ const Login: React.FC = () => { <>