From 190bfe4fb86a12b0c7dc39e30ed220c8c0a671e4 Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Tue, 9 Jul 2024 17:48:43 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0python4=E4=B8=AA=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E7=9A=84=E5=88=87=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/TestPanel.vue | 10 +++---- src/components/codemirror.vue | 6 ++-- src/config/index.js | 5 ++-- src/views/Home.vue | 55 ++++++++++++++++++++--------------- 4 files changed, 43 insertions(+), 33 deletions(-) diff --git a/src/components/TestPanel.vue b/src/components/TestPanel.vue index 7e0d39b..3ecf153 100644 --- a/src/components/TestPanel.vue +++ b/src/components/TestPanel.vue @@ -335,7 +335,7 @@ export default { const { data } = await this.$get(`${this.api.getTheMostRecentlyRunProject}`, { cid: this.courseId }) - if (data.length) this.projectId = data[0].projectId + if (data && data.length) this.projectId = data[0].projectId } else { Cookie.set('admin-loaded', 1) // 初次加载的标识 } @@ -642,9 +642,9 @@ export default { this.isSelected = true await this.getEntryTime() this.countVal = this.entryTime + this.setSubmit(false) await this.getProDetail() this.getCache() - this.setSubmit(false) this.grade = '00' this.pannelTab = 'first' this.clearReport() @@ -755,7 +755,7 @@ export default { confirmSubmit () { if (this.submiting) return false this.submiting = true - const isVscode = this.$parent.language // 是否选择了vscode + const isVscode = this.$parent.language === 'vscode' // 是否选择了vscode const { taskList } = this const pointList = this.$parent.workbench let msg = '此操作将视为结束考试,是否继续?' @@ -788,7 +788,7 @@ export default { cid: this.courseId, projectId: this.projectId, userAnswer: e.codeResult || null, - type: 0, + type: 'vscode', sort: i }) this.$parent.workbench[i].answer = e.codeResult @@ -805,7 +805,7 @@ export default { bcId: pointList[0].judgmentId, cid: this.courseId, projectId: this.projectId, - type: 0 + type: this.$parent.language }).then(res => { }).catch(err => { this.submiting = false }) diff --git a/src/components/codemirror.vue b/src/components/codemirror.vue index 9eac53b..9e60616 100644 --- a/src/components/codemirror.vue +++ b/src/components/codemirror.vue @@ -522,7 +522,7 @@ export default { bcId: this.judgmentId, cid: this.courseId, projectId: this.projectId, - type: 0, + type: Cookie.get('admin-language'), sort: this.index }, { headers: { @@ -652,7 +652,7 @@ export default { bcId, cid, projectId, - type: 0, + type: Cookie.get('admin-language'), sort: this.index }).then(res => { this.$emit('update:finalCode', code) @@ -680,7 +680,7 @@ export default { bcId, cid, projectId, - type: 0, + type: Cookie.get('admin-language'), sort: this.index }).then(res => { this.$emit('update:finalCode', code) diff --git a/src/config/index.js b/src/config/index.js index 328f816..6684696 100644 --- a/src/config/index.js +++ b/src/config/index.js @@ -2,7 +2,8 @@ import Cookie from 'js-cookie' const url = location.host const isDev = process.env.NODE_ENV === 'development' //是否本地 -const isTest = url.includes('121.37.12.51') //测试服 +// const isTest = url.includes('121.37.12.51') //测试服 +const isTest = true //测试服 const isHh = url.includes('10.196.131.73') //是否是河海版本 const isPro = url.includes('occupationlab.com') //是否职站生产 const isZxy = url.includes('izhixinyun.com') //是否智信云 @@ -13,7 +14,7 @@ let host = location.origin + '/' let bankPath = `${location.origin}/banksystem` // 银行系统 // 121.37.12.51 | 192.168.31.151 if (isDev) { - host = 'http://192.168.31.217:9000/' + host = 'http://192.168.31.51:9000/' // host = 'http://121.37.12.51:9000/' // host = 'https://occupationlab.com/' bankPath = `http://${location.hostname}:8093` diff --git a/src/views/Home.vue b/src/views/Home.vue index 3637720..78ff798 100644 --- a/src/views/Home.vue +++ b/src/views/Home.vue @@ -11,10 +11,10 @@
{{ $config.title }}
编程语言