|
|
@ -207,6 +207,7 @@ export default { |
|
|
|
playingStages: [] |
|
|
|
playingStages: [] |
|
|
|
}, |
|
|
|
}, |
|
|
|
timer: null, |
|
|
|
timer: null, |
|
|
|
|
|
|
|
redisTimer: null, |
|
|
|
pickerOptions: { |
|
|
|
pickerOptions: { |
|
|
|
shortcuts: [{ |
|
|
|
shortcuts: [{ |
|
|
|
text: '此刻', |
|
|
|
text: '此刻', |
|
|
@ -247,6 +248,7 @@ export default { |
|
|
|
this.getData() |
|
|
|
this.getData() |
|
|
|
this.$once('hook:beforeDestroy', function() { |
|
|
|
this.$once('hook:beforeDestroy', function() { |
|
|
|
clearInterval(this.timer) |
|
|
|
clearInterval(this.timer) |
|
|
|
|
|
|
|
clearInterval(this.redisTimer) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
@ -300,11 +302,21 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
getData() { |
|
|
|
getData() { |
|
|
|
this.getList() |
|
|
|
this.getList() |
|
|
|
|
|
|
|
if (!Setting.isDev) { |
|
|
|
|
|
|
|
clearInterval(this.redisTimer) |
|
|
|
|
|
|
|
this.redisTimer = setInterval(this.getRedis, 1000) |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
initData() { |
|
|
|
initData() { |
|
|
|
this.page = 1; |
|
|
|
this.page = 1; |
|
|
|
this.getData(); |
|
|
|
this.getData(); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
// 获取redis缓存 |
|
|
|
|
|
|
|
getRedis() { |
|
|
|
|
|
|
|
this.$post(this.api.getRedisCacheCompetition).then(({ data }) => { |
|
|
|
|
|
|
|
data && this.getList() |
|
|
|
|
|
|
|
}).catch(res => {}) |
|
|
|
|
|
|
|
}, |
|
|
|
add() { |
|
|
|
add() { |
|
|
|
this.$router.push("/addMatch"); |
|
|
|
this.$router.push("/addMatch"); |
|
|
|
}, |
|
|
|
}, |
|
|
|