Merge branch 'main' of http://27.128.240.72:3000/zhuhao/AIx_Smarttalk into zdg
This commit is contained in:
commit
716c16928e
|
@ -146,7 +146,7 @@ export default async function ({ app, shell, BrowserWindow, ipcMain }) {
|
||||||
//使用默认应用打开本地文件
|
//使用默认应用打开本地文件
|
||||||
ipcMain.on('open-path-app', (e, destination) => {
|
ipcMain.on('open-path-app', (e, destination) => {
|
||||||
let path = appRootFilePath + destination
|
let path = appRootFilePath + destination
|
||||||
shell.openExternal(path).catch((error) => {
|
shell.openPath(path).catch((error) => {
|
||||||
console.log(error)
|
console.log(error)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
|
@ -29,6 +29,7 @@ function createLoginWindow() {
|
||||||
icon: join(__dirname, '../../resources/logo2.ico'),
|
icon: join(__dirname, '../../resources/logo2.ico'),
|
||||||
...(process.platform === 'linux' ? { icon } : {}),
|
...(process.platform === 'linux' ? { icon } : {}),
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
|
defaultEncoding: 'utf-8',
|
||||||
preload: join(__dirname, '../preload/index.js'),
|
preload: join(__dirname, '../preload/index.js'),
|
||||||
sandbox: false,
|
sandbox: false,
|
||||||
nodeIntegration: true,
|
nodeIntegration: true,
|
||||||
|
@ -68,6 +69,7 @@ function createMainWindow() {
|
||||||
icon: join(__dirname, '../../resources/logo2.ico'),
|
icon: join(__dirname, '../../resources/logo2.ico'),
|
||||||
...(process.platform === 'linux' ? { icon } : {}),
|
...(process.platform === 'linux' ? { icon } : {}),
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
|
defaultEncoding: 'utf-8',
|
||||||
preload: join(__dirname, '../preload/index.js'),
|
preload: join(__dirname, '../preload/index.js'),
|
||||||
sandbox: false,
|
sandbox: false,
|
||||||
// nodeIntegration: true,
|
// nodeIntegration: true,
|
||||||
|
@ -116,6 +118,7 @@ async function createLinkWin(data) {
|
||||||
autoHideMenuBar: true,
|
autoHideMenuBar: true,
|
||||||
...(process.platform === 'linux' ? { icon } : {}),
|
...(process.platform === 'linux' ? { icon } : {}),
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
|
defaultEncoding: 'utf-8',
|
||||||
sandbox: false,
|
sandbox: false,
|
||||||
nodeIntegration: true,
|
nodeIntegration: true,
|
||||||
worldSafeExecuteJavaScript: true,
|
worldSafeExecuteJavaScript: true,
|
||||||
|
@ -144,6 +147,8 @@ async function createLinkWin(data) {
|
||||||
|
|
||||||
// 初始化完成
|
// 初始化完成
|
||||||
app.on('ready', () => {
|
app.on('ready', () => {
|
||||||
|
process.env.LANG = 'en_US.UTF-8'
|
||||||
|
process.env['ELECTRON_DISABLE_SANDBOX'] = true;
|
||||||
// 设置应用程序用户模型标识符
|
// 设置应用程序用户模型标识符
|
||||||
electronApp.setAppUserModelId('com.electron')
|
electronApp.setAppUserModelId('com.electron')
|
||||||
|
|
||||||
|
|
|
@ -230,6 +230,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
openFileWin(items) {
|
openFileWin(items) {
|
||||||
|
if (!items||!items.fileSuffix) return;
|
||||||
getPrepareById(items.id).then((item) => {
|
getPrepareById(items.id).then((item) => {
|
||||||
Object.assign(items, item)
|
Object.assign(items, item)
|
||||||
asyncLocalFile(items).then(() => {
|
asyncLocalFile(items).then(() => {
|
||||||
|
|
|
@ -350,6 +350,7 @@ export default {
|
||||||
this.curBookImg = data.textBook.curBookImg
|
this.curBookImg = data.textBook.curBookImg
|
||||||
this.curBookPath = data.textBook.curBookPath
|
this.curBookPath = data.textBook.curBookPath
|
||||||
this.checkFileList = []
|
this.checkFileList = []
|
||||||
|
this.currentWorkList = []
|
||||||
let cata = parseCataByNode(data.node)
|
let cata = parseCataByNode(data.node)
|
||||||
this.currentNode = data.node
|
this.currentNode = data.node
|
||||||
this.uploadData.levelFirstId = cata[0]
|
this.uploadData.levelFirstId = cata[0]
|
||||||
|
|
Loading…
Reference in New Issue