Skip to content

Commit

Permalink
3학년 기준 타이머 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
kichan05 committed Mar 31, 2022
1 parent 54b8e3e commit b0f95a3
Show file tree
Hide file tree
Showing 2 changed files with 109 additions and 3 deletions.
105 changes: 103 additions & 2 deletions src/assets/TimerData.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Time from "./../Model/Time.js"
import TimerItem from "./../Model/TimerItem.js"

export default [
const timeData1 = [
new TimerItem(
"등교전",
new Time(0, 0, 0),
Expand Down Expand Up @@ -98,4 +98,105 @@ export default [
new Time(23, 59, 59),
"not study"
),
]
]

const timeData2 = [
new TimerItem(
"등교전",
new Time(0, 0, 0),
new Time(8, 29, 0),
"not study"
),
new TimerItem(
"조회",
new Time(8, 30, 0),
new Time(8, 39, 59),
"not study"
),
new TimerItem(
"1교시",
new Time(8, 40, 0),
new Time(9, 20, 59),
"study"
),
new TimerItem(
"1교시 쉬는시간",
new Time(9, 30, 0),
new Time(9, 40, 59),
"not study"
),
new TimerItem(
"2교시",
new Time(9, 41, 0),
new Time(10, 9, 59),
"study"
),
new TimerItem(
"2교시 쉬는시간",
new Time(10, 10, 0),
new Time(10, 19, 59),
"not study"
),
new TimerItem(
"3교시",
new Time(10, 20, 0),
new Time(10, 59, 59),
"study"
),
new TimerItem(
"3교시 쉬는시간",
new Time(11, 0, 0),
new Time(11, 9, 59),
"not study"
),
new TimerItem(
"4교시",
new Time(11, 10, 0),
new Time(11, 49, 59),
"launch"
),
new TimerItem(
"점심시간",
new Time(11, 50, 0),
new Time(12, 49, 59),
"study"
),
new TimerItem(
"5교시",
new Time(12, 50, 0),
new Time(13, 29, 59),
"study"
),
new TimerItem(
"5교시 쉬는시간",
new Time(13, 30, 0),
new Time(13, 39, 59),
"not study"
),
new TimerItem(
"6교시",
new Time(13, 40, 0),
new Time(14, 19, 59),
"study"
),
new TimerItem(
"6교시 쉬는시간",
new Time(14, 20, 0),
new Time(14, 29, 59),
"not study"
),
new TimerItem(
"7교시",
new Time(14, 30, 0),
new Time(15, 9, 59),
"study"
),
new TimerItem(
"방과후",
new Time(15, 10, 0),
new Time(23, 59, 59),
"not study"
),
]

export default [timeData1, timeData2]
7 changes: 6 additions & 1 deletion src/components/main/Timer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</template>

<script>
import TimerData from "./../../assets/TimerData.js"
import TimerDatas from "./../../assets/TimerData.js"
import Time from "./../../Model/Time.js"
// let currentTime
Expand All @@ -31,6 +31,7 @@ import Time from "./../../Model/Time.js"
// let 남은시간_기준시간
let TimerData = TimerDatas[0]
export default {
name : "Timer",
Expand Down Expand Up @@ -72,6 +73,10 @@ export default {
if(this.남은시간.allSecond == 0) location.reload()
}, 500)
setTimeout(()=>{
TimerData = TimerDatas[this.$store.getters.getUserData.grade <= 2 ? 0 : 1]
}, 2000)
}
}
</script>
Expand Down

0 comments on commit b0f95a3

Please sign in to comment.