From 1dd7fe9fb51660ef5c9d51ce9b6a780f4015abc2 Mon Sep 17 00:00:00 2001 From: kissnavel Date: Sat, 11 Jan 2025 22:18:21 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E6=8B=A6=E6=88=AA=E5=9B=BD=E9=99=85?= =?UTF-8?q?=E6=9C=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/gachalog.js | 12 +++--------- apps/user.js | 6 ++++++ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/apps/gachalog.js b/apps/gachalog.js index 6ded7ee..8fa796e 100644 --- a/apps/gachalog.js +++ b/apps/gachalog.js @@ -157,9 +157,7 @@ export class GachaLog extends ZZZPlugin { } async getLog(key) { const uid = await this.getUID(); - if (!uid) { - return false; - } + if (!uid) return false; this.reply('抽卡记录获取中请稍等...可能需要一段时间,请耐心等待'); const { data, count } = await updateGachaLog(key, uid); let msg = []; @@ -225,9 +223,7 @@ export class GachaLog extends ZZZPlugin { await this.reply('抽卡记录相应功能只支持国服'); return false; } - if (!uid) { - return false; - } + if (!uid) return false; await this.getPlayerInfo(); await this.reply('正在分析抽卡记录,请稍等', false, { at: true, @@ -256,13 +252,11 @@ export class GachaLog extends ZZZPlugin { await this.reply('抽卡记录相应功能只支持国服'); return false; } + if (!uid) return false; if (!this.e.isPrivate || this.e.isGroup) { await this.reply('请私聊获取抽卡链接', false, { at: true }); return false; } - if (!uid) { - return false; - } const key = await getAuthKey(this.e, this.User, uid); if (!key) { await this.reply('authKey获取失败,请检查cookie是否过期'); diff --git a/apps/user.js b/apps/user.js index ebb7473..bc80252 100644 --- a/apps/user.js +++ b/apps/user.js @@ -29,6 +29,10 @@ export class Panel extends ZZZPlugin { } async bindDevice() { const uid = await this.getUID(); + if (/^(1[0-9])[0-9]{8}/i.test(uid)) { + await this.reply('国际服不需要绑定设备'); + return false; + } //先throw一步( this.setContext('toBindDevice'); await this.reply( @@ -97,6 +101,8 @@ export class Panel extends ZZZPlugin { } } async deleteBind() { + const uid = await this.getUID(); + if (/^(1[0-9])[0-9]{8}/i.test(uid)) return false; const ltuid = await this.getLtuid(); await redis.del(`ZZZ:DEVICE_FP:${ltuid}:FP`); await redis.del(`ZZZ:DEVICE_FP:${ltuid}:BIND`);