mirror of
https://github.com/ZZZure/ZZZ-Plugin.git
synced 2025-12-16 13:17:32 +00:00
update README & fix gacha
This commit is contained in:
parent
f838c0823d
commit
105dc1846f
9 changed files with 328 additions and 15 deletions
|
|
@ -15,6 +15,7 @@ export async function getAuthKey(e, zzzUid, authAppid = 'csc') {
|
|||
if (!User) {
|
||||
throw new Error('未安装逍遥插件,无法自动刷新抽卡链接');
|
||||
}
|
||||
logger.mark(zzzUid);
|
||||
const user = new User(e);
|
||||
await user.getCookie(e);
|
||||
let ck = await user.getStoken(e.user_id);
|
||||
|
|
@ -28,7 +29,9 @@ export async function getAuthKey(e, zzzUid, authAppid = 'csc') {
|
|||
}
|
||||
default:
|
||||
}
|
||||
logger.mark(type);
|
||||
const { url, headers, body } = api.getUrl(type);
|
||||
logger.mark(url);
|
||||
let res = await fetch(url, {
|
||||
method: 'POST',
|
||||
headers,
|
||||
|
|
|
|||
|
|
@ -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]; // 官服
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue