xydata-tools 1.1.6 → 1.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -437,7 +437,7 @@ export var logout = /*#__PURE__*/function () {
437
437
  * }
438
438
  */
439
439
  export var handleUnauthorized = function handleUnauthorized(envData) {
440
- var actualLoginType = envData.login_type || 'BOTH';
440
+ var actualLoginType = envData.login_type || envData.aaaLogin !== undefined ? envData.aaaLogin ? 'AAA' : 'SSO' : 'BOTH';
441
441
  if (actualLoginType === 'BOTH') {
442
442
  var redirectUrl = getSessionStorage('sso_redirect_url');
443
443
  actualLoginType = redirectUrl ? 'SSO' : 'AAA';
@@ -452,6 +452,10 @@ export var handleUnauthorized = function handleUnauthorized(envData) {
452
452
  setSessionStorage('sso_redirect_url', window.location.href);
453
453
  envData.sso_type === 'new' ? ssoTypeByNew() : ssoTypeByOld();
454
454
  } else {
455
+ // 避免出现密码错误时刷新页面
456
+ if (window.location.pathname.indexOf('/user/login') >= 0) {
457
+ return;
458
+ }
455
459
  // AAA 登录过期,跳转到 AAA 登录页面
456
460
  window.location.href = "".concat(window.publicPath, "user/login");
457
461
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xydata-tools",
3
- "version": "1.1.6",
3
+ "version": "1.1.7",
4
4
  "description": "xydata tools",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",