Commit 5d016c03 by lijiabin

【需求 21402】 wip: 暂时加入私信页面

parent d15d4d58
......@@ -189,6 +189,12 @@ export const constantsRoute = [
name: 'Auction',
component: () => import('@/views/auction/index.vue'),
},
// 我的私信
{
path: 'selfMessage',
name: 'CultureSelfMessage',
component: () => import('@/views/selfMessage/index.vue'),
},
],
},
......
......@@ -168,7 +168,6 @@ import { generateLoginKey, hasOfficialAccount } from '@/api'
import type { OfficialAccountItemDto } from '@/api/user/types'
import { wxLogin } from '@/utils/wxUtil'
import type { RouteLocationNormalizedLoadedGeneric } from 'vue-router'
import type { TabPaneName } from 'element-plus'
import { IS_REAL_KEY } from '@/constants/symbolKey'
import { useOnlineTimeStore, useUserStore } from '@/stores'
import BackButton from '@/components/common/BackButton/index.vue'
......@@ -182,10 +181,11 @@ const route = useRoute()
// 当前激活的菜单 用计算属性 好办法!
const activeMenu = computed(() => {
const path = route.path
console.log(path, 'path')
if (path.includes('userPage')) {
return path.split('/').at(-1) || 'selfPublish'
return path || '/userPage/selfPublish'
}
return 'selfPublish'
return '/userPage/selfPublish'
})
const getThirdLevelKey = (route: RouteLocationNormalizedLoadedGeneric) => {
......@@ -202,71 +202,77 @@ const { userInfo } = storeToRefs(userStore)
// 左侧普通用户菜单
const menuUserItems = [
{
path: 'selfPublish',
path: '/userPage/selfPublish',
label: '我的帖子',
icon: () => <IEpUser />,
tab: '发布',
},
{
path: 'selfDraft',
path: '/userPage/selfDraft',
label: '我的草稿',
icon: () => <IEpDocument />,
tab: '草稿',
},
{
path: 'selfCollect',
path: '/userPage/selfCollect',
label: '我的收藏',
icon: () => <IEpStar />,
tab: '收藏',
},
{
path: 'selfPraise',
path: '/userPage/selfPraise',
label: '我的点赞',
icon: () => <IEpPointer />,
tab: '点赞',
},
{
path: 'selfCase',
path: '/userPage/selfCase',
label: '我的案例库',
icon: () => <IEpCollection />,
tab: '案例库',
},
{
path: 'selfTask',
path: '/userPage/selfTask',
label: '我的任务',
icon: () => <IEpFinished />,
tab: '任务',
},
{
path: 'selfActivity',
path: '/userPage/selfActivity',
label: '参与活动',
icon: () => <IEpTrophy />,
tab: '活动',
},
{
path: 'selfComment',
path: '/userPage/selfComment',
label: '评论回复',
icon: () => <IEpChatDotRound />,
tab: '评论回复',
},
{
path: 'selfAnswer',
path: '/userPage/selfAnswer',
label: '回答问题(问吧)',
icon: () => <IEpChatLineSquare />,
tab: '回答问题',
},
{
path: '/selfMessage',
label: '我的私信',
icon: () => <IEpMessage />,
tab: '我的私信',
},
]
// 左侧官方账号菜单
const menuOfficialItems = [
{
path: 'selfAudit',
path: '/userPage/selfAudit',
label: '审核列表',
icon: () => <IEpUser />,
tab: '审核列表',
},
{
path: 'selfComplaint',
path: '/userPage/selfComplaint',
label: '举报列表',
icon: () => <IEpWarning />,
tab: '举报列表',
......@@ -296,8 +302,8 @@ const currentUserInfo = computed(() =>
},
)
const changeMenu = (key: TabPaneName) => {
router.push(`/userPage/${key}`)
const changeMenu = (key: string) => {
router.push(key)
}
const handleEdit = () => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment