jichoi / lms_front star
이은진 이은진 08-14
240814 이은진 단어장 수정
@b9bf0be2a3c88da981a0bc8e3c12ef4b7a595655
 
client/resources/img/img2_1.png (Binary) (added)
+++ client/resources/img/img2_1.png
Binary file is not shown
 
client/resources/img/img2_2.png (Binary) (added)
+++ client/resources/img/img2_2.png
Binary file is not shown
 
client/resources/img/img2_3.png (Binary) (added)
+++ client/resources/img/img2_3.png
Binary file is not shown
client/views/pages/main/Chapter/Chapter2.vue
--- client/views/pages/main/Chapter/Chapter2.vue
+++ client/views/pages/main/Chapter/Chapter2.vue
@@ -14,78 +14,86 @@
       <div class="content title-box">
         <p class="title mt25 title-bg">STEP 2 - 단어로 공부하는 영어</p>
         <div class="flex align-center mb30">
-          <p class="subtitle2 mr20"></p> 
+          <p class="subtitle2 mr20"></p>
         </div>
 
         <div class="flex justify-center">
-              <div class="vocaGroup">
-                <div class="flex justify-between mb80">
-                    <article class="flex align-center">
-                        <div class="imgGroup mr30"><img src="../../../../resources/img/img40_s.png" data-num="1"></div>
-                        <div class="flex align-start">
-                            <button class="listen-btn mr30" data-video="1" tabindex="0" aria-label="음성 재생"><img src="../../../../resources/img/btn10_s.png"
-                                data-num="1" @click="playAudio"></button>
-                                <audio id="audio-player" src="client/resources/audio/family.wav" preload="auto"></audio>
-                           <div>
-                                <h3>sidewalk</h3>
-                                   <div class="flex align-center mt10">
-                                      <p class="yellow-box">명</p>
-                                      <span class="title1">보도</span>
-                                   </div>
-                           </div>
-                        </div>
-                    </article>
-                    <article class="flex align-center">
-                        <div class="imgGroup mr30"><img src="../../../../resources/img/31img40_s.png" data-num="1"></div>
-                        <div class="flex align-start">
-                            <button class="listen-btn mr30" data-video="1" tabindex="0" aria-label="음성 재생"><img src="../../../../resources/img/btn10_s.png"
-                                data-num="1" @click="playAudio"></button>
-                                <audio id="audio-player" src="client/resources/audio/bank.wav" preload="auto"></audio>
-                           <div>
-                                <h3>sidewalk</h3>
-                                   <div class="flex align-center mt10">
-                                      <p class="yellow-box">명</p>
-                                      <span class="title1">보도</span>
-                                   </div>
-                           </div>
-                        </div>
-                    </article>
+          <div class="vocaGroup">
+            <div class="flex justify-between mb80">
+              <article class="flex align-center">
+                <div class="imgGroup mr30"><img src="../../../../resources/img/img2_1.png" data-num="1" style="width: 200px;
+"></div>
+                <div class="flex align-start">
+                  <button class="listen-btn mr30" data-video="1" tabindex="0" aria-label="음성 재생">
+                    <img src="../../../../resources/img/btn10_s.png" data-num="1" @click="playAudio('audio-family')">
+                  </button>
+                  <audio id="audio-family" src="client/resources/audio/family.wav" preload="auto"></audio>
+                  <div>
+                    <h3>family</h3>
+                    <div class="flex align-center mt10">
+                      <p class="yellow-box">명</p>
+                      <span class="title1">가족</span>
+                    </div>
+                  </div>
                 </div>
-                <div class="flex justify-between">
-                    <article class="flex align-center">
-                        <div class="imgGroup mr30"><img src="../../../../resources/img/img41_s.png" data-num="1"></div>
-                        <div class="flex align-start">
-                            <button class="listen-btn mr30" data-video="1" tabindex="0" aria-label="음성 재생"><img src="../../../../resources/img/btn10_s.png"
-                                data-num="1" @click="playAudio"></button>
-                                <audio id="audio-player" src="client/resources/audio/love.wav" preload="auto"></audio>
-                           <div>
-                                <h3>sidewalk</h3>
-                                   <div class="flex align-center mt10">
-                                      <p class="yellow-box">명</p>
-                                      <span class="title1">보도</span>
-                                   </div>
-                           </div>
-                        </div>
-                    </article>
-                    <article class="flex align-center">
-                        <div class="imgGroup mr30"><img src="../../../../resources/img/img40_s.png" data-num="1"></div>
-                        <div class="flex align-start">
-                            <button class="listen-btn mr30" data-video="1" tabindex="0" aria-label="음성 재생"><img src="../../../../resources/img/btn10_s.png"
-                                data-num="1" @click="playAudio"></button>
-                                <audio id="audio-player" src="client/resources/audio/police.wav" preload="auto"></audio>
-                           <div>
-                                <h3>sidewalk</h3>
-                                   <div class="flex align-center mt10">
-                                      <p class="yellow-box">명</p>
-                                      <span class="title1">보도</span>
-                                   </div>
-                           </div>
-                        </div>
-                    </article>
+              </article>
+              <article class="flex align-center">
+                <div class="imgGroup mr30"><img src="../../../../resources/img/img2_4.png" data-num="1" style="width: 200px;
+"></div>
+                <div class="flex align-start">
+                  <button class="listen-btn mr30" data-video="1" tabindex="0" aria-label="음성 재생">
+                    <img src="../../../../resources/img/btn10_s.png" data-num="1" @click="playAudio('audio-bank')">
+                  </button>
+                  <audio id="audio-bank" src="client/resources/audio/bank.wav" preload="auto"></audio>
+                  <div>
+                    <h3>bank</h3>
+                    <div class="flex align-center mt10">
+                      <p class="yellow-box">명</p>
+                      <span class="title1">은행</span>
+                    </div>
+                  </div>
                 </div>
-              </div>
+              </article>
+            </div>
+            <div class="flex justify-between">
+              <article class="flex align-center">
+                <div class="imgGroup mr30"><img src="../../../../resources/img/img2_2.png" data-num="1" style="width: 200px;
+"></div>
+                <div class="flex align-start">
+                  <button class="listen-btn mr30" data-video="1" tabindex="0" aria-label="음성 재생">
+                    <img src="../../../../resources/img/btn10_s.png" data-num="1" @click="playAudio('audio-love')">
+                  </button>
+                  <audio id="audio-love" src="client/resources/audio/love.wav" preload="auto"></audio>
+                  <div>
+                    <h3>love</h3>
+                    <div class="flex align-center mt10">
+                      <p class="yellow-box">명</p>
+                      <span class="title1">사랑</span>
+                    </div>
+                  </div>
+                </div>
+              </article>
+              <article class="flex align-center">
+                <div class="imgGroup mr30"><img src="../../../../resources/img/img2_3.png" data-num="1" style="width: 200px;
+"></div>
+                <div class="flex align-start">
+                  <button class="listen-btn mr30" data-video="1" tabindex="0" aria-label="음성 재생">
+                    <img src="../../../../resources/img/btn10_s.png" data-num="1" @click="playAudio('audio-police')">
+                  </button>
+                  <audio id="audio-police" src="client/resources/audio/police.wav" preload="auto"></audio>
+                  <div>
+                    <h3>police</h3>
+                    <div class="flex align-center mt10">
+                      <p class="yellow-box">명</p>
+                      <span class="title1">경찰</span>
+                    </div>
+                  </div>
+                </div>
+              </article>
+            </div>
           </div>
         </div>
+      </div>
       <div class="next-btn" @click="goToPage('Chapter2_3')"><img src="../../../../resources/img/right.png" alt=""></div>
     </div>
   </div>
@@ -94,17 +102,20 @@
 <script>
 export default {
   data() {
-    return { 
+    return {
     }
   },
   methods: {
     goToPage(page) {
       this.$router.push({ name: page });
-    },playAudio() {
-         const audio = document.getElementById('audio-player');
-         audio.play();
-         console.log("playing")
+    }, playAudio(audioId) {
+      const audio = document.getElementById(audioId);
+      if (audio) {
+        audio.play();
+      } else {
+        console.error(`Audio element with ID ${audioId} not found.`);
       }
+    },
   },
   watch: {
 
Add a comment
List