lint fix
parent
c9cf30692f
commit
3c9bb74b61
|
@ -67,11 +67,10 @@ exports.createWindow = async userApi => {
|
||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
global.modules.userApiWindow.webContents.session.setPermissionRequestHandler((webContents, permission, callback) => {
|
global.modules.userApiWindow.webContents.session.setPermissionRequestHandler((webContents, permission, resolve) => {
|
||||||
if (webContents === global.modules.mainWindow.webContents) return callback(true)
|
if (webContents === global.modules.mainWindow.webContents) return resolve(true)
|
||||||
|
|
||||||
// eslint-disable-next-line node/no-callback-literal
|
resolve(false)
|
||||||
callback(false)
|
|
||||||
})
|
})
|
||||||
global.modules.userApiWindow.webContents.setWindowOpenHandler(() => {
|
global.modules.userApiWindow.webContents.setWindowOpenHandler(() => {
|
||||||
return { action: 'deny' }
|
return { action: 'deny' }
|
||||||
|
|
|
@ -165,7 +165,7 @@ contextBridge.exposeInMainWorld('lx', {
|
||||||
headers: resp.headers,
|
headers: resp.headers,
|
||||||
bytes: resp.bytes,
|
bytes: resp.bytes,
|
||||||
raw: resp.raw,
|
raw: resp.raw,
|
||||||
body: body,
|
body,
|
||||||
}, body)
|
}, body)
|
||||||
}).request
|
}).request
|
||||||
|
|
||||||
|
@ -212,7 +212,7 @@ contextBridge.exposeInMainWorld('lx', {
|
||||||
},
|
},
|
||||||
rsaEncrypt(buffer, key) {
|
rsaEncrypt(buffer, key) {
|
||||||
buffer = Buffer.concat([Buffer.alloc(128 - buffer.length), buffer])
|
buffer = Buffer.concat([Buffer.alloc(128 - buffer.length), buffer])
|
||||||
return publicEncrypt({ key: key, padding: constants.RSA_NO_PADDING }, buffer)
|
return publicEncrypt({ key, padding: constants.RSA_NO_PADDING }, buffer)
|
||||||
},
|
},
|
||||||
randomBytes(size) {
|
randomBytes(size) {
|
||||||
return randomBytes(size)
|
return randomBytes(size)
|
||||||
|
|
|
@ -68,7 +68,7 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
setting: setting,
|
setting,
|
||||||
isShowAddMusicTo,
|
isShowAddMusicTo,
|
||||||
nextTogglePlayName,
|
nextTogglePlayName,
|
||||||
toggleNextPlayMode,
|
toggleNextPlayMode,
|
||||||
|
|
|
@ -39,7 +39,7 @@ export default ({ setting }) => {
|
||||||
promise: userApiRequest({
|
promise: userApiRequest({
|
||||||
requestKey,
|
requestKey,
|
||||||
data: {
|
data: {
|
||||||
source: source,
|
source,
|
||||||
action: 'musicUrl',
|
action: 'musicUrl',
|
||||||
info: {
|
info: {
|
||||||
type,
|
type,
|
||||||
|
|
|
@ -81,7 +81,7 @@ export default {
|
||||||
return Promise.resolve({
|
return Promise.resolve({
|
||||||
list,
|
list,
|
||||||
allPage: this.allPage,
|
allPage: this.allPage,
|
||||||
limit: limit,
|
limit,
|
||||||
total: this.total,
|
total: this.total,
|
||||||
source: 'bd',
|
source: 'bd',
|
||||||
})
|
})
|
||||||
|
|
|
@ -66,7 +66,7 @@ export default {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
let encrypted = CryptoJS.AES.encrypt(strData, key, {
|
let encrypted = CryptoJS.AES.encrypt(strData, key, {
|
||||||
iv: iv,
|
iv,
|
||||||
blockSize: 16,
|
blockSize: 16,
|
||||||
mode: CryptoJS.mode.CBC,
|
mode: CryptoJS.mode.CBC,
|
||||||
format: JsonFormatter,
|
format: JsonFormatter,
|
||||||
|
@ -74,9 +74,9 @@ export default {
|
||||||
let ciphertext = encrypted.toString().ct
|
let ciphertext = encrypted.toString().ct
|
||||||
let sign = toMD5('baidu_taihe_music' + ciphertext + timestamp)
|
let sign = toMD5('baidu_taihe_music' + ciphertext + timestamp)
|
||||||
let jsonRet = {
|
let jsonRet = {
|
||||||
timestamp: timestamp,
|
timestamp,
|
||||||
param: ciphertext,
|
param: ciphertext,
|
||||||
sign: sign,
|
sign,
|
||||||
}
|
}
|
||||||
return jsonRet
|
return jsonRet
|
||||||
},
|
},
|
||||||
|
|
|
@ -19,7 +19,7 @@ const aesDecrypt = function(cipherBuffer, mode, key, iv) {
|
||||||
|
|
||||||
const rsaEncrypt = (buffer, key) => {
|
const rsaEncrypt = (buffer, key) => {
|
||||||
buffer = Buffer.concat([Buffer.alloc(128 - buffer.length), buffer])
|
buffer = Buffer.concat([Buffer.alloc(128 - buffer.length), buffer])
|
||||||
return publicEncrypt({ key: key, padding: constants.RSA_NO_PADDING }, buffer)
|
return publicEncrypt({ key, padding: constants.RSA_NO_PADDING }, buffer)
|
||||||
}
|
}
|
||||||
|
|
||||||
export const weapi = object => {
|
export const weapi = object => {
|
||||||
|
|
|
@ -27,7 +27,7 @@ export const setAllowShowUserApiUpdateAlert = (id, enable) => {
|
||||||
export const saveMyList = data => {
|
export const saveMyList = data => {
|
||||||
rendererSend(NAMES.mainWindow.save_playlist, {
|
rendererSend(NAMES.mainWindow.save_playlist, {
|
||||||
type: 'myList',
|
type: 'myList',
|
||||||
data: data,
|
data,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
export const saveDownloadList = list => {
|
export const saveDownloadList = list => {
|
||||||
|
|
Loading…
Reference in New Issue