From e1f845d34990f6c86438d9f3b25f24d5de43066d Mon Sep 17 00:00:00 2001 From: 1549469775 <1549469775@qq.com> Date: Wed, 28 Jul 2021 17:15:06 +0800 Subject: [PATCH] add --- src/main/index.ts | 4 ++-- src/main/menu.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/index.ts b/src/main/index.ts index 232646c..a8b5d88 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -45,8 +45,8 @@ function createWin() { const URL = app.isPackaged ? `file://${__dirname}/index.html` // vite 构建后的静态文件地址 - // : `http://localhost:${process.env.PORT}/#/` // vite 启动的服务器地址 - : `http://localhost:8080/#/` // vite 启动的服务器地址 + : `http://localhost:${process.env.PORT}/#/` // vite 启动的服务器地址 + // : `http://localhost:8080/#/` // vite 启动的服务器地址 Shared.data.mainWindow?.loadURL(URL) } diff --git a/src/main/menu.ts b/src/main/menu.ts index b143e17..3f003e6 100644 --- a/src/main/menu.ts +++ b/src/main/menu.ts @@ -24,14 +24,14 @@ let template = [ // webPreferences: { // 下面两个必须这么用,看a.md的文档 - nodeIntegration: true, + nodeIntegration: true, contextIsolation: false, // 预加载动画 // preload: join(__dirname, "../../src/preload/index.js"), }, }) // 隐藏菜单 - newwin?.setMenuBarVisibility(false) + newwin.setMenuBarVisibility(false) newwin.loadURL(process.env.NODE_ENV === "development" ? `http://localhost:${process.env.PORT}/#/about` : `file://${__dirname}/index.html#/about`); newwin.on("ready-to-show", () => { newwin?.show()