Commit ebdc039a authored by Facius's avatar Facius

fix: 学练记录页面时间段选择计算错误

parent 9887aaaf
...@@ -380,14 +380,15 @@ export default { ...@@ -380,14 +380,15 @@ export default {
this.queryExamRecord() this.queryExamRecord()
}, },
nearlySevenDays() { nearlySevenDays() {
return this.nearlyDays(5) return this.nearlyDays(6)
}, },
nearlyThirtyDays() { nearlyThirtyDays() {
return this.nearlyDays(28) return this.nearlyDays(29)
}, },
nearlyDays(day) { nearlyDays(day) {
var end = new Date().getTime() let date = new Date()
var start = new Date().setDate(new Date().getDay() - day) var end = date.getTime()
var start = date.setDate(date.getDate() - day)
var params = { var params = {
startDate: this.$u.timeFormat(start, 'yyyy-mm-dd'), startDate: this.$u.timeFormat(start, 'yyyy-mm-dd'),
endDate: this.$u.timeFormat(end, 'yyyy-mm-dd'), endDate: this.$u.timeFormat(end, 'yyyy-mm-dd'),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment