From 97cb6729dca751f80d2f5a5a4a8fc32084d38a72 Mon Sep 17 00:00:00 2001 From: "jialong.yu" Date: Thu, 23 Dec 2021 10:58:28 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A8=E6=80=81=E5=BC=95=E5=85=A5css?= =?UTF-8?q?=E4=B8=BB=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/TestPanel.vue | 2 +- src/main.js | 22 ++++++++++++++++++---- src/styles/theme/theme4.scss | 2 +- src/styles/theme/theme5.scss | 2 +- src/styles/theme/theme7.scss | 2 +- src/styles/theme/theme9.scss | 2 +- 6 files changed, 23 insertions(+), 9 deletions(-) diff --git a/src/components/TestPanel.vue b/src/components/TestPanel.vue index 180c56f..b37a88e 100644 --- a/src/components/TestPanel.vue +++ b/src/components/TestPanel.vue @@ -134,7 +134,7 @@ import util from '@/util' export default { data() { return { - systemId: util.getCookie('systemId') ? Number(util.getCookie('systemId')) : 1, + systemId: Number(util.getCookie('systemId') || 1), classId: util.getCookie('classId'), className: util.getCookie('className') ? decodeURI(util.getCookie('className')) : '', courseId: util.getCookie('courseId'), diff --git a/src/main.js b/src/main.js index c18db34..152eff7 100644 --- a/src/main.js +++ b/src/main.js @@ -5,10 +5,24 @@ import store from "./store"; import ElementUI from 'element-ui' import util from '@/util' import '@/styles/index.scss'; -const systemId = util.getCookie('systemId') ? Number(util.getCookie('systemId')) : 1 -console.log('main', systemId, `@/styles/theme/theme${systemId}.scss`) -// require(`@/styles/theme/theme${systemId}.scss`) -require(`@/styles/theme/theme1.scss`) +const systemId = util.getCookie('systemId') +if (systemId == 1) { + import('@/styles/theme/theme1.scss') +} else if (systemId == 4) { + import('@/styles/theme/theme4.scss') +} else if (systemId == 5) { + import('@/styles/theme/theme5.scss') +} else if (systemId == 6) { + import('@/styles/theme/theme6.scss') +} else if (systemId == 7) { + import('@/styles/theme/theme7.scss') +} else if (systemId == 8) { + import('@/styles/theme/theme8.scss') +} else if (systemId == 9) { + import('@/styles/theme/theme9.scss') +} else if (systemId == 10) { + import('@/styles/theme/theme10.scss') +} import api from './api'; import { post, diff --git a/src/styles/theme/theme4.scss b/src/styles/theme/theme4.scss index 573a413..47bc594 100644 --- a/src/styles/theme/theme4.scss +++ b/src/styles/theme/theme4.scss @@ -7,7 +7,7 @@ $--font-path: '~element-ui/lib/theme-chalk/fonts'; background-color: $--color-primary; } .el-main { - background: #fff url(../../assets/images/system/4/bg1.png) 100% 0 no-repeat; + background: url(../../assets/images/system/4/bg1.png) top right no-repeat, url(../../assets/images/system/4/bg2.png) bottom right no-repeat; } .t-color { color: $--color-primary; diff --git a/src/styles/theme/theme5.scss b/src/styles/theme/theme5.scss index 1c9ac6d..2b3ef36 100644 --- a/src/styles/theme/theme5.scss +++ b/src/styles/theme/theme5.scss @@ -7,7 +7,7 @@ $--font-path: '~element-ui/lib/theme-chalk/fonts'; background-color: $--color-primary; } .el-main { - background: #fff url(../../assets/images/system/5/bg1.png) 100% 0 no-repeat; + background: url(../../assets/images/system/5/bg1.png) top right no-repeat,url(../../assets/images/system/5/bg2.png) bottom right no-repeat; } .t-color { color: $--color-primary; diff --git a/src/styles/theme/theme7.scss b/src/styles/theme/theme7.scss index 8dc1730..80f4fe6 100644 --- a/src/styles/theme/theme7.scss +++ b/src/styles/theme/theme7.scss @@ -7,7 +7,7 @@ $--font-path: '~element-ui/lib/theme-chalk/fonts'; background-color: $--color-primary; } .el-main { - background: #fff url(../../assets/images/system/7/bg1.png) 100% 0 no-repeat; + background: url(../../assets/images/system/7/bg1.png) top right no-repeat, url(../../assets/images/system/7/bg2.png) bottom right no-repeat; } .t-color { color: $--color-primary; diff --git a/src/styles/theme/theme9.scss b/src/styles/theme/theme9.scss index bcc9d08..d363096 100644 --- a/src/styles/theme/theme9.scss +++ b/src/styles/theme/theme9.scss @@ -7,7 +7,7 @@ $--font-path: '~element-ui/lib/theme-chalk/fonts'; background-color: $--color-primary; } .el-main { - background: #fff url(../../assets/images/system/9/bg1.png) 100% 0 no-repeat; + background: url(../../assets/images/system/9/bg1.png) top right no-repeat, url(../../assets/images/system/9/bg1.png) bottom right no-repeat; } .t-color { color: $--color-primary;