提交 9df1e377 authored 作者: 王鹏飞's avatar 王鹏飞

chore: 新增数字营销实验室

上级 1b3ea913
......@@ -7,10 +7,14 @@ const appConfig = useAppConfig()
useHead({
title: appConfig.title
})
const className = computed(() => {
return `system-${appConfig.system || 'default'}`
})
</script>
<template>
<RouterView />
<RouterView :class="className" />
</template>
<style>
......
差异被折叠。
......@@ -18,7 +18,7 @@ const userInfo = userStore.user
const menuStore = useMenuStore()
const menus = $computed(() => {
// 大赛系统隐藏学生端、教师端的菜单
if (appConfig.isGame && userStore.role?.id !== 6) {
if (appConfig.system === 'game' && userStore.role?.id !== 6) {
return []
} else {
return menuStore.menus
......
......@@ -5,9 +5,15 @@ const appConfigList = [
hosts: ['saas-lab']
},
{
isGame: true,
system: 'game',
title: '商业数据分析竞赛平台',
hosts: ['saas-game']
},
{
system: 'dml',
title: '数字营销实验室',
logo: 'https://zws-imgs-pub.ezijing.com/pc/base/ezijing-logo.svg',
hosts: ['saas-dml-web']
}
]
......
......@@ -46,6 +46,12 @@ function handleContestChange(data: ContestType) {
</template>
<style lang="scss" scoped>
.system-dml {
.bg {
background: url(@/assets/images/dml_home_student_bg.png) no-repeat center center;
background-size: contain;
}
}
.bg {
position: relative;
margin: 20px auto;
......
......@@ -49,6 +49,12 @@ function handleChange(id: string, type: number) {
</template>
<style lang="scss" scoped>
.system-dml {
.bg {
background: url(@/assets/images/dml_home_teacher_bg.png) no-repeat center center;
background-size: contain;
}
}
.bg {
position: relative;
margin: 20px auto;
......
......@@ -7,7 +7,7 @@ export const routes: Array<RouteRecordRaw> = [
{
path: '/',
component: AppLayout,
props: { sidebar: false, footer: appConfig.isGame },
props: { sidebar: false, footer: appConfig.system === 'game' },
children: [{ path: '', component: () => import('./views/Index.vue') }]
}
]
......@@ -4,8 +4,12 @@ const appConfig = useAppConfig()
const DefaultHome = defineAsyncComponent(() => import('./Default.vue'))
const GameHome = defineAsyncComponent(() => import('./Game.vue'))
const componentName = computed(() => {
return appConfig.system === 'game' ? GameHome : DefaultHome
})
</script>
<template>
<component :is="appConfig.isGame ? GameHome : DefaultHome"></component>
<component :is="componentName"></component>
</template>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论