jichoi / lms_front star
박민혁 박민혁 09-06
240906 박민혁 문제 페이지 수정
@1619b3ad5deb827ac6e3c9db64f7fdbd44a97fbe
client/views/pages/main/Chapter/Chapter1_2.vue
--- client/views/pages/main/Chapter/Chapter1_2.vue
+++ client/views/pages/main/Chapter/Chapter1_2.vue
@@ -94,7 +94,7 @@
       this.$router.push({ name: page });
     },
     goToNextPage() {
-      alert("지문 학습 완료");
+      alert("지문 학습 완료!");
       this.complete();
     },
     // 대화 지문 API
client/views/pages/main/Chapter/Chapter1_3.vue
--- client/views/pages/main/Chapter/Chapter1_3.vue
+++ client/views/pages/main/Chapter/Chapter1_3.vue
@@ -65,7 +65,7 @@
       this.$router.push({ name: page });
     },
     goToNextPage() {
-      alert("지문 학습 완료");
+      alert("지문 학습 완료!");
       this.complete();
     },
     // 지문 API
client/views/pages/main/Chapter/Chapter2_10.vue
--- client/views/pages/main/Chapter/Chapter2_10.vue
+++ client/views/pages/main/Chapter/Chapter2_10.vue
@@ -159,6 +159,7 @@
       }
       if (this.selectedButton === this.answer) {
         alert("정답입니다!");
+        this.nextProblem();
       } else {
         alert("오답입니다!");
       }
client/views/pages/main/Chapter/Chapter2_11.vue
--- client/views/pages/main/Chapter/Chapter2_11.vue
+++ client/views/pages/main/Chapter/Chapter2_11.vue
@@ -135,6 +135,7 @@
       }
       if (this.selectedButton === this.answer) {
         alert("정답입니다!");
+        this.nextProblem();
       } else {
         alert("오답입니다!");
       }
client/views/pages/main/Chapter/Chapter2_13.vue
--- client/views/pages/main/Chapter/Chapter2_13.vue
+++ client/views/pages/main/Chapter/Chapter2_13.vue
@@ -189,6 +189,7 @@
       }
       if (this.selectedButton === this.answer) {
         alert("정답입니다!");
+        this.nextProblem();
       } else {
         this.correct = true;
       }
client/views/pages/main/Chapter/Chapter2_2.vue
--- client/views/pages/main/Chapter/Chapter2_2.vue
+++ client/views/pages/main/Chapter/Chapter2_2.vue
@@ -32,7 +32,7 @@
           class="flex align-center mb30"
           style="justify-content: space-between; margin-right: 9em"
         >
-          <p class="subtitle2 mr20">카드를 뒤집어 보세요.</p>
+          <p class="subtitle2 mr20">3초마다 뒤집어지는 카드의 단어를 외어보세요!</p>
           <div class="time-bg">
             <div>
               <div class="time">
@@ -190,7 +190,7 @@
 
     async goToNextPage() {
       if (this.currentWdBkIndex + 1 >= this.wdBookIdList.length) {
-        alert("단어장 마지막 페이지 입니다");
+        alert("단어 학습 완료!");
         this.complete();
       } else {
         this.currentWdBkIndex++;
client/views/pages/main/Chapter/Chapter2_3.vue
--- client/views/pages/main/Chapter/Chapter2_3.vue
+++ client/views/pages/main/Chapter/Chapter2_3.vue
@@ -190,7 +190,7 @@
 
     async goToNextPage() {
       if (this.currentWdBkIndex + 1 >= this.wdBookIdList.length) {
-        alert("단어장 마지막 페이지 입니다");
+        alert("단어장 학습 완료!");
         this.complete();
       } else {
         this.currentWdBkIndex++;
client/views/pages/main/Chapter/Chapter2_4.vue
--- client/views/pages/main/Chapter/Chapter2_4.vue
+++ client/views/pages/main/Chapter/Chapter2_4.vue
@@ -194,7 +194,7 @@
 
     async goToNextPage() {
       if (this.currentWdBkIndex + 1 >= this.wdBookIdList.length) {
-        alert("단어장 마지막 페이지 입니다");
+        alert("단어 학습 완료!");
         this.complete();
       } else {
         this.currentWdBkIndex++;
@@ -252,8 +252,10 @@
       setTimeout(() => {
         if (index == 1) {
           alert("정답입니다!");
+          this.goToNextPage();
         } else {
-          alert("오답입니다!");
+          alert("오답입니다! 다시 한번 단어를 듣고 정답을 맞춰보세요!");
+          this.playAudio();
         }
       }, 0);
     },
client/views/pages/main/Chapter/Chapter2_5.vue
--- client/views/pages/main/Chapter/Chapter2_5.vue
+++ client/views/pages/main/Chapter/Chapter2_5.vue
@@ -174,6 +174,7 @@
         setTimeout(() => {
           if (this.userAnswer.join("") === this.answer) {
             alert("정답입니다!");
+            this.nextProblem();
           } else {
             alert("오답입니다!");
           }
client/views/pages/main/Chapter/Chapter2_6.vue
--- client/views/pages/main/Chapter/Chapter2_6.vue
+++ client/views/pages/main/Chapter/Chapter2_6.vue
@@ -145,6 +145,7 @@
       prblm_id: [],
       problemData: [],
       answerArr: [],
+      correctNum: 0,
 
       seq: this.$store.getters.seqNum,
       hiddenState: false,
@@ -174,10 +175,21 @@
       if (this.currentDrag === dropNumber) {
         this.showButton(dropNumber); // 버튼을 보여주고
         this.hideDragButton(dropNumber); // 드래그한 퍼즐은 숨김
+        this.correctNum++;
+
       } else {
         // 오답일 경우 알림 표시
         alert("오답입니다! 다시 시도해보세요.");
       }
+      
+
+      if (this.correctNum === 3) {
+        setTimeout(() => {
+          alert("정답입니다!");
+          this.nextProblem();
+        }, 100);
+      }
+
       // 드래그 후 상태 초기화
       this.currentDrag = null;
     },
client/views/pages/main/Chapter/Chapter2_7.vue
--- client/views/pages/main/Chapter/Chapter2_7.vue
+++ client/views/pages/main/Chapter/Chapter2_7.vue
@@ -157,16 +157,15 @@
         dropZone.innerHTML = ""; // 기존 ? 텍스트 제거
         dropZone.appendChild(cloneElement);
 
-        // 드래그한 버튼 숨기기
-        draggedElement.style.visibility = "hidden";
-
         // DOM 업데이트 후 알림을 비동기적으로 처리
         setTimeout(() => {
           if (this.draggedElementId === this.correctAnswer) {
             alert("정답입니다!");
+            this.nextProblem();
           } else {
             alert("오답입니다!");
-            // window.location.reload();
+            draggedElement.style.visibility = "visible"; // 다시 보이게 하기
+            dropZone.innerHTML = "?"; // 드롭된 영역 초기화
           }
 
           // 드래그 상태 초기화
client/views/pages/main/Chapter/Chapter2_8.vue
--- client/views/pages/main/Chapter/Chapter2_8.vue
+++ client/views/pages/main/Chapter/Chapter2_8.vue
@@ -7,10 +7,7 @@
         </div>
       </router-link>
     </div>
-    <div
-      class="title-box mb25 flex align-center mt40"
-      style="justify-content: space-between"
-    >
+    <div class="title-box mb25 flex align-center mt40" style="justify-content: space-between">
       <div>
         <span class="title mr40">1. Hello WORLD</span>
         <span class="subtitle">my name is dd</span>
@@ -18,11 +15,7 @@
       <button class="completeBtn" @click="complete">학습 종료</button>
     </div>
     <div class="flex justify-between align-center">
-      <div
-        class="pre-btn"
-        :style="{ visibility: hiddenState ? 'hidden' : 'visible' }"
-        @click="previousProblem()"
-      >
+      <div class="pre-btn" :style="{ visibility: hiddenState ? 'hidden' : 'visible' }" @click="previousProblem()">
         <img src="../../../../resources/img/left.png" alt="" />
       </div>
       <div class="content title-box">
@@ -43,27 +36,15 @@
           <div class="dropGroup flex align-center justify-center mt30">
             <div style="position: relative">
               <img src="../../../../resources/img/img28_s.png" alt="" />
-              <button
-                class="dropzone"
-                :data-answer="answerArr[0]"
-                style="left: 30px; top: 167px"
-              >
+              <button class="dropzone" :data-answer="answerArr[0]" style="left: 30px; top: 167px">
                 <img src="../../../../resources/img/img29_s_01.png" alt="" />
                 <p style="font-size: 35px">?</p>
               </button>
-              <button
-                class="dropzone"
-                :data-answer="answerArr[1]"
-                style="right: 409px; top: 133px"
-              >
+              <button class="dropzone" :data-answer="answerArr[1]" style="right: 409px; top: 133px">
                 <img src="../../../../resources/img/img30_s_01.png" alt="" />
                 <p style="font-size: 35px">?</p>
               </button>
-              <button
-                class="dropzone"
-                :data-answer="answerArr[2]"
-                style="right: 46px; top: 128px"
-              >
+              <button class="dropzone" :data-answer="answerArr[2]" style="right: 46px; top: 128px">
                 <img src="../../../../resources/img/img31_s_01.png" alt="" />
                 <p style="font-size: 35px">?</p>
               </button>
@@ -71,31 +52,19 @@
           </div>
           <div class="dragGroup flex justify-center" style="gap: 20px">
             <article style="right: 0; top: 36%">
-              <button
-                class="draggable"
-                :data-text="answerArr[0]"
-                draggable="true"
-              >
+              <button class="draggable" :data-text="answerArr[0]" draggable="true">
                 <img src="../../../../resources/img/img29_s.png" alt="" />
                 <p style="font-size: 35px">{{ answerArr[0] }}</p>
               </button>
             </article>
             <article style="left: 0; top: 36%">
-              <button
-                class="draggable"
-                :data-text="answerArr[1]"
-                draggable="true"
-              >
+              <button class="draggable" :data-text="answerArr[1]" draggable="true">
                 <img src="../../../../resources/img/img30_s.png" alt="" />
                 <p style="font-size: 35px">{{ answerArr[1] }}</p>
               </button>
             </article>
             <article style="left: 50%; top: 10%">
-              <button
-                class="draggable"
-                :data-text="answerArr[2]"
-                draggable="true"
-              >
+              <button class="draggable" :data-text="answerArr[2]" draggable="true">
                 <img src="../../../../resources/img/img31_s.png" alt="" />
                 <p style="font-size: 35px">{{ answerArr[2] }}</p>
               </button>
@@ -124,6 +93,7 @@
       // prblmArr: [],
       seq: this.$store.getters.seqNum,
       hiddenState: false,
+      correctNum: 0,
     };
   },
   methods: {
@@ -141,7 +111,7 @@
       window.location.reload();
     },
     handleDragStart(event) {
-      this.draggedElement = event.target; // 드래그한 요소 저장
+      this.draggedElement = event.target.closest(".draggable");// 드래그한 요소 저장
       event.dataTransfer.setData("text/plain", event.target.dataset.text);
       event.target.style.cursor = "grabbing"; // 드래그 중 커서 변경
     },
@@ -181,12 +151,20 @@
 
           // 드래그한 요소 숨기기
           this.draggedElement.style.display = "none";
+          this.correctNum++;
         } else {
           // 정답이 아닌 경우
           alert("오답입니다! 다시 시도해보세요."); // 오답 경고 메시지
         }
       }
 
+      if (this.correctNum === 3) {
+        setTimeout(() => {
+          alert("정답입니다!");
+          this.nextProblem();
+        }, 100);
+      }
+
       this.draggedElement = null; // 드래그 상태 초기화
     },
     storeProblemId() {
client/views/pages/main/Chapter/Chapter3_3.vue
--- client/views/pages/main/Chapter/Chapter3_3.vue
+++ client/views/pages/main/Chapter/Chapter3_3.vue
@@ -6,7 +6,7 @@
       </router-link>
     </div>
     <div class="title-box mb25 flex align-center mt40">
-      <span class="title mr40">{{ unitData.unit_nm || "(단원 이름 데이터 없음)" }}</span>
+      <span class="title mr40">{{ unitData.unit_nm || "1. Hello WORLD" }}</span>
       <span class="subtitle">my name is dd</span>
     </div>
     <div class="flex justify-between align-center">
Add a comment
List