瀏覽代碼

fix: 延迟检测bug修复

TIANYONG 1 年之前
父節點
當前提交
57fe73e31d

+ 0 - 3
src/pages/detail/CheckDelayPopup/index.module.less

@@ -3,12 +3,9 @@
     width: 100vw;
     width: 100vw;
     height: 100vh;
     height: 100vh;
     overflow: hidden;
     overflow: hidden;
-    // background-image: url('./image/icon_bg.png');
     background-size: 110% 110%;
     background-size: 110% 110%;
     background-position: center center;
     background-position: center center;
     background-repeat: no-repeat;
     background-repeat: no-repeat;
-    //background: darkblue;
-    // perspective: 500px;
     .delayBg {
     .delayBg {
         position: relative;
         position: relative;
         width: 130%;
         width: 130%;

+ 7 - 1
src/subpages/colexiu/buttons/evaluating.tsx

@@ -302,6 +302,8 @@ const formatTimes = () => {
   // 阶段评测前一个节拍的标示
   // 阶段评测前一个节拍的标示
   let preLyricsContent = ''
   let preLyricsContent = ''
   let preTimes = []
   let preTimes = []
+  let unitTestIdx = 0
+  let preTime = 0
   if (unitTestData.isSelectMeasureMode) {
   if (unitTestData.isSelectMeasureMode) {
     const startIndex = detailState.times.findIndex(
     const startIndex = detailState.times.findIndex(
       (n: any) => n.NoteToGraphicalNoteObjectId == detailState.section[0].NoteToGraphicalNoteObjectId
       (n: any) => n.NoteToGraphicalNoteObjectId == detailState.section[0].NoteToGraphicalNoteObjectId
@@ -309,6 +311,9 @@ const formatTimes = () => {
     const endIndex = detailState.times.findIndex(
     const endIndex = detailState.times.findIndex(
       (n: any) => n.NoteToGraphicalNoteObjectId == detailState.section[1].NoteToGraphicalNoteObjectId
       (n: any) => n.NoteToGraphicalNoteObjectId == detailState.section[1].NoteToGraphicalNoteObjectId
     )
     )
+    if (startIndex > 1) {
+      preTime = detailState.times[startIndex-1].time * 1000
+    }
     times = detailState.times.filter((n: any, index: number) => {
     times = detailState.times.filter((n: any, index: number) => {
       return index >= startIndex && index <= endIndex
       return index >= startIndex && index <= endIndex
     })
     })
@@ -318,6 +323,7 @@ const formatTimes = () => {
     starTime = times[0].sourceRelativeTime || times[0].relativeTime
     starTime = times[0].sourceRelativeTime || times[0].relativeTime
     actualBeatLength = startIndex == 0 && !detailState.needTick ? actualBeatLength : 0
     actualBeatLength = startIndex == 0 && !detailState.needTick ? actualBeatLength : 0
     // console.log("🚀 ~ times", times, '开始小节', startIndex, actualBeatLength)
     // console.log("🚀 ~ times", times, '开始小节', startIndex, actualBeatLength)
+    unitTestIdx = startIndex
   }
   }
   // 找到阶段评测,开始小节前面最近的是play或者listen的小节
   // 找到阶段评测,开始小节前面最近的是play或者listen的小节
   if (preTimes.length) {
   if (preTimes.length) {
@@ -337,7 +343,7 @@ const formatTimes = () => {
   }
   }
   let measureIndex = -1
   let measureIndex = -1
   let recordMeasure = -1
   let recordMeasure = -1
-  let firstNoteTime = times[0].time * 1000
+  let firstNoteTime = unitTestIdx > 1 ? preTime : 0
   for (let index = 0; index < times.length; index++) {
   for (let index = 0; index < times.length; index++) {
     const item = times[index]
     const item = times[index]
     const note = getNoteByMeasuresSlursStart(item)
     const note = getNoteByMeasuresSlursStart(item)

+ 9 - 1
src/subpages/colexiu/buttons/index.module.less

@@ -483,4 +483,12 @@ body {
       min-width: fit-content;
       min-width: fit-content;
     }
     }
   }
   }
-}
+}
+
+body {
+  :global {
+    .popup-scale {
+      margin: 0 !important;
+    }
+  }
+}

+ 1 - 1
src/subpages/colexiu/popups/evaluating/index.module.less

@@ -250,7 +250,7 @@
 .headerButton {
 .headerButton {
   position: absolute;
   position: absolute;
   right: -60px;
   right: -60px;
-  top: -26px;
+  top: -6px;
   display: flex;
   display: flex;
   justify-content: space-between;
   justify-content: space-between;
   align-items: center;
   align-items: center;

+ 3 - 3
src/subpages/colexiu/popups/evaluating/index.tsx

@@ -59,7 +59,7 @@ export default defineComponent({
           },
           },
           body: {
           body: {
             filePath: res?.content?.filePath,
             filePath: res?.content?.filePath,
-            recordId: props.data?.recordId,
+            recordId: props.data?.recordIdStr,
           },
           },
         },
         },
       })
       })
@@ -96,10 +96,10 @@ export default defineComponent({
       if (detailState.isAppPlay || !browserInfo.isStudent) {
       if (detailState.isAppPlay || !browserInfo.isStudent) {
         confirmShow.value = true
         confirmShow.value = true
       } else {
       } else {
-        if (props.data?.recordId) {
+        if (props.data?.recordIdStr) {
           // 上传云端
           // 上传云端
           api_openAdjustRecording({
           api_openAdjustRecording({
-            recordId: String(props.data?.recordId),
+            recordId: String(props.data?.recordIdStr),
             title: detailState.activeDetail?.musicSheetName || "曲谱演奏",
             title: detailState.activeDetail?.musicSheetName || "曲谱演奏",
             coverImg: detailState.activeDetail?.titleImg || '',
             coverImg: detailState.activeDetail?.titleImg || '',
           });
           });