赛事定时器

Branch_d40a2540
yujialong 2 years ago
parent 3c66cf33dd
commit b7747dcd9b
  1. 16
      src/pages/match/list/index.vue

@ -233,7 +233,7 @@ export default {
'setPage'
]),
getList() {
const load = Loading.service()
// const load = Loading.service()
const { form } = this
this.$post(this.api.competitionPageConditionQueryByOccupationlab, {
pageNum: this.page,
@ -245,7 +245,7 @@ export default {
startTime: form.startTime || null,
publishStatus: form.publishStatus === '' ? null : form.publishStatus
}).then(({ data }) => {
load.close()
// load.close()
const list = data.records
//
this.timer = setInterval(() => {
@ -281,7 +281,7 @@ export default {
this.getData()
}
}).catch(res => {
load.close()
// load.close()
})
},
getData() {
@ -291,12 +291,18 @@ export default {
this.page = 1;
this.getData();
},
// redis
getRedis() {
this.$post(this.api.getRedisCacheCompetition).then(({ data }) => {
data && this.getList()
}).catch(res => {})
},
getData() {
this.getList()
if (!Setting.isDev) {
// if (!Setting.isDev) {
clearInterval(this.redisTimer)
this.redisTimer = setInterval(this.getRedis, 1000)
}
// }
},
add() {
this.$router.push("/match/add");

Loading…
Cancel
Save