diff --git a/src/api/http.js b/src/api/http.js
index 4f35222..8d3234d 100644
--- a/src/api/http.js
+++ b/src/api/http.js
@@ -30,6 +30,7 @@ service.interceptors.request.use(config => {
return Promise.reject(err);
})
+let logouted = 0;
// 响应拦截器
service.interceptors.response.use(
response => {
@@ -49,11 +50,14 @@ service.interceptors.response.use(
switch (error.response.status) {
// 401: 未登录
case 401:
+ if (!logouted) {
Message.error('登录过期,请重新登录')
setTimeout(() => {
history.back()
}, 1500)
- break;
+ logouted = 1
+ }
+ break;
default:
// Message.error(error.response.data.message)
Promise.reject(error.response);
diff --git a/src/components/TestPanel.vue b/src/components/TestPanel.vue
index 1017ddd..c45fb05 100644
--- a/src/components/TestPanel.vue
+++ b/src/components/TestPanel.vue
@@ -51,7 +51,7 @@
确定重新开始吗?
', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning', + closeOnClickModal: false, + dangerouslyUseHTMLString: true, + }) + this.reload() + } catch (e) { } + } + }, // 页面加载完后重置编辑框大小 ready (i) { if (this.$refs['codemirror' + i]) { @@ -1583,4 +1600,7 @@ export default { } } } +.text-danger { + color: #f56c6c; +} \ No newline at end of file diff --git a/src/components/breadcrumb/index.vue b/src/components/breadcrumb/index.vue index dd3d251..7b6a0b4 100644 --- a/src/components/breadcrumb/index.vue +++ b/src/components/breadcrumb/index.vue @@ -3,15 +3,12 @@