|
@@ -5,7 +5,18 @@ import { electronApp, optimizer, is } from '@electron-toolkit/utils';
|
|
import icon from '../../resources/icon.png?asset';
|
|
import icon from '../../resources/icon.png?asset';
|
|
import useElectron from './useElectron';
|
|
import useElectron from './useElectron';
|
|
import useWinProcess from './useWinProcess';
|
|
import useWinProcess from './useWinProcess';
|
|
-// import log from './logger';
|
|
|
|
|
|
+import log from './logger';
|
|
|
|
+
|
|
|
|
+// 免登录流程
|
|
|
|
+function silenceAuthorityHandle(mainWindow) {
|
|
|
|
+ const arg = process.argv;
|
|
|
|
+ log.info(`process.argv:${JSON.stringify(arg)}`);
|
|
|
|
+ // mainWindow.webContents.send('silence-authority', arg[1]);
|
|
|
|
+ mainWindow.webContents.send(
|
|
|
|
+ 'silence-authority',
|
|
|
|
+ 'zgiOtrHS2nq9q3SOr0iOYAW1JJsG2w1lrqdv0PB2IrT9ijPBsKxT7I7u2077RaKAPbwfEj+9f/zr+RHzOZFsaYZo5GuoJLMdJPKvvOnpG/3jk6GsdPFlMooCjs5LzJKutFiFOj/xsXoOGdxqIYXWWH6sROZQAKhvBIu2Mfem6+fZhy66baK/s0ihec59gOTQ8lsjyJzf8To2K0EyapRWGVpFwljAmaQ1HfhfUUoRIYTIHW89wqRU3KYjB5oJQRQnVYLA7v0H9kK0smmX3N3Kbc0V9LtHUIiU/teGvWaa6ty43SAJqci9IRZEh35xzM9IjtzvR/9LHQWZqTLuVSZ+JmCwfKKGFV39ewYjrjmFk34tIW5yvmQ9oUugpi2T3xhdMA7aeNkkoK0tgm3hwqri3KdziGcqdEdkqhfW2vapwPDy4m5g/JH7ulNLI0nfDmPpTNsWgWXjUnmAQNWAp4In1oH8TMRNHImMbsxz4RhcBz/z/YCWl89zk/vA4TOtQDV99s66+8kVhTQEjDXffz6z2T5hZTGaPMv/lSCo1Fo01VM='
|
|
|
|
+ );
|
|
|
|
+}
|
|
|
|
|
|
function createWindow(): void {
|
|
function createWindow(): void {
|
|
// Create the browser window.
|
|
// Create the browser window.
|
|
@@ -25,6 +36,7 @@ function createWindow(): void {
|
|
|
|
|
|
mainWindow.on('ready-to-show', () => {
|
|
mainWindow.on('ready-to-show', () => {
|
|
mainWindow.show();
|
|
mainWindow.show();
|
|
|
|
+ silenceAuthorityHandle(mainWindow);
|
|
});
|
|
});
|
|
|
|
|
|
mainWindow.webContents.setWindowOpenHandler((details) => {
|
|
mainWindow.webContents.setWindowOpenHandler((details) => {
|
|
@@ -32,11 +44,6 @@ function createWindow(): void {
|
|
return { action: 'deny' };
|
|
return { action: 'deny' };
|
|
});
|
|
});
|
|
|
|
|
|
- // TODO:方案要改
|
|
|
|
- // const arg = process.argv;
|
|
|
|
- // log.info(`process.argv:${JSON.stringify(arg)}`);
|
|
|
|
- // mainWindow.webContents.send('silence-authority', arg[1]);
|
|
|
|
-
|
|
|
|
// HMR for renderer base on electron-vite cli.
|
|
// HMR for renderer base on electron-vite cli.
|
|
// Load the remote URL for development or the local html file for production.
|
|
// Load the remote URL for development or the local html file for production.
|
|
if (is.dev && process.env.ELECTRON_RENDERER_URL) {
|
|
if (is.dev && process.env.ELECTRON_RENDERER_URL) {
|