
--- client/views/pages/main/Chapter/Chapter1_2.vue
+++ client/views/pages/main/Chapter/Chapter1_2.vue
... | ... | @@ -18,7 +18,11 @@ |
18 | 18 |
<button class="completeBtn" @click="complete">학습 종료</button> |
19 | 19 |
</div> |
20 | 20 |
<div class="flex justify-between align-center"> |
21 |
- <div class="pre-btn" @click="goToPage('Chapter1_1')"> |
|
21 |
+ <div |
|
22 |
+ class="pre-btn" |
|
23 |
+ style="visibility: hidden" |
|
24 |
+ @click="goToPage('Chapter1_1')" |
|
25 |
+ > |
|
22 | 26 |
<img src="../../../../resources/img/left.png" alt="" /> |
23 | 27 |
</div> |
24 | 28 |
<div class="content title-box"> |
--- client/views/pages/main/Chapter/Chapter1_3.vue
+++ client/views/pages/main/Chapter/Chapter1_3.vue
... | ... | @@ -18,7 +18,11 @@ |
18 | 18 |
<button class="completeBtn" @click="complete">학습 종료</button> |
19 | 19 |
</div> |
20 | 20 |
<div class="flex justify-between align-center"> |
21 |
- <div class="pre-btn" @click="goToPage('Chapter1_2')"> |
|
21 |
+ <div |
|
22 |
+ class="pre-btn" |
|
23 |
+ style="visibility: hidden" |
|
24 |
+ @click="goToPage('Chapter1_2')" |
|
25 |
+ > |
|
22 | 26 |
<img src="../../../../resources/img/left.png" alt="" /> |
23 | 27 |
</div> |
24 | 28 |
<div class="content title-box"> |
--- client/views/pages/main/Chapter/Chapter2.vue
+++ client/views/pages/main/Chapter/Chapter2.vue
... | ... | @@ -18,8 +18,12 @@ |
18 | 18 |
<button class="completeBtn" @click="complete">학습 종료</button> |
19 | 19 |
</div> |
20 | 20 |
<div class="flex justify-between align-center"> |
21 |
- |
|
22 |
- <div class="pre-btn" @click="goToPage('Chapter1_3')"> <!-- @click="goToPrevPage" --> |
|
21 |
+ <!-- <div class="pre-btn" @click="goToPage('Chapter1_3')"> @click="goToPrevPage" --> |
|
22 |
+ <div |
|
23 |
+ class="pre-btn" |
|
24 |
+ :style="{ visibility: hiddenState ? 'hidden' : 'visible' }" |
|
25 |
+ @click="goToPrevPage" |
|
26 |
+ > |
|
23 | 27 |
<img src="../../../../resources/img/left.png" alt="" /> |
24 | 28 |
</div> |
25 | 29 |
<div class="content title-box"> |
... | ... | @@ -31,14 +35,14 @@ |
31 | 35 |
<div class="flex justify-center"> |
32 | 36 |
<div class="vocaGroup"> |
33 | 37 |
<div |
34 |
- v-for="(word) in wordList" |
|
38 |
+ v-for="word in wordList" |
|
35 | 39 |
:key="word.wdId" |
36 | 40 |
class="flex justify-between mb80 word-item" |
37 | 41 |
> |
38 | 42 |
<article class="flex align-center"> |
39 | 43 |
<div class="imgGroup mr30"> |
40 | 44 |
<img |
41 |
- :src= word.fileRpath |
|
45 |
+ :src="word.fileRpath" |
|
42 | 46 |
data-num="1" |
43 | 47 |
style="width: 200px" |
44 | 48 |
/> |
... | ... | @@ -71,11 +75,11 @@ |
71 | 75 |
</div> |
72 | 76 |
</article> |
73 | 77 |
</div> |
74 |
- |
|
75 | 78 |
</div> |
76 | 79 |
</div> |
77 | 80 |
</div> |
78 |
- <div class="next-btn" @click="goToPage('Chapter2_3')"> <!-- @click="goToNextPage" --> |
|
81 |
+ <div class="next-btn" @click="goToPage('Chapter2_3')"> |
|
82 |
+ <!-- @click="goToNextPage" --> |
|
79 | 83 |
<img src="../../../../resources/img/right.png" alt="" /> |
80 | 84 |
</div> |
81 | 85 |
</div> |
... | ... | @@ -83,7 +87,7 @@ |
83 | 87 |
</template> |
84 | 88 |
|
85 | 89 |
<script> |
86 |
-import axios from 'axios'; |
|
90 |
+import axios from "axios"; |
|
87 | 91 |
|
88 | 92 |
export default { |
89 | 93 |
data() { |
... | ... | @@ -95,14 +99,20 @@ |
95 | 99 |
currentWdBkIndex: 0, // 현재 단어장 인덱스 |
96 | 100 |
wdBookTypeIdState: "", // 이동할 페이지 타입 id |
97 | 101 |
wordBookType: "", // 이동할 페이지 |
102 |
+ |
|
103 |
+ hiddenState: false, |
|
98 | 104 |
}; |
99 | 105 |
}, |
100 | 106 |
methods: { |
101 | 107 |
pageSetting() { |
102 | 108 |
this.currentWdBkIndex = this.$store.getters.getCurrentWdBkIndex; // 현재 단어장 인덱스 |
103 | 109 |
this.wdBookIdList = this.$store.getters.getWdBookIdList; // 단어컨텐츠의 단어장 id 리스트 |
104 |
- this.wdBookId = this.$store.getters.getWdBookIdList[this.currentWdBkIndex] // 현재 단어장 콘텐츠 인덱스에 대한 단어장 id |
|
110 |
+ this.wdBookId = |
|
111 |
+ this.$store.getters.getWdBookIdList[this.currentWdBkIndex]; // 현재 단어장 콘텐츠 인덱스에 대한 단어장 id |
|
105 | 112 |
|
113 |
+ if (this.currentWdBkIndex - 1 < 0) { |
|
114 |
+ this.hiddenState = true; |
|
115 |
+ } |
|
106 | 116 |
// this.fetchWordList(); |
107 | 117 |
}, |
108 | 118 |
|
... | ... | @@ -120,7 +130,10 @@ |
120 | 130 |
file_mng_id: word.fileMngId, |
121 | 131 |
}); |
122 | 132 |
|
123 |
- const fileRpath = fileResponse.data.list.length > 0 ? fileResponse.data.list[0].fileRpath : null; |
|
133 |
+ const fileRpath = |
|
134 |
+ fileResponse.data.list.length > 0 |
|
135 |
+ ? fileResponse.data.list[0].fileRpath |
|
136 |
+ : null; |
|
124 | 137 |
console.log("각 단어의 fileRpath: ", fileRpath); |
125 | 138 |
|
126 | 139 |
word.fileRpath = "http://165.229.169.113:9080/" + fileRpath; // fileRpath 값을 해당 객체에 추가 |
... | ... | @@ -142,38 +155,39 @@ |
142 | 155 |
alert("단어장 첫번째 페이지 입니다"); |
143 | 156 |
} else { |
144 | 157 |
this.currentWdBkIndex--; |
145 |
- this.$store.dispatch('updateCurrentWdBkIndex', this.currentWdBkIndex); |
|
158 |
+ this.$store.dispatch("updateCurrentWdBkIndex", this.currentWdBkIndex); |
|
146 | 159 |
|
147 | 160 |
try { |
148 | 161 |
const response = await axios.post("/wordbook/find.json", { |
149 |
- wdBookId: this.$store.getters.getWdBookIdList[this.currentWdBkIndex] |
|
162 |
+ wdBookId: |
|
163 |
+ this.$store.getters.getWdBookIdList[this.currentWdBkIndex], |
|
150 | 164 |
}); |
151 | 165 |
this.wdBookTypeIdState = response.data.wdBookTypeId; |
152 | 166 |
console.log("이전 단어장 타입 id: ", this.wdBookTypeIdState); |
153 | 167 |
|
154 | 168 |
switch (this.wdBookTypeIdState) { |
155 | 169 |
case "1": |
156 |
- this.wordBookType = "Chapter2"; |
|
157 |
- break; |
|
170 |
+ this.wordBookType = "Chapter2"; |
|
171 |
+ break; |
|
158 | 172 |
case "2": |
159 |
- this.wordBookType = "Chapter2_3"; |
|
160 |
- break; |
|
173 |
+ this.wordBookType = "Chapter2_3"; |
|
174 |
+ break; |
|
161 | 175 |
case "3": |
162 |
- this.wordBookType = "Chapter2_2"; |
|
163 |
- break; |
|
176 |
+ this.wordBookType = "Chapter2_2"; |
|
177 |
+ break; |
|
164 | 178 |
case "4": |
165 |
- this.wordBookType = "Chapter2_9"; |
|
166 |
- break; |
|
179 |
+ this.wordBookType = "Chapter2_9"; |
|
180 |
+ break; |
|
167 | 181 |
case "5": |
168 |
- this.wordBookType = "Chapter2_4"; |
|
169 |
- break; |
|
182 |
+ this.wordBookType = "Chapter2_4"; |
|
183 |
+ break; |
|
170 | 184 |
default: |
171 |
- this.wordBookType = null; |
|
185 |
+ this.wordBookType = null; |
|
172 | 186 |
} |
173 |
- |
|
174 |
- this.goToPage(this.wordBookType); |
|
187 |
+ |
|
188 |
+ this.goToPage(this.wordBookType); |
|
175 | 189 |
} catch (error) { |
176 |
- console.error('단어장 정보 불러오는 중 오류 발생:', error); |
|
190 |
+ console.error("단어장 정보 불러오는 중 오류 발생:", error); |
|
177 | 191 |
} |
178 | 192 |
} |
179 | 193 |
}, |
... | ... | @@ -183,38 +197,39 @@ |
183 | 197 |
alert("단어장 마지막 페이지 입니다"); |
184 | 198 |
} else { |
185 | 199 |
this.currentWdBkIndex++; |
186 |
- this.$store.dispatch('updateCurrentWdBkIndex', this.currentWdBkIndex); |
|
200 |
+ this.$store.dispatch("updateCurrentWdBkIndex", this.currentWdBkIndex); |
|
187 | 201 |
|
188 | 202 |
try { |
189 | 203 |
const response = await axios.post("/wordbook/find.json", { |
190 |
- wdBookId: this.$store.getters.getWdBookIdList[this.currentWdBkIndex] |
|
204 |
+ wdBookId: |
|
205 |
+ this.$store.getters.getWdBookIdList[this.currentWdBkIndex], |
|
191 | 206 |
}); |
192 | 207 |
this.wdBookTypeIdState = response.data.wdBookTypeId; |
193 | 208 |
console.log("다음 단어장 타입 id: ", this.wdBookTypeIdState); |
194 | 209 |
|
195 | 210 |
switch (this.wdBookTypeIdState) { |
196 | 211 |
case "1": |
197 |
- this.wordBookType = "Chapter2"; |
|
198 |
- break; |
|
212 |
+ this.wordBookType = "Chapter2"; |
|
213 |
+ break; |
|
199 | 214 |
case "2": |
200 |
- this.wordBookType = "Chapter2_3"; |
|
201 |
- break; |
|
215 |
+ this.wordBookType = "Chapter2_3"; |
|
216 |
+ break; |
|
202 | 217 |
case "3": |
203 |
- this.wordBookType = "Chapter2_2"; |
|
204 |
- break; |
|
218 |
+ this.wordBookType = "Chapter2_2"; |
|
219 |
+ break; |
|
205 | 220 |
case "4": |
206 |
- this.wordBookType = "Chapter2_9"; |
|
207 |
- break; |
|
221 |
+ this.wordBookType = "Chapter2_9"; |
|
222 |
+ break; |
|
208 | 223 |
case "5": |
209 |
- this.wordBookType = "Chapter2_4"; |
|
210 |
- break; |
|
224 |
+ this.wordBookType = "Chapter2_4"; |
|
225 |
+ break; |
|
211 | 226 |
default: |
212 |
- this.wordBookType = null; |
|
227 |
+ this.wordBookType = null; |
|
213 | 228 |
} |
214 |
- |
|
215 |
- this.goToPage(this.wordBookType); |
|
229 |
+ |
|
230 |
+ this.goToPage(this.wordBookType); |
|
216 | 231 |
} catch (error) { |
217 |
- console.error('단어장 정보 불러오는 중 오류 발생:', error); |
|
232 |
+ console.error("단어장 정보 불러오는 중 오류 발생:", error); |
|
218 | 233 |
} |
219 | 234 |
} |
220 | 235 |
}, |
... | ... | @@ -231,7 +246,6 @@ |
231 | 246 |
console.error(`Audio element with ID ${audioId} not found.`); |
232 | 247 |
} |
233 | 248 |
}, |
234 |
- |
|
235 | 249 |
}, |
236 | 250 |
mounted() { |
237 | 251 |
console.log("챕터2 단어장 마운트 완료"); |
... | ... | @@ -239,7 +253,6 @@ |
239 | 253 |
this.fetchWordList(); |
240 | 254 |
}, |
241 | 255 |
}; |
242 |
- |
|
243 | 256 |
</script> |
244 | 257 |
|
245 | 258 |
<style scoped> |
--- client/views/pages/main/Chapter/Chapter2_2.vue
+++ client/views/pages/main/Chapter/Chapter2_2.vue
... | ... | @@ -18,7 +18,12 @@ |
18 | 18 |
<button class="completeBtn" @click="complete">학습 종료</button> |
19 | 19 |
</div> |
20 | 20 |
<div class="flex justify-between align-center"> |
21 |
- <div class="pre-btn" @click="goToPrevPage"> |
|
21 |
+ <div |
|
22 |
+ class="pre-btn" |
|
23 |
+ :style="{ visibility: hiddenState ? 'hidden' : 'visible' }" |
|
24 |
+ @click="goToPrevPage" |
|
25 |
+ > |
|
26 |
+ > |
|
22 | 27 |
<img src="../../../../resources/img/left.png" alt="" /> |
23 | 28 |
</div> |
24 | 29 |
<div class="content title-box"> |
... | ... | @@ -86,6 +91,7 @@ |
86 | 91 |
wordBookType: "", // 이동할 페이지 |
87 | 92 |
|
88 | 93 |
seq: this.$store.getters.seqNum, |
94 |
+ hiddenState: false, |
|
89 | 95 |
}; |
90 | 96 |
}, |
91 | 97 |
methods: { |
... | ... | @@ -96,6 +102,10 @@ |
96 | 102 |
this.$store.getters.getWdBookIdList[this.currentWdBkIndex]; // 현재 단어장 콘텐츠 인덱스에 대한 단어장 id |
97 | 103 |
console.log(this.wdBookId); |
98 | 104 |
|
105 |
+ if (this.currentWdBkIndex - 1 < 0) { |
|
106 |
+ this.hiddenState = true; |
|
107 |
+ } |
|
108 |
+ |
|
99 | 109 |
this.fetchWordList(); |
100 | 110 |
}, |
101 | 111 |
|
--- client/views/pages/main/Chapter/Chapter2_3.vue
+++ client/views/pages/main/Chapter/Chapter2_3.vue
... | ... | @@ -18,7 +18,11 @@ |
18 | 18 |
<button class="completeBtn" @click="complete">학습 종료</button> |
19 | 19 |
</div> |
20 | 20 |
<div class="flex justify-between align-center"> |
21 |
- <div class="pre-btn" @click="goToPage('Chapter2')"> |
|
21 |
+ <div |
|
22 |
+ class="pre-btn" |
|
23 |
+ :style="{ visibility: hiddenState ? 'hidden' : 'visible' }" |
|
24 |
+ @click="goToPrevPage" |
|
25 |
+ > |
|
22 | 26 |
<!-- @click="goToPrevPage" --> |
23 | 27 |
<img src="../../../../resources/img/left.png" alt="" /> |
24 | 28 |
</div> |
... | ... | @@ -126,6 +130,7 @@ |
126 | 130 |
wordBookType: "", // 이동할 페이지 |
127 | 131 |
|
128 | 132 |
seq: this.$store.getters.seqNum, |
133 |
+ hiddenState: false, |
|
129 | 134 |
}; |
130 | 135 |
}, |
131 | 136 |
methods: { |
... | ... | @@ -135,6 +140,9 @@ |
135 | 140 |
this.wdBookId = |
136 | 141 |
this.$store.getters.getWdBookIdList[this.currentWdBkIndex]; // 현재 단어장 콘텐츠 인덱스에 대한 단어장 id |
137 | 142 |
|
143 |
+ if (this.currentWdBkIndex - 1 < 0) { |
|
144 |
+ this.hiddenState = true; |
|
145 |
+ } |
|
138 | 146 |
// this.fetchWordList(); |
139 | 147 |
}, |
140 | 148 |
|
--- client/views/pages/main/Chapter/Chapter2_4.vue
+++ client/views/pages/main/Chapter/Chapter2_4.vue
... | ... | @@ -18,7 +18,11 @@ |
18 | 18 |
<button class="completeBtn" @click="complete">학습 종료</button> |
19 | 19 |
</div> |
20 | 20 |
<div class="flex justify-between align-center"> |
21 |
- <div class="pre-btn" @click="goToPrevPage"> |
|
21 |
+ <div |
|
22 |
+ class="pre-btn" |
|
23 |
+ :style="{ visibility: hiddenState ? 'hidden' : 'visible' }" |
|
24 |
+ @click="goToPrevPage" |
|
25 |
+ > |
|
22 | 26 |
<img src="../../../../resources/img/left.png" alt="" /> |
23 | 27 |
</div> |
24 | 28 |
<div class="content title-box"> |
... | ... | @@ -92,6 +96,8 @@ |
92 | 96 |
wordBookType: "", // 이동할 페이지 |
93 | 97 |
|
94 | 98 |
seq: this.$store.getters.seqNum, |
99 |
+ |
|
100 |
+ hiddenState: false, |
|
95 | 101 |
}; |
96 | 102 |
}, |
97 | 103 |
methods: { |
... | ... | @@ -101,6 +107,10 @@ |
101 | 107 |
this.wdBookId = |
102 | 108 |
this.$store.getters.getWdBookIdList[this.currentWdBkIndex]; // 현재 단어장 콘텐츠 인덱스에 대한 단어장 id |
103 | 109 |
|
110 |
+ if (this.currentWdBkIndex - 1 < 0) { |
|
111 |
+ this.hiddenState = true; |
|
112 |
+ } |
|
113 |
+ |
|
104 | 114 |
this.fetchWordList(); |
105 | 115 |
}, |
106 | 116 |
|
--- client/views/pages/main/Chapter/Chapter2_9.vue
+++ client/views/pages/main/Chapter/Chapter2_9.vue
... | ... | @@ -18,7 +18,11 @@ |
18 | 18 |
<button class="completeBtn" @click="complete">학습 종료</button> |
19 | 19 |
</div> |
20 | 20 |
<div class="flex justify-between align-center"> |
21 |
- <div class="pre-btn" @click="goToPrevPage"> |
|
21 |
+ <div |
|
22 |
+ class="pre-btn" |
|
23 |
+ :style="{ visibility: hiddenState ? 'hidden' : 'visible' }" |
|
24 |
+ @click="goToPrevPage" |
|
25 |
+ > |
|
22 | 26 |
<img src="../../../../resources/img/left.png" alt="" /> |
23 | 27 |
</div> |
24 | 28 |
<div class="content title-box"> |
... | ... | @@ -139,6 +143,8 @@ |
139 | 143 |
wordBookType: "", // 이동할 페이지 |
140 | 144 |
|
141 | 145 |
seq: this.$store.getters.seqNum, |
146 |
+ |
|
147 |
+ hiddenState: false, |
|
142 | 148 |
}; |
143 | 149 |
}, |
144 | 150 |
methods: { |
... | ... | @@ -148,6 +154,10 @@ |
148 | 154 |
this.wdBookId = |
149 | 155 |
this.$store.getters.getWdBookIdList[this.currentWdBkIndex]; // 현재 단어장 콘텐츠 인덱스에 대한 단어장 id |
150 | 156 |
|
157 |
+ if (this.currentWdBkIndex - 1 < 0) { |
|
158 |
+ this.hiddenState = true; |
|
159 |
+ } |
|
160 |
+ |
|
151 | 161 |
this.fetchWordList(); |
152 | 162 |
}, |
153 | 163 |
|
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?