From 81720cc305e1d7607d464740593d0e8b5de405b8 Mon Sep 17 00:00:00 2001 From: "jialong.yu" Date: Thu, 23 Dec 2021 02:10:06 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A8=E6=80=81=E5=BC=95=E5=85=A5scss?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/TestPanel.vue | 4 ++-- src/main.js | 22 ++++------------------ 2 files changed, 6 insertions(+), 20 deletions(-) diff --git a/src/components/TestPanel.vue b/src/components/TestPanel.vue index d16526f..180c56f 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'), + systemId: util.getCookie('systemId') ? Number(util.getCookie('systemId')) : 1, classId: util.getCookie('classId'), className: util.getCookie('className') ? decodeURI(util.getCookie('className')) : '', courseId: util.getCookie('courseId'), @@ -413,7 +413,7 @@ export default { projectName, assessmentId: this.assessmentId ? this.assessmentId : '', totalScore: 100, // 判分点总分固定为100 - systemId: 1, + systemId: this.systemId, purpose: this.experimentTarget, // 实验目的 attributesReqList } diff --git a/src/main.js b/src/main.js index 02ae0b3..c18db34 100644 --- a/src/main.js +++ b/src/main.js @@ -5,24 +5,10 @@ import store from "./store"; import ElementUI from 'element-ui' import util from '@/util' import '@/styles/index.scss'; -const systemId = util.getCookie('systemId') -if (systemId == 1) { - require('@/styles/theme/theme1.scss') -} else if (systemId == 4) { - require('@/styles/theme/theme4.scss') -} else if (systemId == 5) { - require('@/styles/theme/theme5.scss') -} else if (systemId == 6) { - require('@/styles/theme/theme6.scss') -} else if (systemId == 7) { - require('@/styles/theme/theme7.scss') -} else if (systemId == 8) { - require('@/styles/theme/theme8.scss') -} else if (systemId == 9) { - require('@/styles/theme/theme9.scss') -} else if (systemId == 10) { - require('@/styles/theme/theme10.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`) import api from './api'; import { post,