|
@@ -3,13 +3,13 @@ const {app, BrowserWindow} = require('electron')
|
|
|
const path = require('path')
|
|
const path = require('path')
|
|
|
const fs = require('fs')
|
|
const fs = require('fs')
|
|
|
// 读取配置文件
|
|
// 读取配置文件
|
|
|
-const config = JSON.parse(fs.readFileSync('./resources/config.json', 'utf-8'))
|
|
|
|
|
|
|
+// const config = JSON.parse(fs.readFileSync('./resources/config.json', 'utf-8'))
|
|
|
|
|
|
|
|
function createWindow () {
|
|
function createWindow () {
|
|
|
// Create the browser window.
|
|
// Create the browser window.
|
|
|
let webConfig = {
|
|
let webConfig = {
|
|
|
- width: config.width,
|
|
|
|
|
- height: config.height,
|
|
|
|
|
|
|
+ width: 376,
|
|
|
|
|
+ height: 667,
|
|
|
webPreferences: {
|
|
webPreferences: {
|
|
|
webSecurity: false,
|
|
webSecurity: false,
|
|
|
nodeIntegration: true
|
|
nodeIntegration: true
|
|
@@ -30,7 +30,7 @@ function createWindow () {
|
|
|
// mainWindow.loadFile('./resources/01.html')
|
|
// mainWindow.loadFile('./resources/01.html')
|
|
|
mainWindow.webContents.userAgent = 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_5_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1.1 Mobile/15E148 Safari/604.1 electron'
|
|
mainWindow.webContents.userAgent = 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_5_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1.1 Mobile/15E148 Safari/604.1 electron'
|
|
|
// mainWindow.webContents.openDevTools()
|
|
// mainWindow.webContents.openDevTools()
|
|
|
- mainWindow.loadURL(config.url)
|
|
|
|
|
|
|
+ mainWindow.loadURL('http://cunchu.site/work/debug/index.html')
|
|
|
mainWindow.webContents.on("dom-ready", function() {
|
|
mainWindow.webContents.on("dom-ready", function() {
|
|
|
mainWindow.webContents.executeJavaScript(`
|
|
mainWindow.webContents.executeJavaScript(`
|
|
|
window.owoedition = 1
|
|
window.owoedition = 1
|