diff --git a/src/components/Sidebar.vue b/src/components/Sidebar.vue index 85aab31..a46ea62 100644 --- a/src/components/Sidebar.vue +++ b/src/components/Sidebar.vue @@ -136,8 +136,11 @@ export default { addRoutes(routes) this.initMenu() }).catch(err => { - // 被捕获了则显示默认菜单 - this.menus = this.menuList + if (err.status === 500) { + localStorage.removeItem('ms_username'); + sessionStorage.clear() + location.reload() + } }) }, } diff --git a/src/components/codemirror.vue b/src/components/codemirror.vue index 1f057a0..3ad9798 100644 --- a/src/components/codemirror.vue +++ b/src/components/codemirror.vue @@ -193,8 +193,11 @@ export default { this.errLine = parseInt(result.substring(result.indexOf("line") + 4, result.length)) } }).catch(res => { - res.status == 500 && this.$message.error('检测到代码里有非法代码,请检查是否有调用系统命令。') + this.isError = false + this.runResult = '' + this.picSrcList = [] this.loadIns.close() + res.status == 500 && this.$message.error('检测到代码里有非法代码,请检查是否有调用系统命令。') }) } }, diff --git a/src/utils/api.js b/src/utils/api.js index 95225d6..9c771b0 100644 --- a/src/utils/api.js +++ b/src/utils/api.js @@ -95,6 +95,7 @@ export default { saveProjectDraft: `occupationlab/projectManage/saveProjectDraft`, // 新增项目管理 addProjectManage: `occupationlab/projectManage/addProjectManage`, // 新增项目管理 updateProjectManage: `occupationlab/projectManage/updateProjectManage`, // 修改项目管理 + editProjectDraft: `occupationlab/projectManage/editProjectDraft`, // 修改项目管理 copyProjectManage: `occupationlab/projectManage/copyProjectManage`, // 复制项目管理 // 判分点 getBcJudgmentPoint: `judgment/bcJudgmentPoint/getBcJudgmentPoint`, // 获取编程类判分点列表(分页) diff --git a/src/views/Login.vue b/src/views/Login.vue index 85cf5d8..b0b03be 100644 --- a/src/views/Login.vue +++ b/src/views/Login.vue @@ -98,6 +98,7 @@