text: const {BrowserWindow} = require('electron')
  const app = require('electron').app
  const dialog = require('electron').dialog
  
  if (handleSquirrelEvent(app)) {
      // squirrel event handled and app will exit in 1000ms, so don't do anything else
      return;
  }
  
  let win 
  
  app.on('ready', function() {
  	win = new BrowserWindow({width: 1024, height: 768})
  	//win.webContents.openDevTools()
  	var url_0 = "file://" + __dirname + "/index.html"
  	var url_1 = "http://www.baidu.com"
  	var url_2 = "https://www.baidu.com"
  	var url_3 = "https://kyfw.12306.cn/otn"
  	win.loadURL(url_3);	
  })
  
  app.on('certificate-error', (event, webContents, url, error, cert, cb) => {
    //.showCertificateTrustDialog(win, {certificate: cert, message: "yo this is super dodgey"}, () => {}) 
    event.preventDefault()
    cb(true)
  })
  
  
  function handleSquirrelEvent(application) {
      if (process.argv.length === 1) {
          return false;
      }
  
      const ChildProcess = require('child_process');
      const path = require('path');
  
      const appFolder = path.resolve(process.execPath, '..');
      const rootAtomFolder = path.resolve(appFolder, '..');
      const updateDotExe = path.resolve(path.join(rootAtomFolder, 'Update.exe'));
      const exeName = path.basename(process.execPath);
  
      const spawn = function(command, args) {
          let spawnedProcess, error;
  
          try {
              spawnedProcess = ChildProcess.spawn(command, args, {
                  detached: true
              });
          } catch (error) {}
  
          return spawnedProcess;
      };
  
      const spawnUpdate = function(args) {
          return spawn(updateDotExe, args);
      };
  
      const squirrelEvent = process.argv[1];
      switch (squirrelEvent) {
          case '--squirrel-install':
          case '--squirrel-updated':
              // Optionally do things such as:
              // - Add your .exe to the PATH
              // - Write to the registry for things like file associations and
              //   explorer context menus
  
              // Install desktop and start menu shortcuts
              spawnUpdate(['--createShortcut', exeName]);
  
              setTimeout(application.quit, 1000);
              return true;
  
          case '--squirrel-uninstall':
              // Undo anything you did in the --squirrel-install and
              // --squirrel-updated handlers
  
              // Remove desktop and start menu shortcuts
              spawnUpdate(['--removeShortcut', exeName]);
  
              setTimeout(application.quit, 1000);
              return true;
  
          case '--squirrel-obsolete':
              // This is called on the outgoing version of your app before
              // we update to the new version - it's the opposite of
              // --squirrel-updated
  
              application.quit();
              return true;
      }
  };