fix:国际服使用“*星琼/*星琼统计”报错ck失效并删除

This commit is contained in:
kissnavel 2024-05-24 21:02:25 +08:00
parent 636d75d179
commit 81a60e782e
2 changed files with 19 additions and 14 deletions

View File

@ -54,11 +54,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":"cabdb93b92180946a97fda15f2b7308069b48b51ff90808bd303d3f18d06e2be","webDriver":"0","colorDepth":"24","pixelRatio":"2.625","packageName":"unknown","packageVersion":"2.27.0","webgl":"6dc666a7a001b1bbc2403ad4fc095a4f3202215efc85fd39a7c5fc79d3603c79"}',
app_name: 'hk4e_global',
device_fp: '38d7ee834d1e9'
device_fp: '38d7f2364db95'
}
}
}),
@ -167,11 +167,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":"cabdb93b92180946a97fda15f2b7308069b48b51ff90808bd303d3f18d06e2be","webDriver":"0","colorDepth":"24","pixelRatio":"2.625","packageName":"unknown","packageVersion":"2.27.0","webgl":"6dc666a7a001b1bbc2403ad4fc095a4f3202215efc85fd39a7c5fc79d3603c79"}',
app_name: 'hkrpg_global',
device_fp: '38d7ee834d1e9'
device_fp: '38d7f2364db95'
}
}
}),
@ -193,10 +193,10 @@ 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&region=${this.server}&uid=${this.uid}&month=${data.month}`
url: 'https://api-takumi.mihoyo.com/event/srledger/month_info',
query: `region=${this.server}&uid=${this.uid}&month=${data.month}`
},
/** 角色详情 */
character: {
@ -237,6 +237,11 @@ export default class apiTool {
urlMap.genshin.useCdk.url = 'https://sg-hk4e-api.hoyoverse.com/common/apicdkey/api/webExchangeCdkey'
urlMap.genshin.useCdk.query = `uid=${this.uid}&region=${this.server}&lang=zh-cn&cdkey=${data.cdk}&game_biz=hk4e_global`
}
if (this.isSr&&this.server.includes('official')) {
urlMap.honkaisr.ys_ledger.url = 'https://sg-public-api.hoyolab.com/event/srledger/month_info'// 区分国际服开拓月历
urlMap.honkaisr.ys_ledger.query = `lang=zh-cn&uid=${this.uid}&region=${this.server}&month=${data.month}`
}
return urlMap[this.game]
}
}

View File

@ -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)) {