mirror of
https://github.com/ZZZure/ZZZ-Plugin.git
synced 2025-12-16 21:27:47 +00:00
添加部分国际服支持
This commit is contained in:
parent
dcbd1722d1
commit
a0c3464f4d
2 changed files with 17 additions and 11 deletions
|
|
@ -7,7 +7,6 @@ import MysApi from '../../genshin/model/mys/mysApi.js';
|
|||
// const DEVICE_ID = randomString(32).toUpperCase()
|
||||
const DEVICE_NAME = randomString(_.random(1, 10));
|
||||
const game_region = [
|
||||
'prod_gf_cn',
|
||||
'prod_gf_cn',
|
||||
'prod_gf_us',
|
||||
'prod_gf_eu',
|
||||
|
|
@ -38,13 +37,13 @@ export default class MysZZZApi extends MysApi {
|
|||
}
|
||||
switch (_uid.slice(0, -8)) {
|
||||
case '10':
|
||||
return game_region[2]; // 美服
|
||||
return game_region[1]; // 美服
|
||||
case '15':
|
||||
return game_region[3]; // 欧服
|
||||
return game_region[2]; // 欧服
|
||||
case '13':
|
||||
return game_region[4]; // 亚服
|
||||
return game_region[3]; // 亚服
|
||||
case '17':
|
||||
return game_region[5]; // 港澳台服
|
||||
return game_region[4]; // 港澳台服
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -102,9 +101,9 @@ export default class MysZZZApi extends MysApi {
|
|||
|
||||
getDs(q = '', b = '') {
|
||||
let n = '';
|
||||
if (['prod_gf_cn', 'prod_qd_cn'].includes(this.server)) {
|
||||
if (['prod_gf_cn'].includes(this.server)) {
|
||||
n = 'xV8v4Qu54lUKrEYFZkJhB8cuOh9Asafs';
|
||||
} else if (/prod_gf_/.test(this.server)) {
|
||||
} else {
|
||||
n = 'okr4obncj8bw5a65hbnn5oo6ixjc3l9w';
|
||||
}
|
||||
let t = Math.round(new Date().getTime() / 1000);
|
||||
|
|
@ -140,10 +139,10 @@ export default class MysZZZApi extends MysApi {
|
|||
Referer: 'https://act.hoyolab.com/',
|
||||
};
|
||||
let client;
|
||||
if (/official/.test(this.server)) {
|
||||
client = os;
|
||||
} else {
|
||||
if (['prod_gf_cn'].includes(this.server)) {
|
||||
client = cn;
|
||||
} else {
|
||||
client = os;
|
||||
}
|
||||
return {
|
||||
'x-rpc-app_version': client.app_version,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue