|
@ -1,6 +1,10 @@ |
|
|
<script lang="ts" setup> |
|
|
<script lang="ts" setup> |
|
|
import { formatDate } from '@/utils/formatTime' |
|
|
import { formatDate } from '@/utils/formatTime' |
|
|
import * as NotifyMessageApi from '@/api/system/notify/message' |
|
|
import * as NotifyMessageApi from '@/api/system/notify/message' |
|
|
|
|
|
import avatarImg from '@/assets/imgs/avatar.gif' |
|
|
|
|
|
import { useUserStore } from '@/store/modules/user' |
|
|
|
|
|
const userStore = useUserStore() |
|
|
|
|
|
const avatar = userStore.getUser.avatar ? userStore.getUser.avatar : avatarImg |
|
|
|
|
|
|
|
|
defineOptions({ name: 'Message' }) |
|
|
defineOptions({ name: 'Message' }) |
|
|
|
|
|
|
|
@ -66,7 +70,7 @@ onBeforeUnmount(() => { |
|
|
<div class="message-list"> |
|
|
<div class="message-list"> |
|
|
<template v-for="item in list" :key="item.id"> |
|
|
<template v-for="item in list" :key="item.id"> |
|
|
<div class="message-item"> |
|
|
<div class="message-item"> |
|
|
<img alt="" class="message-icon" src="@/assets/imgs/avatar.gif" /> |
|
|
<img alt="" class="message-icon" :src="avatar" /> |
|
|
<div class="message-content"> |
|
|
<div class="message-content"> |
|
|
<span class="message-title"> |
|
|
<span class="message-title"> |
|
|
{{ item.templateNickname }}:{{ item.templateContent }} |
|
|
{{ item.templateNickname }}:{{ item.templateContent }} |
|
|