用户信息接口对接Mock数据

This commit is contained in:
付民康
2025-03-17 19:25:02 +08:00
parent babcfda6bf
commit ecdb6e92b9
7 changed files with 17 additions and 13 deletions

View File

@@ -1,6 +1,6 @@
<template>
<router-link to="/personalCenter?status=all&message_type=mr">
<d-badge class="g-notice" :count="counts" :offset="[-2, 4]" :hidden="!counts" status="danger">
<d-badge class="g-notice" :count="accountInfo.noticeUnreadNum" :offset="[-2, 4]" :hidden="!accountInfo.noticeUnreadNum" status="danger">
<d-icon style="font-size: 16px" name="notice" />
</d-badge>
</router-link>
@@ -11,7 +11,9 @@ import { ref, onMounted, onBeforeUnmount } from 'vue';
import { getMessageCount } from '@/api/notice';
import { addEventListener, offEvent } from '@/utils/eventBus';
import debounce from 'lodash/debounce';
import { useAccount } from '@/utils/hooks/useAccount';
const { accountInfo, RemoveInfo } = useAccount();
const counts = ref(9);
const getCounts = () => {
getMessageCount().then((result) => {