Commit 5d016c03 by lijiabin

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

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