mirror of
https://github.com/ZZZure/ZZZ-Plugin.git
synced 2025-12-16 21:27:47 +00:00
fix:统一国服与国际服urlMap
This commit is contained in:
parent
0603129ae0
commit
e1dbba6792
1 changed files with 13 additions and 24 deletions
|
|
@ -21,33 +21,29 @@ export default class ZZZApiTool {
|
||||||
this.hostPublicData = 'https://public-data-api.mihoyo.com/';
|
this.hostPublicData = 'https://public-data-api.mihoyo.com/';
|
||||||
} else {
|
} else {
|
||||||
this.host = 'https://sg-public-api.hoyolab.com/';
|
this.host = 'https://sg-public-api.hoyolab.com/';
|
||||||
this.hostNap = '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/';
|
||||||
}
|
}
|
||||||
this.zzzUrlMap = {
|
this.zzzUrlMap = {
|
||||||
zzzUser: {
|
|
||||||
url: `${this.host}binding/api/getUserGameRolesByCookie`,
|
|
||||||
query: `game_biz=nap_cn®ion=${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`,
|
||||||
query: `role_id=${this.uid}&server=${this.server}`,
|
query: `role_id=${this.uid}&server=${this.server}`,
|
||||||
},
|
},
|
||||||
zzzIndex: {
|
zzzIndex: {
|
||||||
url: `${this.hostRecord}event/game_record_zzz/api/zzz/index`,
|
url: `${this.hostRecord}event/game_record_zzz/api/zzz/index`,
|
||||||
query: `role_id=${this.uid}&server=${this.server}`,
|
query: `lang=zh-cn&role_id=${this.uid}&server=${this.server}`,
|
||||||
},
|
},
|
||||||
zzzAvatarList: {
|
zzzAvatarList: {
|
||||||
url: `${this.hostRecord}event/game_record_zzz/api/zzz/avatar/basic`,
|
url: `${this.hostRecord}event/game_record_zzz/api/zzz/avatar/basic`,
|
||||||
query: `role_id=${this.uid}&server=${this.server}`,
|
query: `lang=zh-cn&role_id=${this.uid}&server=${this.server}`,
|
||||||
},
|
},
|
||||||
zzzAvatarInfo: {
|
zzzAvatarInfo: {
|
||||||
url: `${this.hostRecord}event/game_record_zzz/api/zzz/avatar/info`,
|
url: `${this.hostRecord}event/game_record_zzz/api/zzz/avatar/info`,
|
||||||
query: `role_id=${this.uid}&server=${this.server}&need_wiki=false`,
|
query: `lang=zh-cn&role_id=${this.uid}&server=${this.server}&need_wiki=false`,
|
||||||
},
|
},
|
||||||
zzzBuddyList: {
|
zzzBuddyList: {
|
||||||
url: `${this.hostRecord}event/game_record_zzz/api/zzz/buddy/info`,
|
url: `${this.hostRecord}event/game_record_zzz/api/zzz/buddy/info`,
|
||||||
query: `role_id=${this.uid}&server=${this.server}`,
|
query: `lang=zh-cn&role_id=${this.uid}&server=${this.server}`,
|
||||||
},
|
},
|
||||||
zzzAuthKey: {
|
zzzAuthKey: {
|
||||||
url: `${this.host}binding/api/genAuthKey`,
|
url: `${this.host}binding/api/genAuthKey`,
|
||||||
|
|
@ -67,6 +63,10 @@ export default class ZZZApiTool {
|
||||||
zzz: {
|
zzz: {
|
||||||
...(['prod_gf_cn'].includes(this.server)
|
...(['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: {
|
getFp: {
|
||||||
url: `${this.hostPublicData}device-fp/api/getFp`,
|
url: `${this.hostPublicData}device-fp/api/getFp`,
|
||||||
body: {
|
body: {
|
||||||
|
|
@ -82,6 +82,10 @@ export default class ZZZApiTool {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
: {
|
: {
|
||||||
|
zzzUser: {
|
||||||
|
url: `${this.host}binding/api/getUserGameRolesByCookie`,
|
||||||
|
query: `game_biz=nap_cn®ion=${this.server}&game_uid=${this.uid}`,
|
||||||
|
},
|
||||||
getFp: {
|
getFp: {
|
||||||
url: `${this.hostPublicData}device-fp/api/getFp`,
|
url: `${this.hostPublicData}device-fp/api/getFp`,
|
||||||
body: {
|
body: {
|
||||||
|
|
@ -100,21 +104,6 @@ export default class ZZZApiTool {
|
||||||
...this.zzzUrlMap,
|
...this.zzzUrlMap,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
if (/_us|_eu|_jp|_sg/.test(this.server)) {
|
|
||||||
urlMap.zzz.zzzUser.url = `${this.host}binding/api/getUserGameRolesByCookie`;
|
|
||||||
urlMap.zzz.zzzUser.query = `game_biz=nap_global®ion=${this.server}&game_uid=${this.uid}`;
|
|
||||||
urlMap.zzz.zzzNote.url = `${this.hostNap}event/game_record_zzz/api/zzz/note`;
|
|
||||||
urlMap.zzz.zzzNote.query = `role_id=${this.uid}&server=${this.server}`;
|
|
||||||
urlMap.zzz.zzzIndex.url = `${this.hostNap}event/game_record_zzz/api/zzz/index`;
|
|
||||||
urlMap.zzz.zzzIndex.query = `lang=zh-cn&role_id=${this.uid}&server=${this.server}`;
|
|
||||||
urlMap.zzz.zzzAvatarList.url = `${this.hostNap}event/game_record_zzz/api/zzz/avatar/basic`;
|
|
||||||
urlMap.zzz.zzzAvatarList.query = `lang=zh-cn&role_id=${this.uid}&server=${this.server}`;
|
|
||||||
urlMap.zzz.zzzAvatarInfo.url = `${this.hostNap}event/game_record_zzz/api/zzz/avatar/info`;
|
|
||||||
urlMap.zzz.zzzAvatarInfo.query = `lang=zh-cn&role_id=${this.uid}&server=${this.server}&need_wiki=false`;
|
|
||||||
urlMap.zzz.zzzBuddyList.url = `${this.hostNap}event/game_record_zzz/api/zzz/buddy/info`;
|
|
||||||
urlMap.zzz.zzzBuddyList.query = `lang=zh-cn&role_id=${this.uid}&server=${this.server}`;
|
|
||||||
}
|
|
||||||
return urlMap[this.game];
|
return urlMap[this.game];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue