

240823 권민수 단어장 아직 학습완료 적용안된 페이지 적용
@f54e18ce8bf27ef7ad453baa5fcf380cf2058024
--- client/views/pages/main/Chapter/Chapter2.vue
+++ client/views/pages/main/Chapter/Chapter2.vue
... | ... | @@ -100,6 +100,7 @@ |
100 | 100 |
wordBookType: "", // 이동할 페이지 |
101 | 101 |
|
102 | 102 |
hiddenState: false, |
103 |
+ seq: this.$store.getters.seqNum, |
|
103 | 104 |
}; |
104 | 105 |
}, |
105 | 106 |
methods: { |
... | ... | @@ -194,6 +195,7 @@ |
194 | 195 |
async goToNextPage() { |
195 | 196 |
if (this.currentWdBkIndex + 1 >= this.wdBookIdList.length) { |
196 | 197 |
alert("단어장 마지막 페이지 입니다"); |
198 |
+ this.complete(); |
|
197 | 199 |
} else { |
198 | 200 |
this.currentWdBkIndex++; |
199 | 201 |
this.$store.dispatch("updateCurrentWdBkIndex", this.currentWdBkIndex); |
... | ... | @@ -245,6 +247,14 @@ |
245 | 247 |
console.error(`Audio element with ID ${audioId} not found.`); |
246 | 248 |
} |
247 | 249 |
}, |
250 |
+ |
|
251 |
+ complete() { |
|
252 |
+ const { unit_id, book_id } = this.$route.query; |
|
253 |
+ this.$router.push({ |
|
254 |
+ name: "Dashboard", |
|
255 |
+ query: { value: this.seq, unit_id, book_id }, |
|
256 |
+ }); |
|
257 |
+ }, |
|
248 | 258 |
}, |
249 | 259 |
mounted() { |
250 | 260 |
console.log("챕터2 단어장 마운트 완료"); |
--- client/views/pages/main/Chapter/Chapter2_3.vue
+++ client/views/pages/main/Chapter/Chapter2_3.vue
... | ... | @@ -191,6 +191,7 @@ |
191 | 191 |
async goToNextPage() { |
192 | 192 |
if (this.currentWdBkIndex + 1 >= this.wdBookIdList.length) { |
193 | 193 |
alert("단어장 마지막 페이지 입니다"); |
194 |
+ this.complete(); |
|
194 | 195 |
} else { |
195 | 196 |
this.currentWdBkIndex++; |
196 | 197 |
this.$store.dispatch("updateCurrentWdBkIndex", this.currentWdBkIndex); |
... | ... | @@ -237,15 +238,18 @@ |
237 | 238 |
query: { value: this.seq, unit_id, book_id }, |
238 | 239 |
}); |
239 | 240 |
}, |
241 |
+ |
|
240 | 242 |
goToPage(page) { |
241 | 243 |
this.$router.push({ name: page }); |
242 | 244 |
}, |
245 |
+ |
|
243 | 246 |
updateContent(index) { |
244 | 247 |
this.selectedIndex = index; |
245 | 248 |
this.currentCon = this.items[index].con; |
246 | 249 |
console.log(this.currentCon.imgSrc); |
247 | 250 |
this.startTimer(); |
248 | 251 |
}, |
252 |
+ |
|
249 | 253 |
startTimer() { |
250 | 254 |
if (this.intervalId) { |
251 | 255 |
clearInterval(this.intervalId); |
... | ... | @@ -259,6 +263,7 @@ |
259 | 263 |
} |
260 | 264 |
}, 1000); |
261 | 265 |
}, |
266 |
+ |
|
262 | 267 |
// 녹음 시작/중지 토글 |
263 | 268 |
async toggleRecording() { |
264 | 269 |
if (this.isRecording) { |
... | ... | @@ -269,6 +274,7 @@ |
269 | 274 |
await this.startRecording(); // 녹음 중이 아니면 녹음 시작 |
270 | 275 |
} |
271 | 276 |
}, |
277 |
+ |
|
272 | 278 |
// 녹음 시작 |
273 | 279 |
async startRecording() { |
274 | 280 |
this.audioChunks = []; // 오디오 초기화 |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?