From d1c9bf22b12323d6ee1ba1ed6e7f6acc7e5b9e1f Mon Sep 17 00:00:00 2001
From: zhangzengfei <zhangzengfei@smartai.com>
Date: 星期一, 29 十一月 2021 19:55:29 +0800
Subject: [PATCH] 修复token过期无法退出的bug
---
src/utils/request.js | 7 ++++++-
src/views/project/index.vue | 9 ++++++++-
2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/src/utils/request.js b/src/utils/request.js
index ac34737..481ac33 100644
--- a/src/utils/request.js
+++ b/src/utils/request.js
@@ -27,6 +27,7 @@
console.log(code, msg);
switch (code) {
case invalidCode:
+ console.log(code);
Vue.prototype.$baseMessage(msg || `鍚庣鎺ュ彛${code}寮傚父`, "error");
store.dispatch("user/resetAccessToken").catch(() => {});
if (loginInterception) {
@@ -34,9 +35,13 @@
}
break;
case noPermissionCode:
- router.push({ path: "/login" }).catch(() => {});
+ console.log(code);
+ store.dispatch("user/logout").then(() => {
+ router.push({ path: "/login" }).catch(() => {});
+ });
break;
default:
+ console.log(code);
Vue.prototype.$baseMessage(msg || `鍚庣鎺ュ彛${code}寮傚父`, "error");
break;
}
diff --git a/src/views/project/index.vue b/src/views/project/index.vue
index 6f7363d..46277a5 100644
--- a/src/views/project/index.vue
+++ b/src/views/project/index.vue
@@ -74,7 +74,6 @@
stripe
:data="list"
:element-loading-text="elementLoadingText"
- :height="height"
@selection-change="setSelectRows"
@expand-change="expandChange"
>
@@ -84,7 +83,10 @@
:data="props.row.pkgList"
:show-header="false"
style="width: 100%"
+ row-class-name="expand-row"
+ :highlight-current-row="false"
>
+ >
<el-table-column prop="fileName"></el-table-column>
<el-table-column prop="version" width="150"></el-table-column>
<el-table-column prop="commit" width="150"></el-table-column>
@@ -370,3 +372,8 @@
},
};
</script>
+<style>
+.el-table .expand-row {
+ background-color: oldlace;
+}
+</style>
--
Gitblit v1.8.0