update README & fix gacha

This commit is contained in:
bietiaop 2024-07-10 14:47:23 +08:00
parent f838c0823d
commit 105dc1846f
9 changed files with 328 additions and 15 deletions

View file

@ -18,7 +18,7 @@ export default class MysZZZApi extends MysApi {
constructor(uid, cookie, option = {}) {
super(uid, cookie, option, true);
this.uid = uid;
this.server = this.getServer();
this.server = this.getServer(uid);
this.apiTool = new ZZZApiTool(uid, this.server);
if (typeof this.cookie != 'string' && this.cookie) {
let ck =
@ -32,7 +32,7 @@ export default class MysZZZApi extends MysApi {
}
getServer() {
const _uid = this.uid.toString();
const _uid = this.uid?.toString();
if (_uid.length < 10) {
return game_region[0]; // 官服
}