You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
881 B
51 lines
881 B
<template> |
|
<div slot="reference" @click="clickNotice"> |
|
<el-badge :value="total" class="item"> |
|
<i class="el-icon-bell"></i> |
|
</el-badge> |
|
</div> |
|
</template> |
|
|
|
<script> |
|
import {messTotal} from '@/api/desk/message' |
|
export default { |
|
name: "top-notice", |
|
data () { |
|
return { |
|
activeName: 'first', |
|
option: { |
|
props: { |
|
img: 'img', |
|
title: 'title', |
|
subtitle: 'subtitle', |
|
tag: 'tag', |
|
status: 'status' |
|
}, |
|
}, |
|
total:0 |
|
} |
|
}, |
|
created () { |
|
this.getTotal() |
|
}, |
|
methods: { |
|
clickNotice(){ |
|
this.$router.push({ |
|
path:'/desk/message' |
|
}) |
|
}, |
|
getTotal(){ |
|
messTotal().then(res =>{ |
|
this.total = res.data.data |
|
}) |
|
} |
|
} |
|
}; |
|
</script> |
|
|
|
<style lang="scss" scoped> |
|
.item { |
|
margin-top: 10px; |
|
margin-right: 40px; |
|
} |
|
</style>
|
|
|