yangjie #51
Binary file not shown.
|
After Width: | Height: | Size: 104 KiB |
|
|
@ -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
12
main.js
|
|
@ -28,8 +28,8 @@ let isMaximized = false;
|
||||||
let regKey;
|
let regKey;
|
||||||
let connection = null;
|
let connection = null;
|
||||||
let startNumber = 0;
|
let startNumber = 0;
|
||||||
let env = 'development'; //development production xy xatyz
|
let env = 'my'; //development production xy xatyz my
|
||||||
let buildStatus = false; //true 打包开发版本 false 本地开发
|
let buildStatus = true; //true 打包开发版本 false 本地开发
|
||||||
powerSaveBlocker.start('prevent-display-sleep')
|
powerSaveBlocker.start('prevent-display-sleep')
|
||||||
|
|
||||||
class AppWindow extends BrowserWindow {
|
class AppWindow extends BrowserWindow {
|
||||||
|
|
@ -72,7 +72,13 @@ let tray;
|
||||||
// 检查网络状态
|
// 检查网络状态
|
||||||
function checkNetworkStatus() {
|
function checkNetworkStatus() {
|
||||||
if (!net.isOnline()) {
|
if (!net.isOnline()) {
|
||||||
dialog.showErrorBox(`${env === 'xy' ? '湖北襄阳四中教研平台' : env === 'xatyz' ? '西安铁一中教研平台' : '智汇享'}-网络连接错误', '当前无网络连接,请检查您的网络设置。`);
|
const titleMap = {
|
||||||
|
xy: '湖北襄阳四中教研平台',
|
||||||
|
xatyz: '西安铁一中教研平台',
|
||||||
|
my: '四川绵阳教研平台'
|
||||||
|
};
|
||||||
|
const title = `${titleMap[env] || '智汇享'}-网络连接错误`;
|
||||||
|
dialog.showErrorBox(title, '当前无网络连接,请检查您的网络设置。');
|
||||||
app.quit();
|
app.quit();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,8 @@
|
||||||
"build:dev": "vite build & node build.js & electron-builder -w --config=./config/development.json",
|
"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: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: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": {
|
"agora_electron": {
|
||||||
"platform": "win32",
|
"platform": "win32",
|
||||||
|
|
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 31 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 50 KiB |
|
|
@ -213,7 +213,23 @@ const Login: React.FC = () => {
|
||||||
<>
|
<>
|
||||||
<div className={styles.login}>
|
<div className={styles.login}>
|
||||||
<div className={styles.loginBg}>
|
<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>
|
||||||
<div className={styles.loginContent}>
|
<div className={styles.loginContent}>
|
||||||
<div>
|
<div>
|
||||||
|
|
|
||||||
|
|
@ -93,6 +93,8 @@ import icon60 from '@/assets/icon60.png'
|
||||||
import icon61 from '@/assets/icon61.png'
|
import icon61 from '@/assets/icon61.png'
|
||||||
import icon60Active from '@/assets/icon60-active.png'
|
import icon60Active from '@/assets/icon60-active.png'
|
||||||
import icon61Active from '@/assets/icon61-active.png'
|
import icon61Active from '@/assets/icon61-active.png'
|
||||||
|
import icon62 from '@/assets/icon62.png'
|
||||||
|
import icon63 from '@/assets/icon63.png'
|
||||||
export default {
|
export default {
|
||||||
loading,
|
loading,
|
||||||
icon,
|
icon,
|
||||||
|
|
@ -189,4 +191,6 @@ export default {
|
||||||
icon61,
|
icon61,
|
||||||
icon60Active,
|
icon60Active,
|
||||||
icon61Active,
|
icon61Active,
|
||||||
|
icon62,
|
||||||
|
icon63,
|
||||||
}
|
}
|
||||||
|
|
@ -64,6 +64,8 @@ export const getUpdateUrl = (env: string) => {
|
||||||
return 'https://meeting-api.23544.com/meeting/xysz'
|
return 'https://meeting-api.23544.com/meeting/xysz'
|
||||||
case 'xatyz':
|
case 'xatyz':
|
||||||
return 'https://meeting-api.23544.com/meeting/xatyz'
|
return 'https://meeting-api.23544.com/meeting/xatyz'
|
||||||
|
case 'my':
|
||||||
|
return 'https://meeting-api.23544.com/meeting/my'
|
||||||
case 'development':
|
case 'development':
|
||||||
return 'http://192.168.2.9:8827'
|
return 'http://192.168.2.9:8827'
|
||||||
default:
|
default:
|
||||||
|
|
@ -80,6 +82,9 @@ export const getTitle = async () => {
|
||||||
case 'xatyz':
|
case 'xatyz':
|
||||||
str = '西安铁一中教研平台'
|
str = '西安铁一中教研平台'
|
||||||
break;
|
break;
|
||||||
|
case 'my':
|
||||||
|
str = '四川绵阳教研平台'
|
||||||
|
break;
|
||||||
case 'development':
|
case 'development':
|
||||||
str = '智汇享'
|
str = '智汇享'
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,8 @@ module.exports = {
|
||||||
return 'https://meeting-api.23544.com/meeting/xysz'
|
return 'https://meeting-api.23544.com/meeting/xysz'
|
||||||
case 'xatyz':
|
case 'xatyz':
|
||||||
return 'https://meeting-api.23544.com/meeting/xatyz'
|
return 'https://meeting-api.23544.com/meeting/xatyz'
|
||||||
|
case 'my':
|
||||||
|
return 'https://meeting-api.23544.com/meeting/my'
|
||||||
case 'development':
|
case 'development':
|
||||||
return 'http://192.168.2.9:8827'
|
return 'http://192.168.2.9:8827'
|
||||||
default:
|
default:
|
||||||
|
|
@ -17,6 +19,8 @@ module.exports = {
|
||||||
return '湖北襄阳四中教研平台'
|
return '湖北襄阳四中教研平台'
|
||||||
case 'xatyz':
|
case 'xatyz':
|
||||||
return '西安铁一中教研平台'
|
return '西安铁一中教研平台'
|
||||||
|
case 'my':
|
||||||
|
return '四川绵阳教研平台'
|
||||||
case 'development':
|
case 'development':
|
||||||
return '智汇享'
|
return '智汇享'
|
||||||
default:
|
default:
|
||||||
|
|
@ -29,6 +33,8 @@ module.exports = {
|
||||||
return 'icon54'
|
return 'icon54'
|
||||||
case 'xatyz':
|
case 'xatyz':
|
||||||
return 'icon59'
|
return 'icon59'
|
||||||
|
case 'my':
|
||||||
|
return 'icon62'
|
||||||
case 'development':
|
case 'development':
|
||||||
return 'icon'
|
return 'icon'
|
||||||
default:
|
default:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue