mirror of
https://github.com/ZZZure/ZZZ-Plugin.git
synced 2025-12-16 21:27:47 +00:00
fix:设备信息
This commit is contained in:
parent
7f27bbf332
commit
d6e52b1a24
8 changed files with 49 additions and 14 deletions
|
|
@ -80,10 +80,7 @@ export class ZZZPlugin extends plugin {
|
|||
handler: this.e?.runtime?.handler || {},
|
||||
e: this.e,
|
||||
});
|
||||
const currentCK = Object.values(ck).find(item => {
|
||||
return item.ck && item.uid === uid;
|
||||
});
|
||||
const ltuid = currentCK?.ltuid || '';
|
||||
const ltuid = await this.getLtuid();
|
||||
if (!ltuid) {
|
||||
this.reply('ltuid为空,请重新绑定CK');
|
||||
throw new Error('ltuid为空');
|
||||
|
|
@ -103,6 +100,7 @@ export class ZZZPlugin extends plugin {
|
|||
deviceType: bindInfo?.deviceName,
|
||||
modelName: bindInfo?.deviceModel,
|
||||
oaid: bindInfo?.oaid,
|
||||
osVersion: bindInfo?.androidVersion,
|
||||
deviceInfo: bindInfo?.deviceFingerprint,
|
||||
board: bindInfo?.deviceBoard,
|
||||
};
|
||||
|
|
@ -150,7 +148,7 @@ export class ZZZPlugin extends plugin {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
deviceFp = await redis.get(`ZZZ:DEVICE_FP:${uid}`);
|
||||
deviceFp = await redis.get(`ZZZ:DEVICE_FP:${uid}:FP`);
|
||||
if (!deviceFp) {
|
||||
const sdk = api.getUrl('getFp');
|
||||
const res = await request(sdk.url, {
|
||||
|
|
@ -161,7 +159,7 @@ export class ZZZPlugin extends plugin {
|
|||
const fpRes = await res.json();
|
||||
deviceFp = fpRes?.data?.device_fp;
|
||||
if (deviceFp) {
|
||||
await redis.set(`ZZZ:DEVICE_FP:${uid}`, deviceFp, {
|
||||
await redis.set(`ZZZ:DEVICE_FP:${uid}:FP`, deviceFp, {
|
||||
EX: 86400 * 7,
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue