change
This commit is contained in:
@@ -48,24 +48,13 @@ export default {
|
|||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
interTime: this.$store.getters.setTime,
|
|
||||||
timer: null,
|
|
||||||
dataInfo: {}
|
dataInfo: {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
this.initData()
|
this.initData()
|
||||||
this.refresh()
|
|
||||||
},
|
|
||||||
beforeDestroy () {
|
|
||||||
clearInterval(this.timer)
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
refresh () {
|
|
||||||
this.timer = setInterval(() => {
|
|
||||||
this.initData()
|
|
||||||
}, this.interTime)
|
|
||||||
},
|
|
||||||
async initData () {
|
async initData () {
|
||||||
let res = await queryHomePage()
|
let res = await queryHomePage()
|
||||||
if (res.code === '1') {
|
if (res.code === '1') {
|
||||||
|
|||||||
Reference in New Issue
Block a user