删除多余的fp
This commit is contained in:
parent
fc299a9628
commit
3e8e30f329
|
@ -53,7 +53,7 @@ export default class blueprint extends base {
|
||||||
}
|
}
|
||||||
|
|
||||||
async computes (body) {
|
async computes (body) {
|
||||||
let computes = await this.mysApi.getData('blueprintCompute', body)
|
let computes = await this.mysApi.getData('blueprintCompute', { body })
|
||||||
if (!computes || computes.retcode !== 0) return false
|
if (!computes || computes.retcode !== 0) return false
|
||||||
computes = computes.data?.list
|
computes = computes.data?.list
|
||||||
return computes
|
return computes
|
||||||
|
|
|
@ -26,10 +26,7 @@ export default class Calculator extends base {
|
||||||
|
|
||||||
this.mysApi = new MysApi(uid, ck.ck, { log: true })
|
this.mysApi = new MysApi(uid, ck.ck, { log: true })
|
||||||
|
|
||||||
let seed_id = lodash.sample('abcdefghijklmnopqrstuvwxyz0123456789', 16).replace(/,/g, '')
|
let device_fp = await MysInfo.get(this.e, 'getFp')
|
||||||
let device_fp = await MysInfo.get(this.e, 'getFp', {
|
|
||||||
seed_id
|
|
||||||
})
|
|
||||||
this.headers = {
|
this.headers = {
|
||||||
'x-rpc-device_fp': device_fp?.data?.device_fp
|
'x-rpc-device_fp': device_fp?.data?.device_fp
|
||||||
}
|
}
|
||||||
|
@ -243,7 +240,10 @@ export default class Calculator extends base {
|
||||||
}
|
}
|
||||||
|
|
||||||
async computes(body) {
|
async computes(body) {
|
||||||
let computes = await MysInfo.get(this.e, 'compute', body)
|
let computes = await MysInfo.get(this.e, 'compute', {
|
||||||
|
body,
|
||||||
|
headers: this.headers
|
||||||
|
})
|
||||||
if (!computes || computes.retcode !== 0) return false
|
if (!computes || computes.retcode !== 0) return false
|
||||||
computes = computes.data
|
computes = computes.data
|
||||||
|
|
||||||
|
|
|
@ -66,11 +66,11 @@ export default class apiTool {
|
||||||
/** 养成计算器 */
|
/** 养成计算器 */
|
||||||
compute: {
|
compute: {
|
||||||
url: `${host}event/e20200928calculate/v2/compute`,
|
url: `${host}event/e20200928calculate/v2/compute`,
|
||||||
body: data
|
body: data.body
|
||||||
},
|
},
|
||||||
blueprintCompute: {
|
blueprintCompute: {
|
||||||
url: `${host}event/e20200928calculate/v1/furniture/compute`,
|
url: `${host}event/e20200928calculate/v1/furniture/compute`,
|
||||||
body: data
|
body: data.body
|
||||||
},
|
},
|
||||||
/** 养成计算器 */
|
/** 养成计算器 */
|
||||||
blueprint: {
|
blueprint: {
|
||||||
|
@ -178,7 +178,7 @@ export default class apiTool {
|
||||||
compute: {
|
compute: {
|
||||||
url: `${host}event/rpgcalc/compute?`,
|
url: `${host}event/rpgcalc/compute?`,
|
||||||
query:`game=hkrpg`,
|
query:`game=hkrpg`,
|
||||||
body: data
|
body: data.body
|
||||||
},
|
},
|
||||||
/** 详情 */
|
/** 详情 */
|
||||||
detail: {
|
detail: {
|
||||||
|
@ -197,7 +197,7 @@ export default class apiTool {
|
||||||
urlMap.genshin.blueprint.url = 'https://sg-public-api.hoyolab.com/event/calculateos/furniture/blueprint'
|
urlMap.genshin.blueprint.url = 'https://sg-public-api.hoyolab.com/event/calculateos/furniture/blueprint'
|
||||||
urlMap.genshin.blueprint.query = `share_code=${data.share_code}®ion=${this.server}&lang=zh-cn`
|
urlMap.genshin.blueprint.query = `share_code=${data.share_code}®ion=${this.server}&lang=zh-cn`
|
||||||
urlMap.genshin.blueprintCompute.url = 'https://sg-public-api.hoyolab.com/event/calculateos/furniture/compute'
|
urlMap.genshin.blueprintCompute.url = 'https://sg-public-api.hoyolab.com/event/calculateos/furniture/compute'
|
||||||
urlMap.genshin.blueprintCompute.body = { lang: 'zh-cn', ...data }
|
urlMap.genshin.blueprintCompute.body = { lang: 'zh-cn', ...data.body }
|
||||||
urlMap.genshin.ys_ledger.url = 'https://hk4e-api-os.mihoyo.com/event/ysledgeros/month_info'// 支持了国际服札记
|
urlMap.genshin.ys_ledger.url = 'https://hk4e-api-os.mihoyo.com/event/ysledgeros/month_info'// 支持了国际服札记
|
||||||
urlMap.genshin.ys_ledger.query = `lang=zh-cn&month=${data.month}&uid=${this.uid}®ion=${this.server}`
|
urlMap.genshin.ys_ledger.query = `lang=zh-cn&month=${data.month}&uid=${this.uid}®ion=${this.server}`
|
||||||
urlMap.genshin.useCdk.url = 'https://sg-hk4e-api.hoyoverse.com/common/apicdkey/api/webExchangeCdkey'
|
urlMap.genshin.useCdk.url = 'https://sg-hk4e-api.hoyoverse.com/common/apicdkey/api/webExchangeCdkey'
|
||||||
|
|
|
@ -162,7 +162,7 @@ export default class MysInfo {
|
||||||
let mysApi = new MysApi(mysInfo.uid, mysInfo.ckInfo.ck, option, e.isSr, user.device)
|
let mysApi = new MysApi(mysInfo.uid, mysInfo.ckInfo.ck, option, e.isSr, user.device)
|
||||||
|
|
||||||
let device_fp = ''
|
let device_fp = ''
|
||||||
if (!data?.headers?.['x-rpc-device_fp']) {
|
if (!data?.headers?.['x-rpc-device_fp'] && api !== 'getFp') {
|
||||||
device_fp = (await mysApi.getData('getFp')).data?.device_fp
|
device_fp = (await mysApi.getData('getFp')).data?.device_fp
|
||||||
if (data?.headers) {
|
if (data?.headers) {
|
||||||
data.headers['x-rpc-device_fp'] = device_fp
|
data.headers['x-rpc-device_fp'] = device_fp
|
||||||
|
|
|
@ -16,15 +16,10 @@ export default class Note extends base {
|
||||||
}
|
}
|
||||||
|
|
||||||
async getData () {
|
async getData () {
|
||||||
let seed_id = lodash.sample('abcdefghijklmnopqrstuvwxyz0123456789', 16).replace(/,/g, '')
|
let device_fp = await MysInfo.get(this.e, 'getFp')
|
||||||
let device_fp = await MysInfo.get(this.e, 'getFp', {
|
let headers= {'x-rpc-device_fp': device_fp?.data?.device_fp}
|
||||||
seed_id
|
|
||||||
})
|
let res = await MysInfo.get(this.e, 'dailyNote', { headers })
|
||||||
let res = await MysInfo.get(this.e, 'dailyNote', {
|
|
||||||
headers: {
|
|
||||||
'x-rpc-device_fp': device_fp?.data?.device_fp
|
|
||||||
}
|
|
||||||
})
|
|
||||||
let resUser
|
let resUser
|
||||||
if (!res || res.retcode !== 0) return false
|
if (!res || res.retcode !== 0) return false
|
||||||
|
|
||||||
|
@ -33,7 +28,7 @@ export default class Note extends base {
|
||||||
|
|
||||||
let screenData = this.screenData
|
let screenData = this.screenData
|
||||||
if (this.e.isSr) {
|
if (this.e.isSr) {
|
||||||
resUser = await MysInfo.get(this.e, 'UserGame')
|
resUser = await MysInfo.get(this.e, 'UserGame', { headers })
|
||||||
resUser.data?.list?.forEach(v => this.e.uid.includes(v.game_biz))
|
resUser.data?.list?.forEach(v => this.e.uid.includes(v.game_biz))
|
||||||
if (!resUser || resUser.retcode !== 0) return false
|
if (!resUser || resUser.retcode !== 0) return false
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue