Ver código fonte

Merge branch 'fine-music-score' into jenkins

lex 2 anos atrás
pai
commit
7b6cfba8b2
1 arquivos alterados com 5 adições e 4 exclusões
  1. 5 4
      src/views/musicDetail/index.tsx

+ 5 - 4
src/views/musicDetail/index.tsx

@@ -33,7 +33,7 @@ export default defineComponent({
       getAlumn();
     });
     const state = reactive<IState>({});
-    const img = ref("");
+    const img = ref([]);
     const mp3 = reactive({
       iframe: "",
       audioFileUrl: "",
@@ -47,7 +47,6 @@ export default defineComponent({
         if (Array.isArray(data.background) && data.background.length) {
           const item = data.background[0];
           mp3.audioFileUrl = item.audioFileUrl;
-          console.log(route);
           if (location.host.includes("dev.colexiu") || location.host.includes("192.168")) {
             mp3.iframe = `https://dev.colexiu.com/accompany/colxiu-website.html?id=${id}&part-index=${item.id}`;
           } else {
@@ -55,6 +54,8 @@ export default defineComponent({
           }
         }
         img.value = state.musicImg ? state.musicImg.split(",") : [];
+
+        console.log(img.value);
       } catch (error) {}
     };
     onMounted(() => {
@@ -147,8 +148,8 @@ export default defineComponent({
             <div class={styles.iframe}>
               <div class={styles.sheetName}>{state.musicSheetName}</div>
               <div class={styles.iframeContainer}>
-                {img.value.length <= 0 ? (
-                  <Image src={img.value[0]} />
+                {img.value.length > 0 ? (
+                  img.value.map((i: any) => <Image src={i} />)
                 ) : (
                   <div class={styles.emptyContainer}>
                     <Image class={styles.emptyImg} src={empty} />