fix: 问题修复

This commit is contained in:
2025-11-15 19:08:19 +08:00
parent 93f08d5a9f
commit 79b2e9869f
24 changed files with 872 additions and 529 deletions

View File

@@ -104,7 +104,12 @@ const NTRPEvaluatePopup = (props: NTRPEvaluatePopupProps, ref) => {
async function getNtrp() {
const res = await evaluateService.getLastResult();
if (res.code === 0 && res.data.has_ntrp_level) {
setNtrp(res.data.user_ntrp_level);
const match = res.data.user_ntrp_level.match(/-?\d+(\.\d+)?/);
if (!match) {
setNtrp("");
return;
}
setNtrp(match[0] as string);
} else {
setNtrp("");
}
@@ -128,7 +133,7 @@ const NTRPEvaluatePopup = (props: NTRPEvaluatePopupProps, ref) => {
title: "NTRP水平修改成功",
icon: "none",
});
evaCallback.next(true);
evaCallback.next({ flag: true, score: String(ntrp) });
handleClose();
}