mirror of
				https://github.com/continew-org/continew-admin-ui.git
				synced 2025-10-31 22:57:15 +08:00 
			
		
		
		
	chore: 优化通知公告跳转消息中心的方式
This commit is contained in:
		| @@ -21,6 +21,7 @@ | |||||||
| <script setup lang="ts"> | <script setup lang="ts"> | ||||||
| import { onMounted } from 'vue' | import { onMounted } from 'vue' | ||||||
| import { type MessageResp, listMessage, readMessage } from '@/apis' | import { type MessageResp, listMessage, readMessage } from '@/apis' | ||||||
|  | import router from '@/router' | ||||||
|  |  | ||||||
| const emit = defineEmits<{ | const emit = defineEmits<{ | ||||||
|   (e: 'readall-success'): void |   (e: 'readall-success'): void | ||||||
| @@ -48,7 +49,7 @@ const getMessageData = async () => { | |||||||
|  |  | ||||||
| // 打开消息中心 | // 打开消息中心 | ||||||
| const open = () => { | const open = () => { | ||||||
|   window.open('/user/message?tab=msg') |   router.push({ path: '/user/message', query: { tab: 'msg' } }) | ||||||
| } | } | ||||||
|  |  | ||||||
| // 全部已读 | // 全部已读 | ||||||
|   | |||||||
| @@ -60,7 +60,7 @@ const onDetail = (id: number) => { | |||||||
|  |  | ||||||
| // 打开消息中心 | // 打开消息中心 | ||||||
| const open = () => { | const open = () => { | ||||||
|   window.open('/user/message?tab=notice') |   router.push({ path: '/user/message', query: { tab: 'notice' } }) | ||||||
| } | } | ||||||
|  |  | ||||||
| onMounted(() => { | onMounted(() => { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 KAI
					KAI