You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@linkis.apache.org by pe...@apache.org on 2023/02/09 07:35:24 UTC
[linkis] branch dev-1.3.2 updated: fix: Login incorrect prompt optimization (#4165)
This is an automated email from the ASF dual-hosted git repository.
peacewong pushed a commit to branch dev-1.3.2
in repository https://gitbox.apache.org/repos/asf/linkis.git
The following commit(s) were added to refs/heads/dev-1.3.2 by this push:
new d7c9561d4 fix: Login incorrect prompt optimization (#4165)
d7c9561d4 is described below
commit d7c9561d425b745558ea4530699291559cfac347
Author: QuantumXiecao <99...@users.noreply.github.com>
AuthorDate: Thu Feb 9 15:35:18 2023 +0800
fix: Login incorrect prompt optimization (#4165)
Co-authored-by: xiecao <ha...@alibaba-inc.com>
---
linkis-web/src/common/service/api.js | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/linkis-web/src/common/service/api.js b/linkis-web/src/common/service/api.js
index ae827ae21..86053d651 100644
--- a/linkis-web/src/common/service/api.js
+++ b/linkis-web/src/common/service/api.js
@@ -21,7 +21,6 @@
*/
import util from '@/common/util';
import axios from 'axios';
-import router from '@/router';
import { Message } from 'iview';
import cache from './apiCache';
@@ -112,8 +111,12 @@ const api = {
if (res.data && res.data.enableSSO && res.data.SSOURL) {
return window.location.replace(res.data.SSOURL);
}
- router.push('/login');
- throw new Error('您尚未登录,请先登录!');
+
+ const isLoginPath = window.location.hash == "#/login";
+ if (!isLoginPath) {
+ window.location.hash = "#/login";
+ throw new Error('您尚未登录,请先登录!');
+ }
},
},
constructionOfResponse: {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@linkis.apache.org
For additional commands, e-mail: commits-help@linkis.apache.org