|
|
|
@ -202,6 +202,7 @@ export default { |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
timer: null, |
|
|
|
|
redisTimer: null, |
|
|
|
|
token: util.local.get(Setting.tokenKey), |
|
|
|
|
statusList: ["待报名", "取消报名", "马上报名", "报名截止", "进入初赛", "已结束"], |
|
|
|
|
endList: ["报名开始", "报名截止", "报名截止", "竞赛开始", "竞赛结束", ""], |
|
|
|
@ -474,15 +475,26 @@ export default { |
|
|
|
|
clearInterval(n) |
|
|
|
|
}) |
|
|
|
|
this.timerList = [] |
|
|
|
|
clearInterval(this.redisTimer) |
|
|
|
|
}, |
|
|
|
|
getData() { |
|
|
|
|
this.loadIns = Loading.service() |
|
|
|
|
this.getList() |
|
|
|
|
if (!Setting.isDev) { |
|
|
|
|
clearInterval(this.redisTimer) |
|
|
|
|
this.redisTimer = setInterval(this.getRedis, 1000) |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
initData() { |
|
|
|
|
this.page = 1 |
|
|
|
|
this.getData() |
|
|
|
|
}, |
|
|
|
|
// 获取redis缓存 |
|
|
|
|
getRedis() { |
|
|
|
|
this.$post(this.api.getRedisCacheCompetition).then(({ data }) => { |
|
|
|
|
data && this.getList() |
|
|
|
|
}).catch(res => {}) |
|
|
|
|
}, |
|
|
|
|
// 获取省份 |
|
|
|
|
getProvince() { |
|
|
|
|
this.$get(this.api.queryProvince).then(({ list }) => { |
|
|
|
|