mirror of
https://github.com/ZZZure/ZZZ-Plugin.git
synced 2025-12-16 21:27:47 +00:00
fix:bug tip
This commit is contained in:
parent
4ed3555f33
commit
7515b7a526
1 changed files with 3 additions and 2 deletions
|
|
@ -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 };
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue