|
|
|
@ -59,14 +59,22 @@ export default { |
|
|
|
const seconds = ('0' + this.date.getSeconds()).slice(-2); |
|
|
|
this.curtime = `${hours}:${minutes}:${seconds}` |
|
|
|
this.nowtime = `${year}.${month}.${day} ` + cweeks[wday]; |
|
|
|
setTimeout(()=>{ |
|
|
|
// console.log(this.$router.currentRoute.path) |
|
|
|
let path = this.$router.currentRoute.path; |
|
|
|
if(path=='/'){ |
|
|
|
this.currentPage = 0; |
|
|
|
}else if(path=='/ty'){ |
|
|
|
this.currentPage = 2; |
|
|
|
}else if(path=='/cultrue'){ |
|
|
|
this.currentPage = 1; |
|
|
|
} |
|
|
|
}, 500) |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
this.getTimespan(); |
|
|
|
this.getStat(); |
|
|
|
// this.getWS() |
|
|
|
// setInterval(() => { |
|
|
|
// this.autoChange(); |
|
|
|
// }, 10000); |
|
|
|
}, |
|
|
|
watch: { |
|
|
|
timeCount: { |
|
|
|
@ -100,15 +108,15 @@ export default { |
|
|
|
let that = this |
|
|
|
homeApi.allGroupNum().then(res => { |
|
|
|
// get allTimeData |
|
|
|
const tmpdata = res.data.returnData |
|
|
|
this.day_num = tmpdata.day.noRepeatInNum |
|
|
|
this.week_num_num = tmpdata.week.noRepeatInNum |
|
|
|
this.mon_num = tmpdata.month.noRepeatInNum |
|
|
|
this.year_num = tmpdata.year.noRepeatInNum |
|
|
|
|
|
|
|
this.sumYear_num = tmpdata.sumYear.noRepeatInNum |
|
|
|
|
|
|
|
if(res.data){ |
|
|
|
const tmpdata = res.data.returnData |
|
|
|
this.day_num = tmpdata.day.noRepeatInNum |
|
|
|
this.week_num_num = tmpdata.week.noRepeatInNum |
|
|
|
this.mon_num = tmpdata.month.noRepeatInNum |
|
|
|
this.year_num = tmpdata.year.noRepeatInNum |
|
|
|
|
|
|
|
this.sumYear_num = tmpdata.sumYear.noRepeatInNum |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
getWS(){ |
|
|
|
@ -135,13 +143,13 @@ export default { |
|
|
|
autoChange(){ |
|
|
|
if(this.currentPage==0){ |
|
|
|
this.currentPage = 1; |
|
|
|
this.$router.push({ path: '/'}) |
|
|
|
this.$router.push({ path: '/cultrue'}) |
|
|
|
}else if(this.currentPage==1){ |
|
|
|
this.currentPage = 2; |
|
|
|
this.$router.push({ path: '/cultrue'}) |
|
|
|
this.$router.push({ path: '/ty'}) |
|
|
|
}else{ |
|
|
|
this.currentPage = 0; |
|
|
|
this.$router.push({ path: '/ty'}) |
|
|
|
this.$router.push({ path: '/'}) |
|
|
|
} |
|
|
|
}, |
|
|
|
mouseMove() { |
|
|
|
|