diff --git a/front/src/assets/mynoticeView/other.png b/front/src/assets/mynoticeView/other.png new file mode 100644 index 00000000..91e0bf8f Binary files /dev/null and b/front/src/assets/mynoticeView/other.png differ diff --git a/front/src/views/home/components/header.vue b/front/src/views/home/components/header.vue index 17e0cad5..a74d0874 100644 --- a/front/src/views/home/components/header.vue +++ b/front/src/views/home/components/header.vue @@ -230,17 +230,13 @@ window.sessionStorage.setItem('type', JSON.stringify('PurchaseVehicle')) router.push('/personalCenter') } - onBeforeUnmount(() => { - console.log('卸载getSgcNum========================>') - mybus.off('getSgcNum') - }) const mynoticeNum = ref(0) // 我的消息 const getMynotice = () => { - mynotice({ page: 1, limit: 999, readStatus: 0 }).then((res) => { + mynotice({ page: 1, limit: 3, readStatus: 0 }).then((res) => { console.log('我的消息', res.data.data) mynoticeNum.value = res.data.data.total - mynoticeData.value = res.data.data.list.splice(0, 3) + mynoticeData.value = res.data.data.list }) } const goToView = () => { @@ -288,6 +284,13 @@ console.log('申购车总数========================>', res.data.data.count) }) }) + mybus.on('getMynotice', () => { + getMynotice() + }) + }) + onBeforeUnmount(() => { + mybus.off('getSgcNum') + mybus.off('getMynotice') })