Przeglądaj źródła

fix: 查看报告 listen,play问题修复

TIANYONG 1 miesiąc temu
rodzic
commit
adbdbe7d6e

+ 6 - 1
src/page-instrument/view-evaluat-report/index.tsx

@@ -83,6 +83,7 @@ export default defineComponent({
       headerHide: false,
       musicalNotesPlayStats: [] as any[],
       userMeasureScore: {} as any,
+      isSpecialReport: false, // 是否是特殊的评测记录(含有listent、play等曲子的评测记录,非选段状态下可能返回的评测数据不是从第1小节开始的,这种情况需要兼容处理)
     });
     const getAPPData = async () => {
       const screenData = await isSpecialShapedScreen();
@@ -269,7 +270,10 @@ export default defineComponent({
       // console.log(1111,notes)
       for (const note of notes) {
         const idx = note.musicalNotesIndex !== undefined ? note.musicalNotesIndex : note.index;
-        const active = allNote.value[idx];
+        let active = allNote.value[idx];
+        if (detailData.isSpecialReport) {
+          active = allNote.value.find((item: any) => item.i === idx)
+        }        
         setTimeout(() => {
           if (useedid.value.includes(active.id)) {
             return;
@@ -412,6 +416,7 @@ export default defineComponent({
       beams.forEach((item: any) => {
         item.classList.add(styles.beam);
       });
+      detailData.isSpecialReport = startMeasureNum > 0 && detailData.musicalNotesPlayStats?.[0]?.musicalNotesIndex != 0;
       //setPathColor();
       setViewColor();
       // setMearureColor();

+ 2 - 2
vite.config.ts

@@ -76,8 +76,8 @@ export default defineConfig({
         // target: "https://kt.colexiu.com",
         // target: "https://test.lexiaoya.cn",
         // target: "https://kt.colexiu.com",
-        target: "https://test.resource.colexiu.com", // 内容平台开发环境,内容平台开发,需在url链接上加上isCbs=true
-        // target: "https://test.kt.colexiu.com",
+        // target: "https://test.resource.colexiu.com", // 内容平台开发环境,内容平台开发,需在url链接上加上isCbs=true
+        target: "https://test.kt.colexiu.com",
         // target: "https://mec.colexiu.com",
         changeOrigin: true,
         rewrite: (path) => path.replace(/^\/instrument/, ""),