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

chore: 新增数字营销实验室

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