Merge pull request #19 from kissnavel/main

fix:tool
This commit is contained in:
bietiaop 2024-07-17 19:07:26 +08:00 committed by GitHub
commit 47e28f78ba
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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