!173 fix:国际服使用“*星琼/*星琼统计”报错ck失效并删除、ck有多个uid时星铁体力的昵称和等级获取错误
Merge pull request !173 from kissnavel/master
This commit is contained in:
commit
91fd8a9985
|
@ -1,3 +1,4 @@
|
|||
import { randomRange } from './mysApi.js'
|
||||
/**
|
||||
* 整合接口用于查询数据
|
||||
* 方便后续用于解耦
|
||||
|
@ -54,11 +55,11 @@ export default class apiTool {
|
|||
body: {
|
||||
seed_id: data.seed_id,
|
||||
device_id: data.deviceId.toUpperCase(),
|
||||
platform: '1',
|
||||
platform: '5',
|
||||
seed_time: new Date().getTime() + '',
|
||||
ext_fields: `{"proxyStatus":"0","accelerometer":"-0.159515x-0.830887x-0.682495","ramCapacity":"3746","IDFV":"${data.deviceId.toUpperCase()}","gyroscope":"-0.191951x-0.112927x0.632637","isJailBreak":"0","model":"iPhone12,5","ramRemain":"115","chargeStatus":"1","networkType":"WIFI","vendor":"--","osVersion":"17.0.2","batteryStatus":"50","screenSize":"414×896","cpuCores":"6","appMemory":"55","romCapacity":"488153","romRemain":"157348","cpuType":"CPU_TYPE_ARM64","magnetometer":"-84.426331x-89.708435x-37.117889"}`,
|
||||
ext_fields: `{"userAgent":"Mozilla/5.0 (Linux; Android 11; J9110 Build/55.2.A.4.332; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/124.0.6367.179 Mobile Safari/537.36 miHoYoBBSOversea/2.55.0","browserScreenSize":"387904","maxTouchPoints":"5","isTouchSupported":"1","browserLanguage":"zh-CN","browserPlat":"Linux aarch64","browserTimeZone":"Asia/Shanghai","webGlRender":"Adreno (TM) 640","webGlVendor":"Qualcomm","numOfPlugins":"0","listOfPlugins":"unknown","screenRatio":"2.625","deviceMemory":"4","hardwareConcurrency":"8","cpuClass":"unknown","ifNotTrack":"unknown","ifAdBlock":"0","hasLiedLanguage":"0","hasLiedResolution":"1","hasLiedOs":"0","hasLiedBrowser":"0","canvas":"${randomRange()}","webDriver":"0","colorDepth":"24","pixelRatio":"2.625","packageName":"unknown","packageVersion":"2.27.0","webgl":"${randomRange()}"}`,
|
||||
app_name: 'hk4e_global',
|
||||
device_fp: '38d7ee834d1e9'
|
||||
device_fp: '38d7f2364db95'
|
||||
}
|
||||
}
|
||||
}),
|
||||
|
@ -141,7 +142,7 @@ export default class apiTool {
|
|||
...(['prod_gf_cn', 'prod_qd_cn'].includes(this.server) ? {
|
||||
UserGame: {
|
||||
url: `${host}binding/api/getUserGameRolesByCookie`,
|
||||
query: `game_biz=hkrpg_cn`
|
||||
query: `game_biz=hkrpg_cn®ion=${this.server}&game_uid=${this.uid}`
|
||||
},
|
||||
/** 体力接口fp参数用于避开验证码 */
|
||||
getFp: {
|
||||
|
@ -159,7 +160,7 @@ export default class apiTool {
|
|||
} : {
|
||||
UserGame: {
|
||||
url: `${host}binding/api/getUserGameRolesByCookie`,
|
||||
query: `game_biz=hkrpg_global`
|
||||
query: `game_biz=hkrpg_global®ion=${this.server}&game_uid=${this.uid}`
|
||||
},
|
||||
/** 体力接口fp参数用于避开验证码 */
|
||||
getFp: {
|
||||
|
@ -167,11 +168,11 @@ export default class apiTool {
|
|||
body: {
|
||||
seed_id: data.seed_id,
|
||||
device_id: data.deviceId.toUpperCase(),
|
||||
platform: '1',
|
||||
platform: '5',
|
||||
seed_time: new Date().getTime() + '',
|
||||
ext_fields: `{"proxyStatus":"0","accelerometer":"-0.159515x-0.830887x-0.682495","ramCapacity":"3746","IDFV":"${data.deviceId.toUpperCase()}","gyroscope":"-0.191951x-0.112927x0.632637","isJailBreak":"0","model":"iPhone12,5","ramRemain":"115","chargeStatus":"1","networkType":"WIFI","vendor":"--","osVersion":"17.0.2","batteryStatus":"50","screenSize":"414×896","cpuCores":"6","appMemory":"55","romCapacity":"488153","romRemain":"157348","cpuType":"CPU_TYPE_ARM64","magnetometer":"-84.426331x-89.708435x-37.117889"}`,
|
||||
ext_fields: `{"userAgent":"Mozilla/5.0 (Linux; Android 11; J9110 Build/55.2.A.4.332; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/124.0.6367.179 Mobile Safari/537.36 miHoYoBBSOversea/2.55.0","browserScreenSize":"387904","maxTouchPoints":"5","isTouchSupported":"1","browserLanguage":"zh-CN","browserPlat":"Linux aarch64","browserTimeZone":"Asia/Shanghai","webGlRender":"Adreno (TM) 640","webGlVendor":"Qualcomm","numOfPlugins":"0","listOfPlugins":"unknown","screenRatio":"2.625","deviceMemory":"4","hardwareConcurrency":"8","cpuClass":"unknown","ifNotTrack":"unknown","ifAdBlock":"0","hasLiedLanguage":"0","hasLiedResolution":"1","hasLiedOs":"0","hasLiedBrowser":"0","canvas":"${randomRange()}","webDriver":"0","colorDepth":"24","pixelRatio":"2.625","packageName":"unknown","packageVersion":"2.27.0","webgl":"${randomRange()}"}`,
|
||||
app_name: 'hkrpg_global',
|
||||
device_fp: '38d7ee834d1e9'
|
||||
device_fp: '38d7f2364db95'
|
||||
}
|
||||
}
|
||||
}),
|
||||
|
@ -193,7 +194,7 @@ export default class apiTool {
|
|||
url: `${hostRecord}game_record/app/hkrpg/api/avatar/info`,
|
||||
query: `need_wiki=true&role_id=${this.uid}&server=${this.server}`
|
||||
},
|
||||
/** 开拓阅历接口 */
|
||||
/** 开拓月历接口 */
|
||||
ys_ledger: {
|
||||
url: `${host}event/srledger/month_info`,
|
||||
query: `lang=zh-cn®ion=${this.server}&uid=${this.uid}&month=${data.month}`
|
||||
|
|
|
@ -144,15 +144,15 @@ export default class MysApi {
|
|||
client_type: '5',
|
||||
Origin: 'https://webstatic.mihoyo.com',
|
||||
X_Requested_With: 'com.mihoyo.hyperion',
|
||||
Referer: 'https://webstatic.mihoyo.com'
|
||||
Referer: 'https://webstatic.mihoyo.com/'
|
||||
}
|
||||
const os = {
|
||||
app_version: '2.9.0',
|
||||
User_Agent: `Mozilla/5.0 (Linux; Android 12; ${this.device}) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.73 Mobile Safari/537.36 miHoYoBBSOversea/2.9.0`,
|
||||
app_version: '2.55.0',
|
||||
User_Agent: 'Mozilla/5.0 (Linux; Android 11; J9110 Build/55.2.A.4.332; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/124.0.6367.179 Mobile Safari/537.36 miHoYoBBSOversea/2.55.0',
|
||||
client_type: '2',
|
||||
Origin: 'https://webstatic-sea.hoyolab.com',
|
||||
Origin: 'https://act.hoyolab.com',
|
||||
X_Requested_With: 'com.mihoyo.hoyolab',
|
||||
Referer: 'https://webstatic-sea.hoyolab.com'
|
||||
Referer: 'https://act.hoyolab.com/'
|
||||
}
|
||||
let client
|
||||
if (/os_|official/.test(this.server)) {
|
||||
|
@ -230,3 +230,13 @@ export default class MysApi {
|
|||
return result
|
||||
}
|
||||
}
|
||||
|
||||
export function randomRange() {
|
||||
let randomStr = ''
|
||||
let charStr = 'abcdef0123456789'
|
||||
for (let i = 0; i < 64; i++) {
|
||||
let index = Math.round(Math.random() * (charStr.length - 1))
|
||||
randomStr += charStr.substring(index, index + 1)
|
||||
}
|
||||
return randomStr
|
||||
}
|
Loading…
Reference in New Issue