Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
saas-lab
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
saas-lab
Commits
408c7c72
提交
408c7c72
authored
9月 23, 2026
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: update
上级
40e3ffa1
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
186 行增加
和
189 行删除
+186
-189
App.vue
src/App.vue
+8
-6
Header.vue
src/components/layout/Header.vue
+4
-4
useAppConfig.ts
src/composables/useAppConfig.ts
+174
-177
user.ts
src/stores/user.ts
+0
-2
没有找到文件。
src/App.vue
浏览文件 @
408c7c72
<
script
setup
>
import
{
useHead
}
from
'@unhead/vue'
import
{
useUserStore
}
from
'@/stores/user'
import
{
useAppConfig
}
from
'@/composables/useAppConfig'
const
appConfig
=
useAppConfig
()
const
userStore
=
useUserStore
()
const
appConfig
=
computed
(()
=>
useAppConfig
(
userStore
.
user
?.
mobile
))
useHead
({
title
:
appConfig
.
title
,
useHead
(
()
=>
(
{
title
:
appConfig
.
value
.
title
,
link
:
[
{
rel
:
'icon'
,
key
:
'favicon'
,
href
:
appConfig
.
favicon
||
'/images/favicon.ico'
,
href
:
appConfig
.
value
.
favicon
||
'/images/favicon.ico'
,
},
],
})
})
)
const
className
=
computed
(()
=>
{
return
`system-
${
appConfig
.
system
||
'default'
}
`
return
`system-
${
appConfig
.
value
.
system
||
'default'
}
`
})
</
script
>
...
...
src/components/layout/Header.vue
浏览文件 @
408c7c72
...
...
@@ -9,7 +9,8 @@ import { useUserStore } from '@/stores/user'
import
{
useMenuStore
}
from
'@/stores/menu'
import
{
useAppConfig
}
from
'@/composables/useAppConfig'
import
{
urls
}
from
'@/utils/env'
const
appConfig
=
useAppConfig
()
const
userStore
=
useUserStore
()
const
appConfig
=
computed
(()
=>
useAppConfig
(
userStore
.
user
?.
mobile
))
const
route
=
useRoute
()
const
router
=
useRouter
()
...
...
@@ -17,13 +18,12 @@ const mobileMenuVisible = ref(false)
const
toggleMobileMenu
=
()
=>
{
mobileMenuVisible
.
value
=
!
mobileMenuVisible
.
value
}
const
closeMobileMenu
=
()
=>
{
mobileMenuVisible
.
value
=
false
}
const
userStore
=
useUserStore
()
const
userInfo
=
userStore
.
user
const
menuStore
=
useMenuStore
()
const
menus
=
$computed
(()
=>
{
// 大赛系统隐藏学生端、教师端的菜单
if
(
appConfig
.
system
===
'game'
&&
userStore
.
role
?.
id
!==
6
)
{
if
(
appConfig
.
value
.
system
===
'game'
&&
userStore
.
role
?.
id
!==
6
)
{
return
[]
}
else
{
return
menuStore
.
menus
...
...
@@ -46,7 +46,7 @@ const defaultActive = computed(() => {
})
const
logout
=
async
()
=>
{
await
userStore
.
logout
()
location
.
href
=
`
${
appConfig
.
loginURL
||
urls
.
login
}
?rd=
${
encodeURIComponent
(
location
.
origin
)}
`
location
.
href
=
`
${
appConfig
.
value
.
loginURL
||
urls
.
login
}
?rd=
${
encodeURIComponent
(
location
.
origin
)}
`
}
function
isUrl
(
path
:
string
)
{
...
...
src/composables/useAppConfig.ts
浏览文件 @
408c7c72
import
{
urls
}
from
'@/utils/env'
export
function
useAppConfig
()
{
const
appConfigList
=
[
{
system
:
'dml'
,
title
:
'数字技能实践教学平台'
,
// logo: '/images/logo.svg',
hosts
:
[
'saas-dml-web'
],
dmlURL
:
urls
.
dmlPro
,
},
{
system
:
'default'
,
title
:
'商业数据分析实验室'
,
logo
:
'/images/logo.svg'
,
hosts
:
[
'saas-lab'
],
},
{
system
:
'ai'
,
title
:
'人工智能应用实践教学平台'
,
logo
:
'/images/logo.svg'
,
hosts
:
[
'saas-dml-web'
],
dmlURL
:
urls
.
dmlPro
,
},
{
system
:
'x'
,
title
:
'1+X实训平台'
,
logo
:
'/images/logo.svg'
,
hosts
:
[
'saas-x'
],
studentMenus
:
[
{
name
:
'首页'
,
path
:
'/'
},
{
name
:
'我的实验'
,
path
:
'/student/lab'
},
{
name
:
'理论学习'
,
path
:
urls
.
learn
},
],
adminMenus
:
[
{
name
:
'首页'
,
path
:
'/'
},
{
name
:
'我的实验'
,
path
:
'/admin/lab'
,
tag
:
[
'v1-backend-experiment'
,
'v1-teacher'
],
children
:
[
{
name
:
'实验管理'
,
path
:
'/admin/lab/experiment'
,
tag
:
'v1-backend-experiment'
},
{
name
:
'案例原文管理'
,
path
:
'/admin/lab/case'
,
tag
:
'teacher-experiment-cases'
},
{
name
:
'实验指导书管理'
,
path
:
'/admin/lab/book'
,
tag
:
'v1-teacher-book'
},
{
name
:
'实验操作视频管理'
,
path
:
'/admin/lab/video'
,
tag
:
'v1-teacher-video'
},
{
name
:
'实验讨论交流'
,
path
:
'/admin/lab/discuss'
,
tag
:
'v1-teacher-discussion'
},
{
name
:
'实验成绩管理'
,
path
:
'/admin/lab/score'
,
tag
:
'v1-teacher-record'
},
],
},
],
// liveMonitor: true,
},
{
system
:
'game'
,
title
:
'商业数据分析竞赛平台'
,
hosts
:
[
'saas-game'
],
},
{
system
:
'swsjfxs'
,
title
:
'商务数据分析师'
,
logo
:
'/images/logo_swsjfxs.png'
,
favicon
:
'/images/favicon_swsjfxs.png'
,
hosts
:
[
'swsjfxs'
],
studentMenus
:
[
{
name
:
'首页'
,
path
:
'/'
},
{
name
:
'我的大赛'
,
path
:
'/student/contest'
},
{
name
:
'大赛成绩查询'
,
path
:
'/student/contest/score'
},
],
xTrainLabel
:
'商务数据分析理论训练'
,
labTrainLabel
:
'商务数据分析实操训练'
,
xExamLabel
:
'商务数据分析理论考试'
,
labExamLabel
:
'商务数据分析实操考试'
,
loginURL
:
urls
.
swsjfxsLogin
,
},
{
system
:
'swsjfxs'
,
title
:
'商务数据分析师'
,
logo
:
'/images/logo_swsjfxs.png'
,
favicon
:
'/images/favicon_swsjfxs.png'
,
hosts
:
[
'saas-lab-bda'
],
studentMenus
:
[
{
name
:
'首页'
,
path
:
'/'
},
{
name
:
'我的大赛'
,
path
:
'/student/contest'
},
{
name
:
'大赛成绩查询'
,
path
:
'/student/contest/score'
},
],
xTrainLabel
:
'理论训练'
,
labTrainLabel
:
'实操训练'
,
xExamLabel
:
'理论考试'
,
labExamLabel
:
'实操考试'
,
loginURL
:
urls
.
swsjfxsLogin
,
hideAvailableEvents
:
true
,
// 隐藏可参与赛项
hidePracticalTestPaper
:
true
,
// 隐藏实操试卷
hideContestToolbar
:
true
,
// 隐藏大赛工具栏
},
{
system
:
'amo'
,
title
:
'全媒体运营师'
,
logo
:
'/images/logo_swsjfxs.png'
,
favicon
:
'/images/favicon_swsjfxs.png'
,
hosts
:
[
'saas-lab-amo'
],
studentMenus
:
[
{
name
:
'首页'
,
path
:
'/'
},
{
name
:
'我的大赛'
,
path
:
'/student/contest'
},
{
name
:
'大赛成绩查询'
,
path
:
'/student/contest/score'
},
],
xTrainLabel
:
'理论训练'
,
labTrainLabel
:
'实操训练'
,
xExamLabel
:
'理论考试'
,
labExamLabel
:
'实操考试'
,
loginURL
:
urls
.
swsjfxsLogin
,
hideAvailableEvents
:
true
,
// 隐藏可参与赛项
hidePracticalTestPaper
:
true
,
// 隐藏实操试卷
hideContestToolbar
:
true
,
// 隐藏大赛工具栏
},
{
system
:
'default'
,
title
:
'商业数据分析与应用大赛'
,
logo
:
'/images/logo.svg'
,
// logo: '/images/logo_swsjfxs.png',
// favicon: '/images/favicon_swsjfxs.png',
hosts
:
[
'saas-lab-bda2'
],
studentMenus
:
[
{
name
:
'首页'
,
path
:
'/'
},
{
name
:
'我的大赛'
,
path
:
'/student/contest'
},
// { name: '大赛成绩查询', path: '/student/contest/score' }
],
xTrainLabel
:
'理论训练'
,
labTrainLabel
:
'实操训练'
,
xExamLabel
:
'理论考试'
,
labExamLabel
:
'实操考试'
,
// loginURL: urls.swsjfxsLogin,
hideAvailableEvents
:
true
,
// 隐藏可参与赛项
hidePracticalTestPaper
:
true
,
// 隐藏实操试卷
hideContestToolbar
:
true
,
// 隐藏大赛工具栏
},
{
system
:
'nac'
,
title
:
'首届网络视听行业职业技能大赛'
,
logo
:
'/images/nac_logo.png'
,
logoWidth
:
'40px'
,
// logo: '/images/logo_swsjfxs.png',
// favicon: '/images/favicon_swsjfxs.png',
hosts
:
[
'saas-lab-nac'
],
studentMenus
:
[
{
name
:
'首页'
,
path
:
'/'
},
{
name
:
'我的大赛'
,
path
:
'/student/contest'
},
// { name: '大赛成绩查询', path: '/student/contest/score' }
],
xTrainLabel
:
'理论训练'
,
labTrainLabel
:
'实操训练'
,
xExamLabel
:
'理论考试'
,
labExamLabel
:
'实操考试'
,
// loginURL: urls.swsjfxsLogin,
hideAvailableEvents
:
true
,
// 隐藏可参与赛项
hidePracticalTestPaper
:
true
,
// 隐藏实操试卷
hideContestToolbar
:
true
,
// 隐藏大赛工具栏
},
{
system
:
'dml'
,
title
:
'网络主播实践教学平台'
,
// logo: '/images/favicon_swsjfxs.png',
// favicon: '/images/favicon_swsjfxs.png',
logo
:
'/images/logo.svg'
,
hosts
:
[
'ccsc'
],
dmlURL
:
urls
.
dmlPro
,
// loginURL: urls.swsjfxsLogin,
studentMenus
:
[],
homeUrl
:
'/student/lab/competition'
,
liveMonitor
:
true
,
},
]
const
appConfigList
=
[
{
system
:
'dml'
,
title
:
'数字技能实践教学平台'
,
// logo: '/images/logo.svg',
hosts
:
[
'saas-dml-web'
],
dmlURL
:
urls
.
dmlPro
,
},
{
system
:
'default'
,
title
:
'商业数据分析实验室'
,
logo
:
'/images/logo.svg'
,
hosts
:
[
'saas-lab'
],
},
{
system
:
'ai'
,
title
:
'人工智能应用实践教学平台'
,
logo
:
'/images/logo.svg'
,
hosts
:
[
'saas-dml-web'
],
dmlURL
:
urls
.
dmlPro
,
},
{
system
:
'x'
,
title
:
'1+X实训平台'
,
logo
:
'/images/logo.svg'
,
hosts
:
[
'saas-x'
],
studentMenus
:
[
{
name
:
'首页'
,
path
:
'/'
},
{
name
:
'我的实验'
,
path
:
'/student/lab'
},
{
name
:
'理论学习'
,
path
:
urls
.
learn
},
],
adminMenus
:
[
{
name
:
'首页'
,
path
:
'/'
},
{
name
:
'我的实验'
,
path
:
'/admin/lab'
,
tag
:
[
'v1-backend-experiment'
,
'v1-teacher'
],
children
:
[
{
name
:
'实验管理'
,
path
:
'/admin/lab/experiment'
,
tag
:
'v1-backend-experiment'
},
{
name
:
'案例原文管理'
,
path
:
'/admin/lab/case'
,
tag
:
'teacher-experiment-cases'
},
{
name
:
'实验指导书管理'
,
path
:
'/admin/lab/book'
,
tag
:
'v1-teacher-book'
},
{
name
:
'实验操作视频管理'
,
path
:
'/admin/lab/video'
,
tag
:
'v1-teacher-video'
},
{
name
:
'实验讨论交流'
,
path
:
'/admin/lab/discuss'
,
tag
:
'v1-teacher-discussion'
},
{
name
:
'实验成绩管理'
,
path
:
'/admin/lab/score'
,
tag
:
'v1-teacher-record'
},
],
},
],
// liveMonitor: true,
},
{
system
:
'game'
,
title
:
'商业数据分析竞赛平台'
,
hosts
:
[
'saas-game'
],
},
{
system
:
'swsjfxs'
,
title
:
'商务数据分析师'
,
logo
:
'/images/logo_swsjfxs.png'
,
favicon
:
'/images/favicon_swsjfxs.png'
,
hosts
:
[
'swsjfxs'
],
studentMenus
:
[
{
name
:
'首页'
,
path
:
'/'
},
{
name
:
'我的大赛'
,
path
:
'/student/contest'
},
{
name
:
'大赛成绩查询'
,
path
:
'/student/contest/score'
},
],
xTrainLabel
:
'商务数据分析理论训练'
,
labTrainLabel
:
'商务数据分析实操训练'
,
xExamLabel
:
'商务数据分析理论考试'
,
labExamLabel
:
'商务数据分析实操考试'
,
loginURL
:
urls
.
swsjfxsLogin
,
},
{
system
:
'swsjfxs'
,
title
:
'商务数据分析师'
,
logo
:
'/images/logo_swsjfxs.png'
,
favicon
:
'/images/favicon_swsjfxs.png'
,
hosts
:
[
'saas-lab-bda'
],
studentMenus
:
[
{
name
:
'首页'
,
path
:
'/'
},
{
name
:
'我的大赛'
,
path
:
'/student/contest'
},
{
name
:
'大赛成绩查询'
,
path
:
'/student/contest/score'
},
],
xTrainLabel
:
'理论训练'
,
labTrainLabel
:
'实操训练'
,
xExamLabel
:
'理论考试'
,
labExamLabel
:
'实操考试'
,
loginURL
:
urls
.
swsjfxsLogin
,
hideAvailableEvents
:
true
,
// 隐藏可参与赛项
hidePracticalTestPaper
:
true
,
// 隐藏实操试卷
hideContestToolbar
:
true
,
// 隐藏大赛工具栏
},
{
system
:
'amo'
,
title
:
'全媒体运营师'
,
logo
:
'/images/logo_swsjfxs.png'
,
favicon
:
'/images/favicon_swsjfxs.png'
,
hosts
:
[
'saas-lab-amo'
],
studentMenus
:
[
{
name
:
'首页'
,
path
:
'/'
},
{
name
:
'我的大赛'
,
path
:
'/student/contest'
},
{
name
:
'大赛成绩查询'
,
path
:
'/student/contest/score'
},
],
xTrainLabel
:
'理论训练'
,
labTrainLabel
:
'实操训练'
,
xExamLabel
:
'理论考试'
,
labExamLabel
:
'实操考试'
,
loginURL
:
urls
.
swsjfxsLogin
,
hideAvailableEvents
:
true
,
// 隐藏可参与赛项
hidePracticalTestPaper
:
true
,
// 隐藏实操试卷
hideContestToolbar
:
true
,
// 隐藏大赛工具栏
},
{
system
:
'default'
,
title
:
'商业数据分析与应用大赛'
,
logo
:
'/images/logo.svg'
,
// logo: '/images/logo_swsjfxs.png',
// favicon: '/images/favicon_swsjfxs.png',
hosts
:
[
'saas-lab-bda2'
],
studentMenus
:
[
{
name
:
'首页'
,
path
:
'/'
},
{
name
:
'我的大赛'
,
path
:
'/student/contest'
},
// { name: '大赛成绩查询', path: '/student/contest/score' }
],
xTrainLabel
:
'理论训练'
,
labTrainLabel
:
'实操训练'
,
xExamLabel
:
'理论考试'
,
labExamLabel
:
'实操考试'
,
// loginURL: urls.swsjfxsLogin,
hideAvailableEvents
:
true
,
// 隐藏可参与赛项
hidePracticalTestPaper
:
true
,
// 隐藏实操试卷
hideContestToolbar
:
true
,
// 隐藏大赛工具栏
},
{
system
:
'nac'
,
title
:
'首届网络视听行业职业技能大赛'
,
logo
:
'/images/nac_logo.png'
,
logoWidth
:
'40px'
,
// logo: '/images/logo_swsjfxs.png',
// favicon: '/images/favicon_swsjfxs.png',
hosts
:
[
'saas-lab-nac'
],
studentMenus
:
[
{
name
:
'首页'
,
path
:
'/'
},
{
name
:
'我的大赛'
,
path
:
'/student/contest'
},
// { name: '大赛成绩查询', path: '/student/contest/score' }
],
xTrainLabel
:
'理论训练'
,
labTrainLabel
:
'实操训练'
,
xExamLabel
:
'理论考试'
,
labExamLabel
:
'实操考试'
,
// loginURL: urls.swsjfxsLogin,
hideAvailableEvents
:
true
,
// 隐藏可参与赛项
hidePracticalTestPaper
:
true
,
// 隐藏实操试卷
hideContestToolbar
:
true
,
// 隐藏大赛工具栏
},
{
system
:
'dml'
,
title
:
'网络主播实践教学平台'
,
// logo: '/images/favicon_swsjfxs.png',
// favicon: '/images/favicon_swsjfxs.png',
logo
:
'/images/logo.svg'
,
hosts
:
[
'ccsc'
],
dmlURL
:
urls
.
dmlPro
,
// loginURL: urls.swsjfxsLogin,
studentMenus
:
[],
homeUrl
:
'/student/lab/competition'
,
liveMonitor
:
true
,
},
]
// 长春金专大赛支持
const
digitalFinanceMarketingMobiles
=
new
Set
([
'15526552767'
,
'18345542466'
,
'14743833355'
,
'18946639603'
])
// 长春金专大赛支持
const
digitalFinanceMarketingMobiles
=
new
Set
([
'15526552767'
,
'18345542466'
,
'14743833355'
,
'18946639603'
])
export
function
useAppConfig
(
mobile
?:
string
)
{
// 如果定义了 VITE_SYSTEM,直接用;否则通过域名 hosts 匹配
const
found
=
import
.
meta
.
env
.
VITE_SYSTEM
?
appConfigList
.
find
((
item
)
=>
item
.
system
===
import
.
meta
.
env
.
VITE_SYSTEM
)
||
appConfigList
[
0
]
...
...
@@ -182,12 +183,8 @@ export function useAppConfig() {
const
appConfig
=
found
||
appConfigList
[
0
]
const
config
=
{
...
appConfig
}
const
user
=
localStorage
.
getItem
(
'user'
)
if
(
user
)
{
const
userInfo
=
JSON
.
parse
(
user
)
if
(
userInfo
?.
mobile
&&
digitalFinanceMarketingMobiles
.
has
(
userInfo
.
mobile
))
{
config
.
title
=
'数字金融营销平台'
}
if
(
mobile
&&
digitalFinanceMarketingMobiles
.
has
(
mobile
))
{
config
.
title
=
'数字金融营销平台'
}
return
config
...
...
src/stores/user.ts
浏览文件 @
408c7c72
...
...
@@ -40,13 +40,11 @@ export const useUserStore = defineStore('user', {
this
.
project
=
project
this
.
roles
=
roles
this
.
permissions
=
permissions
localStorage
.
setItem
(
'user'
,
JSON
.
stringify
(
info
))
await
useMapStore
().
getMapList
()
},
async
logout
()
{
await
logout
()
this
.
user
=
null
localStorage
.
removeItem
(
'user'
)
},
},
})
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论