feat:拦截国际服

This commit is contained in:
kissnavel 2025-01-11 22:18:21 +08:00
parent 7ffe3e6451
commit 1dd7fe9fb5
2 changed files with 9 additions and 9 deletions

View file

@ -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`);