xydata-tools 1.1.6 → 1.1.8

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,8 @@ 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
+ // 这里兼容以前的aaaLogin属性
441
+ var actualLoginType = envData.login_type || (envData.aaaLogin !== undefined ? envData.aaaLogin ? 'AAA' : 'SSO' : 'BOTH');
441
442
  if (actualLoginType === 'BOTH') {
442
443
  var redirectUrl = getSessionStorage('sso_redirect_url');
443
444
  actualLoginType = redirectUrl ? 'SSO' : 'AAA';
@@ -452,6 +453,10 @@ export var handleUnauthorized = function handleUnauthorized(envData) {
452
453
  setSessionStorage('sso_redirect_url', window.location.href);
453
454
  envData.sso_type === 'new' ? ssoTypeByNew() : ssoTypeByOld();
454
455
  } else {
456
+ // 避免出现密码错误时刷新页面
457
+ if (window.location.pathname.indexOf('/user/login') >= 0) {
458
+ return;
459
+ }
455
460
  // AAA 登录过期,跳转到 AAA 登录页面
456
461
  window.location.href = "".concat(window.publicPath, "user/login");
457
462
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xydata-tools",
3
- "version": "1.1.6",
3
+ "version": "1.1.8",
4
4
  "description": "xydata tools",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",