51 lines
948 B
Vue
51 lines
948 B
Vue
<template>
|
|
<div class="right_side_box">
|
|
<h2>获取信息</h2>
|
|
<div class="info_wrapper">
|
|
<div class="ifconfig_info">
|
|
{{result_info}}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import {getLogList} from '@/config/getData2.js'
|
|
export default {
|
|
data () {
|
|
return {
|
|
interTime: this.$store.getters.setTime,
|
|
timer: null,
|
|
result_info: ''
|
|
}
|
|
},
|
|
created () {
|
|
this.initData()
|
|
// this.refresh()
|
|
},
|
|
// beforeDestroy () {
|
|
// clearInterval(this.timer)
|
|
// },
|
|
methods: {
|
|
refresh () {
|
|
this.timer = setInterval(() => {
|
|
this.initData()
|
|
}, this.interTime)
|
|
},
|
|
async initData () {
|
|
let res = await getLogList()
|
|
if (res.code === '1') {
|
|
this.result_info = res.result.result_info
|
|
} else {
|
|
this.toast(res.desc)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="stylus" scoped>
|
|
.ifconfig_info
|
|
font-size .2rem !important
|
|
</style>
|