Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
corporateCulture-qd
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王立鹏
corporateCulture-qd
Commits
e4d665db
Commit
e4d665db
authored
Dec 05, 2025
by
lijiabin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【需求 17679】 perf: 代码优化
parent
1c5d6821
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
254 additions
and
253 deletions
+254
-253
index.vue
src/components/common/ArticleContent/index.vue
+1
-2
index.ts
src/router/index.ts
+2
-250
route.ts
src/router/route.ts
+250
-0
recommendList.vue
src/views/homePage/homeTab/components/recommendList.vue
+1
-1
No files found.
src/components/common/ArticleContent/index.vue
View file @
e4d665db
...
@@ -35,7 +35,7 @@
...
@@ -35,7 +35,7 @@
<!-- 优化后的右侧内容 -->
<!-- 优化后的右侧内容 -->
<div
class=
"flex items-center gap-3"
>
<div
class=
"flex items-center gap-3"
>
<span
<span
class=
"px-3 py-1.5 text-sm font-medium bg-blue-50 text-blue-600 rounded-md hover:bg-blue-100 transition-colors"
"
class=
"px-3 py-1.5 text-sm font-medium bg-blue-50 text-blue-600 rounded-md hover:bg-blue-100 transition-colors"
v-if=
"articleDetail.relateColumn"
v-if=
"articleDetail.relateColumn"
>
>
{{
articleDetail
.
relateColumn
}}
{{
articleDetail
.
relateColumn
}}
...
@@ -52,7 +52,6 @@
...
@@ -52,7 +52,6 @@
</div>
</div>
</div>
</div>
<!-- 帖子内容 -->
<div
class=
"p-6"
>
<div
class=
"p-6"
>
<h1
class=
"text-2xl font-bold text-gray-900 mb-4 leading-tight"
>
<h1
class=
"text-2xl font-bold text-gray-900 mb-4 leading-tight"
>
{{
articleDetail
?.
title
}}
{{
articleDetail
?.
title
}}
...
...
src/router/index.ts
View file @
e4d665db
import
{
createRouter
,
createWebHistory
}
from
'vue-router'
import
{
createRouter
,
createWebHistory
}
from
'vue-router'
import
layoutCulture
from
'@/layoutCulture/index.vue'
import
{
scrollBehavior
}
from
'./scrollStorage'
import
{
scrollBehavior
}
from
'./scrollStorage'
import
{
registerRouterGuards
}
from
'./guards'
import
{
registerRouterGuards
}
from
'./guards'
const
routes
=
[
import
{
constantsRoute
}
from
'./route'
{
path
:
'/'
,
name
:
'Layout'
,
component
:
layoutCulture
,
redirect
:
'/homePage/homeTab'
,
meta
:
{
title
:
'企业文化首页'
,
},
children
:
[
{
path
:
'homePage'
,
name
:
'CultureHomePage'
,
// component: () => import('@/layoutCulture/components/mainContainer.vue'),
component
:
()
=>
import
(
'@/views/homePage/index.vue'
),
children
:
[
{
path
:
'homeTab'
,
name
:
'CultureHomeTab'
,
component
:
()
=>
import
(
'@/views/homePage/homeTab/index.vue'
),
},
{
path
:
'yaTab'
,
name
:
'CultureYaTab'
,
component
:
()
=>
import
(
'@/views/homePage/yaTab/index.vue'
),
},
{
path
:
'askTab'
,
name
:
'CultureAskTab'
,
component
:
()
=>
import
(
'@/views/homePage/askTab/index.vue'
),
},
],
},
// 个人中心
{
path
:
'userPage'
,
name
:
'CultureUserPage'
,
redirect
:
'/userPage/selfPublish'
,
component
:
()
=>
import
(
'@/views/userPage/index.vue'
),
children
:
[
// 我的帖子
{
path
:
'selfPublish'
,
name
:
'CultureSelfPublish'
,
component
:
()
=>
import
(
'@/views/userPage/components/selfPublish.vue'
),
},
// 我的草稿
{
path
:
'selfDraft'
,
name
:
'CultureSelfDraft'
,
component
:
()
=>
import
(
'@/views/userPage/components/selfDraft.vue'
),
},
// 我的收藏
{
path
:
'selfCollect'
,
name
:
'CultureSelfCollect'
,
component
:
()
=>
import
(
'@/views/userPage/components/selfCollect.vue'
),
},
// 我的点赞
{
path
:
'selfPraise'
,
name
:
'CultureSelfPraise'
,
component
:
()
=>
import
(
'@/views/userPage/components/selfPraise.vue'
),
},
// 我的案例库
{
path
:
'selfCase'
,
name
:
'CultureSelfCase'
,
component
:
()
=>
import
(
'@/views/userPage/components/selfCase.vue'
),
},
// 我的任务
{
path
:
'selfTask'
,
name
:
'CultureSelfTask'
,
component
:
()
=>
import
(
'@/views/userPage/components/selfTask.vue'
),
},
// 评论回复
{
path
:
'selfComment'
,
name
:
'CultureSelfComment'
,
component
:
()
=>
import
(
'@/views/userPage/components/selfComment.vue'
),
},
// 回答问题
{
path
:
'selfAnswer'
,
name
:
'CultureSelfAnswer'
,
component
:
()
=>
import
(
'@/views/userPage/components/selfAnswer.vue'
),
},
// 审核帖子列表
{
path
:
'selfAudit'
,
name
:
'CultureSelfAudit'
,
component
:
()
=>
import
(
'@/views/userPage/components/selfAudit.vue'
),
},
// 审核举报列表
{
path
:
'selfComplaint'
,
name
:
'CultureSelfComplaint'
,
component
:
()
=>
import
(
'@/views/userPage/components/selfComplaint.vue'
),
},
],
},
{
path
:
'videoDetail/:id'
,
name
:
'CultureVideoDetail'
,
component
:
()
=>
import
(
'@/views/videoDetail/index.vue'
),
},
{
path
:
'articleDetail/:id'
,
name
:
'CultureArticleDetail'
,
component
:
()
=>
import
(
'@/views/articleDetail/index.vue'
),
},
{
path
:
'pointsStore'
,
name
:
'CulturePointsStore'
,
component
:
()
=>
import
(
'@/views/pointsStore/index.vue'
),
},
// 发布视频
{
path
:
'publishVideo'
,
name
:
'CulturePublishVideo'
,
component
:
()
=>
import
(
'@/views/publishVideo/index.vue'
),
},
// 去投稿
{
path
:
'publishCase'
,
name
:
'CulturePublishCase'
,
component
:
()
=>
import
(
'@/views/publishCase/index.vue'
),
},
// 搜索页面
{
path
:
'searchPage'
,
name
:
'CultureSearchPage'
,
component
:
()
=>
import
(
'@/views/searchPage/index.vue'
),
},
// 审核
{
path
:
'auditArticle/:id'
,
name
:
'CultureAuditArticle'
,
component
:
()
=>
import
(
'@/views/auditArticle/index.vue'
),
},
// 发布文章
// {
// {
// path: 'deshboard',
// name: 'CultureHome',
// component: () => import('@/views/home/index.vue')
// },
// {
// path: 'ya',
// name: 'CultureYa',
// component: () => import('@/views/ya/index.vue')
// },
// {
// path: 'ask',
// name: 'CultureAsk',
// component: () => import('@/views/ask/index.vue')
// }
],
},
{
path
:
'/test'
,
name
:
'Test'
,
component
:
()
=>
import
(
'@/test.vue'
),
},
{
path
:
'/backend'
,
name
:
'Backend'
,
component
:
()
=>
import
(
'@/views/backend/index.vue'
),
redirect
:
'/backend/manager'
,
children
:
[
{
path
:
'manager'
,
name
:
'ManagerManagement'
,
component
:
()
=>
import
(
'@/views/backend/manager/index.vue'
),
meta
:
{
title
:
'企业文化管理员'
},
},
{
path
:
'tags'
,
name
:
'OfficialManagement'
,
component
:
()
=>
import
(
'@/views/backend/tags/index.vue'
),
meta
:
{
title
:
'官方标签'
},
},
{
path
:
'carousel'
,
name
:
'CarouselManagement'
,
component
:
()
=>
import
(
'@/views/backend/carousel/index.vue'
),
meta
:
{
title
:
'轮播图设置'
},
},
// {
// path: 'topic-admin',
// name: 'TopicAdminManagement',
// component: () => import('@/views/backend/topic-admin/index.vue'),
// meta: { title: '专栏——管理员' },
// },
{
path
:
'columnSettings'
,
name
:
'ColumnSettingsManagement'
,
component
:
()
=>
import
(
'@/views/backend/columnSettings/index.vue'
),
meta
:
{
title
:
'专栏——栏目管理'
},
},
// {
// path: 'interview-admin',
// name: 'InterviewAdminManagement',
// component: () => import('@/views/backend/interview-admin/index.vue'),
// meta: { title: '专访——管理员' },
// },
{
path
:
'interviewSettings'
,
name
:
'InterviewSettingsManagement'
,
component
:
()
=>
import
(
'@/views/backend/interviewSettings/index.vue'
),
meta
:
{
title
:
'专访——栏目管理'
},
},
{
path
:
'videoSettings'
,
name
:
'VideoSettingsManagement'
,
component
:
()
=>
import
(
'@/views/backend/videoSettings/index.vue'
),
meta
:
{
title
:
'视频——栏目管理'
},
},
{
path
:
'videoManage'
,
name
:
'VideoManageManagement'
,
component
:
()
=>
import
(
'@/views/backend/videoManage/index.vue'
),
meta
:
{
title
:
'视频管理'
},
},
{
path
:
'caseManage'
,
name
:
'CaseManageManagement'
,
component
:
()
=>
import
(
'@/views/backend/caseManage/index.vue'
),
meta
:
{
title
:
'YAYA案例库管理'
},
},
{
path
:
'goodsManage'
,
name
:
'GoodsManageManagement'
,
component
:
()
=>
import
(
'@/views/backend/goodsManage/index.vue'
),
meta
:
{
title
:
'积分商城——商品配置'
},
},
{
path
:
'goodsDistribution'
,
name
:
'GoodsDistributionManagement'
,
component
:
()
=>
import
(
'@/views/backend/goodsDistribution/index.vue'
),
meta
:
{
title
:
'积分商城——商品分发'
},
},
],
},
]
const
router
=
createRouter
({
const
router
=
createRouter
({
history
:
createWebHistory
(
import
.
meta
.
env
.
BASE_URL
),
history
:
createWebHistory
(
import
.
meta
.
env
.
BASE_URL
),
routes
,
routes
:
constantsRoute
,
// scrollBehavior(to, from, savedPosition) {
// scrollBehavior(to, from, savedPosition) {
// return new Promise((resolve) => {
// return new Promise((resolve) => {
// // console.log(to, from, savedPosition)
// // console.log(to, from, savedPosition)
...
...
src/router/route.ts
0 → 100644
View file @
e4d665db
import
layoutCulture
from
'@/layoutCulture/index.vue'
export
const
constantsRoute
=
[
{
path
:
'/'
,
name
:
'Layout'
,
component
:
layoutCulture
,
redirect
:
'/homePage/homeTab'
,
meta
:
{
title
:
'企业文化首页'
,
},
children
:
[
{
path
:
'homePage'
,
name
:
'CultureHomePage'
,
// component: () => import('@/layoutCulture/components/mainContainer.vue'),
component
:
()
=>
import
(
'@/views/homePage/index.vue'
),
children
:
[
{
path
:
'homeTab'
,
name
:
'CultureHomeTab'
,
component
:
()
=>
import
(
'@/views/homePage/homeTab/index.vue'
),
},
{
path
:
'yaTab'
,
name
:
'CultureYaTab'
,
component
:
()
=>
import
(
'@/views/homePage/yaTab/index.vue'
),
},
{
path
:
'askTab'
,
name
:
'CultureAskTab'
,
component
:
()
=>
import
(
'@/views/homePage/askTab/index.vue'
),
},
],
},
// 个人中心
{
path
:
'userPage'
,
name
:
'CultureUserPage'
,
redirect
:
'/userPage/selfPublish'
,
component
:
()
=>
import
(
'@/views/userPage/index.vue'
),
children
:
[
// 我的帖子
{
path
:
'selfPublish'
,
name
:
'CultureSelfPublish'
,
component
:
()
=>
import
(
'@/views/userPage/components/selfPublish.vue'
),
},
// 我的草稿
{
path
:
'selfDraft'
,
name
:
'CultureSelfDraft'
,
component
:
()
=>
import
(
'@/views/userPage/components/selfDraft.vue'
),
},
// 我的收藏
{
path
:
'selfCollect'
,
name
:
'CultureSelfCollect'
,
component
:
()
=>
import
(
'@/views/userPage/components/selfCollect.vue'
),
},
// 我的点赞
{
path
:
'selfPraise'
,
name
:
'CultureSelfPraise'
,
component
:
()
=>
import
(
'@/views/userPage/components/selfPraise.vue'
),
},
// 我的案例库
{
path
:
'selfCase'
,
name
:
'CultureSelfCase'
,
component
:
()
=>
import
(
'@/views/userPage/components/selfCase.vue'
),
},
// 我的任务
{
path
:
'selfTask'
,
name
:
'CultureSelfTask'
,
component
:
()
=>
import
(
'@/views/userPage/components/selfTask.vue'
),
},
// 评论回复
{
path
:
'selfComment'
,
name
:
'CultureSelfComment'
,
component
:
()
=>
import
(
'@/views/userPage/components/selfComment.vue'
),
},
// 回答问题
{
path
:
'selfAnswer'
,
name
:
'CultureSelfAnswer'
,
component
:
()
=>
import
(
'@/views/userPage/components/selfAnswer.vue'
),
},
// 审核帖子列表
{
path
:
'selfAudit'
,
name
:
'CultureSelfAudit'
,
component
:
()
=>
import
(
'@/views/userPage/components/selfAudit.vue'
),
},
// 审核举报列表
{
path
:
'selfComplaint'
,
name
:
'CultureSelfComplaint'
,
component
:
()
=>
import
(
'@/views/userPage/components/selfComplaint.vue'
),
},
],
},
{
path
:
'videoDetail/:id'
,
name
:
'CultureVideoDetail'
,
component
:
()
=>
import
(
'@/views/videoDetail/index.vue'
),
},
{
path
:
'articleDetail/:id'
,
name
:
'CultureArticleDetail'
,
component
:
()
=>
import
(
'@/views/articleDetail/index.vue'
),
},
{
path
:
'pointsStore'
,
name
:
'CulturePointsStore'
,
component
:
()
=>
import
(
'@/views/pointsStore/index.vue'
),
},
// 发布视频
{
path
:
'publishVideo'
,
name
:
'CulturePublishVideo'
,
component
:
()
=>
import
(
'@/views/publishVideo/index.vue'
),
},
// 去投稿
{
path
:
'publishCase'
,
name
:
'CulturePublishCase'
,
component
:
()
=>
import
(
'@/views/publishCase/index.vue'
),
},
// 搜索页面
{
path
:
'searchPage'
,
name
:
'CultureSearchPage'
,
component
:
()
=>
import
(
'@/views/searchPage/index.vue'
),
},
// 审核
{
path
:
'auditArticle/:id'
,
name
:
'CultureAuditArticle'
,
component
:
()
=>
import
(
'@/views/auditArticle/index.vue'
),
},
// 发布文章
// {
// {
// path: 'deshboard',
// name: 'CultureHome',
// component: () => import('@/views/home/index.vue')
// },
// {
// path: 'ya',
// name: 'CultureYa',
// component: () => import('@/views/ya/index.vue')
// },
// {
// path: 'ask',
// name: 'CultureAsk',
// component: () => import('@/views/ask/index.vue')
// }
],
},
{
path
:
'/test'
,
name
:
'Test'
,
component
:
()
=>
import
(
'@/test.vue'
),
},
{
path
:
'/backend'
,
name
:
'Backend'
,
component
:
()
=>
import
(
'@/views/backend/index.vue'
),
redirect
:
'/backend/manager'
,
children
:
[
{
path
:
'manager'
,
name
:
'ManagerManagement'
,
component
:
()
=>
import
(
'@/views/backend/manager/index.vue'
),
meta
:
{
title
:
'企业文化管理员'
},
},
{
path
:
'tags'
,
name
:
'OfficialManagement'
,
component
:
()
=>
import
(
'@/views/backend/tags/index.vue'
),
meta
:
{
title
:
'官方标签'
},
},
{
path
:
'carousel'
,
name
:
'CarouselManagement'
,
component
:
()
=>
import
(
'@/views/backend/carousel/index.vue'
),
meta
:
{
title
:
'轮播图设置'
},
},
// {
// path: 'topic-admin',
// name: 'TopicAdminManagement',
// component: () => import('@/views/backend/topic-admin/index.vue'),
// meta: { title: '专栏——管理员' },
// },
{
path
:
'columnSettings'
,
name
:
'ColumnSettingsManagement'
,
component
:
()
=>
import
(
'@/views/backend/columnSettings/index.vue'
),
meta
:
{
title
:
'专栏——栏目管理'
},
},
// {
// path: 'interview-admin',
// name: 'InterviewAdminManagement',
// component: () => import('@/views/backend/interview-admin/index.vue'),
// meta: { title: '专访——管理员' },
// },
{
path
:
'interviewSettings'
,
name
:
'InterviewSettingsManagement'
,
component
:
()
=>
import
(
'@/views/backend/interviewSettings/index.vue'
),
meta
:
{
title
:
'专访——栏目管理'
},
},
{
path
:
'videoSettings'
,
name
:
'VideoSettingsManagement'
,
component
:
()
=>
import
(
'@/views/backend/videoSettings/index.vue'
),
meta
:
{
title
:
'视频——栏目管理'
},
},
{
path
:
'videoManage'
,
name
:
'VideoManageManagement'
,
component
:
()
=>
import
(
'@/views/backend/videoManage/index.vue'
),
meta
:
{
title
:
'视频管理'
},
},
{
path
:
'caseManage'
,
name
:
'CaseManageManagement'
,
component
:
()
=>
import
(
'@/views/backend/caseManage/index.vue'
),
meta
:
{
title
:
'YAYA案例库管理'
},
},
{
path
:
'goodsManage'
,
name
:
'GoodsManageManagement'
,
component
:
()
=>
import
(
'@/views/backend/goodsManage/index.vue'
),
meta
:
{
title
:
'积分商城——商品配置'
},
},
{
path
:
'goodsDistribution'
,
name
:
'GoodsDistributionManagement'
,
component
:
()
=>
import
(
'@/views/backend/goodsDistribution/index.vue'
),
meta
:
{
title
:
'积分商城——商品分发'
},
},
],
},
]
src/views/homePage/homeTab/components/recommendList.vue
View file @
e4d665db
...
@@ -46,7 +46,7 @@
...
@@ -46,7 +46,7 @@
</div>
</div>
<div
class=
"flex items-center gap-1 hover:text-yellow-500 transition-colors"
>
<div
class=
"flex items-center gap-1 hover:text-yellow-500 transition-colors"
>
<el-icon
class=
"text-sm"
><Star
/></el-icon>
<el-icon
class=
"text-sm"
><Star
/></el-icon>
<span
class=
"font-medium"
>
{{
item
.
praise
Count
}}
</span>
<span
class=
"font-medium"
>
{{
item
.
collection
Count
}}
</span>
</div>
</div>
<!-- 分隔符 -->
<!-- 分隔符 -->
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment