fix:bug tip

This commit is contained in:
bietiaop 2024-07-15 23:32:19 +08:00
parent 4ed3555f33
commit 7515b7a526

View file

@ -41,13 +41,13 @@ export class ZZZPlugin extends plugin {
async getAPI() {
// 直接调用获取 UID
const uid = await this.getUID();
if (!uid) return false;
if (!uid) return { api: null, uid: null, deviceFp: null };
// 获取用户的 cookie
const ck = await getCk(this.e);
// 如果 cookie 不存在或者 cookie 为空,说明没有绑定 cookie
if (!ck || Object.keys(ck).filter(k => ck[k].ck).length === 0) {
await this.reply('尚未绑定cookie请先绑定cookie');
return false;
return { api: null, uid: null, deviceFp: null };
}
try {
@ -74,6 +74,7 @@ export class ZZZPlugin extends plugin {
return { api, uid, deviceFp };
} catch (error) {
this.reply(error.message);
return { api: null, uid: null, deviceFp: null };
}
}