|
|
|
|
@ -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 {
|
|
|
|
|
if (loading) {
|
|
|
|
|
this.loading = true
|
|
|
|
|
}
|
|
|
|
|
const res = await axios.get(`${process.env.VUE_APP_BASE_API}/api/notification/todo`, {
|
|
|
|
|
headers: {
|
|
|
|
|
'Authorization': `Bearer ${getToken()}`
|
|
|
|
|
|