fix: 问题修复
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user