This commit is contained in:
kissnavel 2024-07-17 18:58:38 +08:00
parent 4376e80e74
commit 39016a5f18

View file

@ -16,12 +16,12 @@ export default class ZZZApiTool {
this.game = 'zzz'; this.game = 'zzz';
this.uuid = crypto.randomUUID(); this.uuid = crypto.randomUUID();
if (['prod_gf_cn'].includes(this.server)) { if (['prod_gf_cn'].includes(this.server)) {
this.game_biz = 'nap_cn' this.gameBiz = 'nap_cn';
this.host = 'https://api-takumi.mihoyo.com/'; this.host = 'https://api-takumi.mihoyo.com/';
this.hostRecord = 'https://api-takumi-record.mihoyo.com/'; this.hostRecord = 'https://api-takumi-record.mihoyo.com/';
this.hostPublicData = 'https://public-data-api.mihoyo.com/'; this.hostPublicData = 'https://public-data-api.mihoyo.com/';
} else { } else {
this.game_biz = 'nap_global' this.gameBiz = 'nap_global';
this.host = 'https://sg-public-api.hoyolab.com/'; this.host = 'https://sg-public-api.hoyolab.com/';
this.hostRecord = 'https://sg-act-nap-api.hoyolab.com/'; this.hostRecord = 'https://sg-act-nap-api.hoyolab.com/';
this.hostPublicData = 'https://sg-public-data-api.hoyoverse.com/'; this.hostPublicData = 'https://sg-public-data-api.hoyoverse.com/';
@ -29,7 +29,7 @@ export default class ZZZApiTool {
this.zzzUrlMap = { this.zzzUrlMap = {
zzzUser: { zzzUser: {
url: `${this.host}binding/api/getUserGameRolesByCookie`, url: `${this.host}binding/api/getUserGameRolesByCookie`,
query: `game_biz=${this.game_biz}&region=${this.server}&game_uid=${this.uid}`, query: `game_biz=${this.gameBiz}&region=${this.server}&game_uid=${this.uid}`,
}, },
zzzNote: { zzzNote: {
url: `${this.hostRecord}event/game_record_zzz/api/zzz/note`, url: `${this.hostRecord}event/game_record_zzz/api/zzz/note`,
@ -59,7 +59,7 @@ export default class ZZZApiTool {
url: `${this.host}binding/api/genAuthKey`, url: `${this.host}binding/api/genAuthKey`,
body: { body: {
auth_appid: 'webview_gacha', auth_appid: 'webview_gacha',
game_biz: this.game_biz, game_biz: this.gameBiz,
game_uid: this.uid * 1, game_uid: this.uid * 1,
region: this.server, region: this.server,
}, },