lilei hai 1 ano
pai
achega
92294a75fb
Modificáronse 2 ficheiros con 9 adicións e 1 borrados
  1. 1 1
      .env.dev
  2. 8 0
      src/background.js

+ 1 - 1
.env.dev

@@ -1,4 +1,4 @@
 NODE_ENV=production
-VUE_APP_API_BASE_URL=http://192.168.16.107:8000/
+VUE_APP_API_BASE_URL=http://192.168.2.107:8000/
 VUE_APP_VUE_APP_ID=com.iscm.360arrow.electron.dev
 VUE_APP_PRO_NAME=iSCM-开发环境

+ 8 - 0
src/background.js

@@ -5,6 +5,7 @@ import { createProtocol } from 'vue-cli-plugin-electron-builder/lib'
 import installExtension, { VUEJS_DEVTOOLS } from 'electron-devtools-installer'
 import { updateHandle } from './update'
 const isDevelopment = process.env.NODE_ENV !== 'production'
+const os = require("os");
 
 if (!isDevelopment) {
   global.__static = require("path")
@@ -92,6 +93,13 @@ const gotTheLock = app.requestSingleInstanceLock()
 if (!gotTheLock) {
   app.quit()
 } else {
+	
+	const isWin7 = os.release().startsWith('6.1');
+	if(isWin7) {
+		//win7下 ,关闭硬件加速
+		app.disableHardwareAcceleration();
+	}
+
 	/**
 	 * 兼容https非可信域
 	*/