ZhangXianQiang
2024-06-25 a02473e11943579fa3ef4c2392624609d1475c0e
dist-electron/background.js
@@ -27,7 +27,8 @@
    if (BrowserWindow.getAllWindows().length === 0)
      createWindow();
  });
  ipcMain.on("open-new-window", () => {
  ipcMain.on("open-new-window", (event, meet) => {
    const { meetName, id } = JSON.parse(meet);
    const childWin = new BrowserWindow({
      width,
      height,
@@ -39,10 +40,14 @@
    });
    childWin.maximize();
    if (process.env.VITE_DEV_SERVER_URL) {
      childWin.loadURL(process.env.VITE_DEV_SERVER_URL + "#/meet");
      childWin.loadURL(process.env.VITE_DEV_SERVER_URL + `#/meet?meetName=${meetName}&id=${id}`);
    } else {
      childWin.loadFile(join(__dirname, "../dist/index.html"), {
        hash: "/meet"
        hash: "/meet",
        query: {
          meetName,
          id
        }
      });
    }
  });