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