xy 1 year ago
parent 2445aed80d
commit 754c6dc3f5

@ -97,6 +97,7 @@ export default {
page: 1,
page_size: 10
},
timer: null,
tableHeight: 120,
loading: false,
list: [],
@ -132,18 +133,21 @@ export default {
}
},
created() {
this.getNotices()
this.getNotices(true)
setInterval(this.getNotices, 5000)
},
beforeDestroy() {
clearInterval(this.timer)
},
mounted() {
this.init()
},
methods: {
test() {
console.log(this.list.abc.ddd)
},
async getNotices() {
async getNotices(loading=false) {
try {
this.loading = true
if (loading) {
this.loading = true
}
const res = await axios.get(`${process.env.VUE_APP_BASE_API}/api/notification/todo`, {
headers: {
'Authorization': `Bearer ${getToken()}`

Loading…
Cancel
Save