fix: 尝试兼容过🐎插件的event

This commit is contained in:
bietiaop 2024-08-23 13:12:48 +08:00
parent c6b5f7ab44
commit 069250f0ee
2 changed files with 20 additions and 2 deletions

View file

@ -64,6 +64,7 @@ export class ZZZPlugin extends plugin {
* @returns {Promise<{api: MysZZZApi, uid: string, deviceFp: string}>}
*/
async getAPI() {
this.e.game = 'zzz';
// 直接调用获取 UID
const uid = await this.getUID();
// 获取用户的 cookie
@ -77,6 +78,7 @@ export class ZZZPlugin extends plugin {
// 创建米游社 API 对象
const api = new MysZZZApi(uid, ck, {
handler: this.e?.runtime?.handler || {},
e: this.e,
});
const currentCK = Object.values(ck).find(item => {
return item.ck && item.uid === uid;