新增学校

This commit is contained in:
yj 2026-04-03 17:56:38 +08:00
parent fe98b8e4e8
commit 4a848db982
10 changed files with 100 additions and 5 deletions

BIN
build/start-my.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

57
config/my.json Normal file
View File

@ -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"
}
}

12
main.js
View File

@ -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;
}

View File

@ -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",

BIN
src/assets/icon62.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

BIN
src/assets/icon63.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

View File

@ -213,7 +213,23 @@ const Login: React.FC = () => {
<>
<div className={styles.login}>
<div className={styles.loginBg}>
{env ? <img src={env === 'xy' ? ImageUrl.icon53 : env === 'xatyz' ? ImageUrl.icon58 : ImageUrl.icon1} alt="" /> : null}
{env && (
<img
src={(() => {
switch (env) {
case 'xy':
return ImageUrl.icon53
case 'xatyz':
return ImageUrl.icon58
case 'my':
return ImageUrl.icon63
default:
return ImageUrl.icon1
}
})()}
alt=""
/>
)}
</div>
<div className={styles.loginContent}>
<div>

View File

@ -93,6 +93,8 @@ import icon60 from '@/assets/icon60.png'
import icon61 from '@/assets/icon61.png'
import icon60Active from '@/assets/icon60-active.png'
import icon61Active from '@/assets/icon61-active.png'
import icon62 from '@/assets/icon62.png'
import icon63 from '@/assets/icon63.png'
export default {
loading,
icon,
@ -189,4 +191,6 @@ export default {
icon61,
icon60Active,
icon61Active,
icon62,
icon63,
}

View File

@ -64,6 +64,8 @@ export const getUpdateUrl = (env: string) => {
return 'https://meeting-api.23544.com/meeting/xysz'
case 'xatyz':
return 'https://meeting-api.23544.com/meeting/xatyz'
case 'my':
return 'https://meeting-api.23544.com/meeting/my'
case 'development':
return 'http://192.168.2.9:8827'
default:
@ -80,6 +82,9 @@ export const getTitle = async () => {
case 'xatyz':
str = '西安铁一中教研平台'
break;
case 'my':
str = '四川绵阳教研平台'
break;
case 'development':
str = '智汇享'
break;

View File

@ -5,6 +5,8 @@ module.exports = {
return 'https://meeting-api.23544.com/meeting/xysz'
case 'xatyz':
return 'https://meeting-api.23544.com/meeting/xatyz'
case 'my':
return 'https://meeting-api.23544.com/meeting/my'
case 'development':
return 'http://192.168.2.9:8827'
default:
@ -17,6 +19,8 @@ module.exports = {
return '湖北襄阳四中教研平台'
case 'xatyz':
return '西安铁一中教研平台'
case 'my':
return '四川绵阳教研平台'
case 'development':
return '智汇享'
default:
@ -29,6 +33,8 @@ module.exports = {
return 'icon54'
case 'xatyz':
return 'icon59'
case 'my':
return 'icon62'
case 'development':
return 'icon'
default: