mirror of
https://github.com/ZZZure/ZZZ-Plugin.git
synced 2025-12-16 13:17:32 +00:00
feat: 添加练度的计算公式
This commit is contained in:
parent
2c745c256e
commit
8a420e8fe1
3 changed files with 51 additions and 2 deletions
|
|
@ -19,6 +19,10 @@ export class Panel extends ZZZPlugin {
|
|||
reg: `${rulePrefix}(.*)面板(.*)$`,
|
||||
fnc: 'handleRule',
|
||||
},
|
||||
{
|
||||
reg: `${rulePrefix}练度(统计)?$`,
|
||||
fnc: 'proficiency',
|
||||
},
|
||||
],
|
||||
});
|
||||
}
|
||||
|
|
@ -104,4 +108,24 @@ export class Panel extends ZZZPlugin {
|
|||
};
|
||||
await render(this.e, 'panel/card.html', finalData);
|
||||
}
|
||||
async proficiency() {
|
||||
const uid = await this.getUID();
|
||||
if (!uid) return false;
|
||||
const result = getPanelList(uid);
|
||||
|
||||
result.sort((a, b) => {
|
||||
return b.proficiency_score - a.proficiency_score;
|
||||
});
|
||||
|
||||
result.forEach(item => {
|
||||
logger.debug(item.proficiency_score, item);
|
||||
});
|
||||
|
||||
const finalData = {
|
||||
count: result?.length || 0,
|
||||
list: result,
|
||||
};
|
||||
|
||||
// await render(this.e, 'panel/proficiency.html', finalData);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue