mirror of
https://github.com/ZZZure/ZZZ-Plugin.git
synced 2025-12-16 05:07:46 +00:00
fix:刷新角色间隔改为毫秒
This commit is contained in:
parent
f1cc1dd673
commit
715b3f88f4
4 changed files with 18 additions and 12 deletions
|
|
@ -48,8 +48,14 @@ export const getAvatarInfoList = async (api, deviceFp, origin = false) => {
|
|||
},
|
||||
});
|
||||
avatarInfoList.push(data.avatar_list[0]);
|
||||
const time = _.get(settings.getConfig('panel'), 'roleInterval', 3) * 1000;
|
||||
await new Promise(resolve => setTimeout(resolve, time));
|
||||
const time = _.get(settings.getConfig('panel'), 'roleInterval', 3000);
|
||||
let refresh;
|
||||
if (time > 100) {
|
||||
refresh = time;
|
||||
} else {
|
||||
refresh = 100;
|
||||
}
|
||||
await new Promise(resolve => setTimeout(resolve, refresh));
|
||||
}
|
||||
if (!avatarInfoList?.length) return null;
|
||||
// 是否返回原始数据
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue