快乐的梦鱼 2 hete
szülő
commit
847d6767d3
2 módosított fájl, 6 hozzáadás és 37 törlés
  1. 0 32
      apps.json
  2. 6 5
      electron/main.ts

+ 0 - 32
apps.json

@@ -1,32 +0,0 @@
-[
-  {
-    "id": 1,
-    "title": "闽南文化驾驶舱",
-    "keepScreenSize": true,
-    "aspectRatio": "16/9",
-    "openType": "iframe",
-    "url": "https://mn.wenlvti.net/test/#/"
-  },
-  {
-    "id": 2,
-    "title": "闽南文化官网",
-    "openType": "iframe",
-    "url": "https://minnan.wenlvti.net/"
-  },
-  {
-    "id": 3,
-    "title": "文保中心官网",
-    "openType": "iframe",
-    "url": "https://xmswhycbhzx.cn/"
-  },
-  {
-    "id": 4,
-    "title": "文物管家后台",
-    "url": "https://wwgj.wenlvti.net/hTurbPWtgS.php"
-  },
-  {
-    "id": 5,
-    "title": "文物管家后台22",
-    "url": "https://wwgj.wenlvti.net/hTurbPWtgS.php"
-  }
-]

+ 6 - 5
electron/main.ts

@@ -37,7 +37,9 @@ function loadWindowPage(window: BrowserWindow, subPath: string) {
   if (VITE_DEV_SERVER_URL) {
     window.loadURL(VITE_DEV_SERVER_URL + "#" + subPath)
   } else {
-    window.loadFile(path.join(RENDERER_DIST, 'index.html') + "#" + subPath)
+    window.loadFile(path.join(RENDERER_DIST, 'index.html'), {
+      hash: subPath,
+    })
   }
 }
 function loadViewUrl(view: WebContentsView, subPath: string) {
@@ -47,7 +49,9 @@ function loadViewUrl(view: WebContentsView, subPath: string) {
   if (VITE_DEV_SERVER_URL) {
     view.webContents.loadURL(VITE_DEV_SERVER_URL + "#" + subPath)
   } else {
-    view.webContents.loadFile(path.join(RENDERER_DIST, 'index.html') + "#" + subPath)
+    view.webContents.loadFile(path.join(RENDERER_DIST, 'index.html'), {
+      hash: subPath,
+    })
   }
 }
 
@@ -60,7 +64,6 @@ function createWindow() {
       preload: path.join(__dirname, 'preload.mjs'),
       contextIsolation: true,
       allowRunningInsecureContent: true,
-      partition: 'persist:minnan-demo-app',
     },
     width: 1200,
     height: 800,
@@ -68,9 +71,7 @@ function createWindow() {
 
   childView = new WebContentsView({
     webPreferences: {
-      partition: 'persist:minnan-demo-app',
       allowRunningInsecureContent: true,
-      enableBlinkFeatures: 'PasswordManager',
     },
   })
   const expandButtonView = new WebContentsView({