- 修改electron配置文件中的Python应用启动端口 - 更新前端健康检查接口的默认端口号 - 调整WebSocket连接地址的端口配置 - 统一所有环境下的Python服务监听端口为7075
@@ -7,7 +7,7 @@ const pyapp = readConfigFile().pyapp
// create an axios instance
const service = axios.create()
-const baseUrl = 'http://'+pyapp+':7074'
+const baseUrl = 'http://'+pyapp+':7075'
const basePrefixUrl = 'api'
const timeout = 600000
const uploadTimeout = 600000
@@ -155,7 +155,7 @@ module.exports = {
python: {
directory: "./python",
cmd: "python",
- args: ["./main.py", "--port=7074"],
+ args: ["./main.py", "--port=7075"],
stdio: "inherit", // ignore
},
@@ -102,7 +102,7 @@ module.exports = (appInfo) => {
name: "pyapp",
cmd: "./py/pyapp",
directory: "./py",
- args: ["--port=7074"],
+ args: ["--port=7075"],
appExit: true,
};
@@ -43,7 +43,7 @@ module.exports = (appInfo) => {
stdio: "ignore",
@@ -99,7 +99,7 @@ class CrossService extends Service {
cmd: path.join(Ps.getExtraResourcesDir(), "py", "pyapp"),
directory: path.join(Ps.getExtraResourcesDir(), "py"),
windowsExtname: true,
@@ -199,7 +199,7 @@ const pySocket = function () {
this.shouldReconnect = true;
this.isReconnecting = false;
- app.socket = new WebSocket('ws://'+pyapp+':7074/ws');
+ app.socket = new WebSocket('ws://'+pyapp+':7075/ws');
// 监听连接成功事件
app.socket.on('open', () => {
@@ -114,7 +114,7 @@ const goShot = async () => {
const checkHealth = async () => {
loading.value = false;
try {
- const healthUrl = configInfoStore?.appConfig?.pyapp ? 'http://'+configInfoStore?.appConfig?.pyapp+':7074' : 'http://127.0.0.1:7074'
+ const healthUrl = configInfoStore?.appConfig?.pyapp ? 'http://'+configInfoStore?.appConfig?.pyapp+':7075' : 'http://127.0.0.1:7075'
const response = await axios.get(healthUrl);
if (response.status === 200) {
loading.value = false; // 健康检查成功,关闭 loading