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