修复开发模式下页面无法刷新的问题
parent
25ae72cd26
commit
ef50d90a18
|
@ -15,8 +15,11 @@ app.on('second-instance', (event, argv, cwd) => {
|
|||
}
|
||||
})
|
||||
|
||||
const isDev = process.env.NODE_ENV !== 'production'
|
||||
|
||||
app.on('web-contents-created', (event, contents) => {
|
||||
contents.on('will-navigate', (event, navigationUrl) => {
|
||||
if (isDev) return console.log('navigation to url:', navigationUrl)
|
||||
event.preventDefault()
|
||||
})
|
||||
contents.on('new-window', async(event, navigationUrl) => {
|
||||
|
@ -27,7 +30,6 @@ app.on('web-contents-created', (event, contents) => {
|
|||
})
|
||||
})
|
||||
|
||||
const isDev = process.env.NODE_ENV !== 'production'
|
||||
|
||||
// https://github.com/electron/electron/issues/18397
|
||||
app.allowRendererProcessReuse = !isDev
|
||||
|
|
|
@ -2,7 +2,7 @@ import { httpFetch } from '../../request'
|
|||
|
||||
export default {
|
||||
getLyric(songInfo, tryNum = 0) {
|
||||
console.log(songInfo.copyrightId)
|
||||
// console.log(songInfo.copyrightId)
|
||||
if (songInfo.lrcUrl) {
|
||||
let requestObj = httpFetch(songInfo.lrcUrl)
|
||||
requestObj.promise = requestObj.promise.then(({ body, statusCode }) => {
|
||||
|
|
Loading…
Reference in New Issue