mirror of
https://github.com/ZZZure/ZZZ-Plugin.git
synced 2025-12-16 21:27:47 +00:00
fix:mysapi、fix:tool
This commit is contained in:
parent
0a3260a186
commit
eb0e86ff3d
2 changed files with 14 additions and 33 deletions
|
|
@ -16,15 +16,21 @@ export default class ZZZApiTool {
|
|||
this.game = 'zzz';
|
||||
this.uuid = crypto.randomUUID();
|
||||
if (['prod_gf_cn'].includes(this.server)) {
|
||||
this.game_biz = '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.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/';
|
||||
}
|
||||
this.zzzUrlMap = {
|
||||
zzzUser: {
|
||||
url: `${this.host}binding/api/getUserGameRolesByCookie`,
|
||||
query: `game_biz=${this.game_biz}®ion=${this.server}&game_uid=${this.uid}`,
|
||||
},
|
||||
zzzNote: {
|
||||
url: `${this.hostRecord}event/game_record_zzz/api/zzz/note`,
|
||||
query: `role_id=${this.uid}&server=${this.server}`,
|
||||
|
|
@ -53,7 +59,7 @@ export default class ZZZApiTool {
|
|||
url: `${this.host}binding/api/genAuthKey`,
|
||||
body: {
|
||||
auth_appid: 'webview_gacha',
|
||||
game_biz: 'nap_cn',
|
||||
game_biz: this.game_biz,
|
||||
game_uid: this.uid * 1,
|
||||
region: this.server,
|
||||
},
|
||||
|
|
@ -67,10 +73,6 @@ export default class ZZZApiTool {
|
|||
zzz: {
|
||||
...(['prod_gf_cn'].includes(this.server)
|
||||
? {
|
||||
zzzUser: {
|
||||
url: `${this.host}binding/api/getUserGameRolesByCookie`,
|
||||
query: `game_biz=nap_cn®ion=${this.server}&game_uid=${this.uid}`,
|
||||
},
|
||||
getFp: {
|
||||
url: `${this.hostPublicData}device-fp/api/getFp`,
|
||||
body: {
|
||||
|
|
@ -86,10 +88,6 @@ export default class ZZZApiTool {
|
|||
},
|
||||
}
|
||||
: {
|
||||
zzzUser: {
|
||||
url: `${this.host}binding/api/getUserGameRolesByCookie`,
|
||||
query: `game_biz=nap_global®ion=${this.server}&game_uid=${this.uid}`,
|
||||
},
|
||||
getFp: {
|
||||
url: `${this.hostPublicData}device-fp/api/getFp`,
|
||||
body: {
|
||||
|
|
@ -110,4 +108,4 @@ export default class ZZZApiTool {
|
|||
};
|
||||
return urlMap[this.game];
|
||||
};
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue