站内信模块:vue3 站内信弹板

This commit is contained in:
YunaiV
2023-01-29 09:26:06 +08:00
parent 8cdae12b34
commit 91dd4a32b1
4 changed files with 88 additions and 57 deletions

View File

@ -43,6 +43,7 @@ export function getUnreadNotifyMessageList() {
})
}
// 获得当前用户的未读站内信数量
export function getUnreadNotifyMessageCount() {
return request({
url: '/system/notify-message/get-unread-count',

View File

@ -9,7 +9,7 @@
<!-- 弹出列表 -->
<el-table v-loading="loading" :data="list">
<el-table-column width="120" property="templateNickname" label="发送人" />
<el-table-column width="180" property="title" label="发送时间">
<el-table-column width="180" property="createTime" label="发送时间">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
@ -49,7 +49,7 @@ export default {
// 首次加载小红点
this.getUnreadCount()
// 轮询刷新小红点
window.timer = setInterval(()=>{
setInterval(() => {
this.getUnreadCount()
},1000 * 60 * 2)
},