wolyshaw před 3 roky
rodič
revize
42dc63df01
1 změnil soubory, kde provedl 6 přidání a 1 odebrání
  1. 6 1
      src/teacher/music/upload/index.tsx

+ 6 - 1
src/teacher/music/upload/index.tsx

@@ -188,7 +188,12 @@ export default defineComponent({
         // this.audioType = res.data.mp3Type
 
         if (this.audioType === 'MP3') {
-          this.hasBeat = res.data.hasBeat || 0
+          this.hasBeat =
+            (res.data.audioType === 'MP3' &&
+              res.data.mp3Type === 'MP3_METRONOME') ||
+            res.data.audioType === 'MIDI'
+              ? 1
+              : 0
           this.mp3Url = res.data.metronomeUrl || res.data.url
         } else {
           this.midiUrl = res.data.midiUrl