lyc-dev #59
|
@ -85,10 +85,13 @@ function createOpenWin(data) {
|
|||
}
|
||||
})
|
||||
let cookieDetails = { ...data.cookieData }
|
||||
openWindow.webContents.session.cookies.set(cookieDetails).then(()=>{
|
||||
console.log('Cookie set successfully.')
|
||||
}).catch(err =>{
|
||||
console.error('Set cookie failed:', error)
|
||||
console.log(cookieDetails)
|
||||
openWindow.webContents.session.cookies.set(cookieDetails, (error) => {
|
||||
if (error) {
|
||||
console.error('设置cookie出错:', error)
|
||||
} else {
|
||||
console.log('设置cookie成功')
|
||||
}
|
||||
})
|
||||
|
||||
openWindow.loadURL(data.fullPath)
|
||||
|
@ -149,6 +152,7 @@ app.on('ready', () => {
|
|||
createLoginWindow()
|
||||
}
|
||||
mainWindow.destroy()
|
||||
mainWindow = null
|
||||
loginWindow.show()
|
||||
loginWindow.focus()
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue