Parcourir la source

检查轨迹分与总分的一致性

Michael Wang il y a 4 ans
Parent
commit
56a6d49f70
1 fichiers modifiés avec 12 ajouts et 0 suppressions
  1. 12 0
      src/features/mark/Mark.vue

+ 12 - 0
src/features/mark/Mark.vue

@@ -265,6 +265,18 @@ export default defineComponent({
       }
       if (store.setting.mode !== ModeEnum.TRACK) {
         markResult.trackList = [];
+      } else {
+        const trackScores =
+          (markResult.trackList
+            .map((q) => Math.round((q.score || 0) * 100))
+            .reduce((acc, s) => acc + s) || 0) / 100;
+        if (trackScores !== markResult.markerScore) {
+          message.error({
+            content: "轨迹分与总分不一致,请检查。",
+            duration: 3,
+          });
+          return;
+        }
       }
       if (store.setting.forceSpecialTag) {
         if (