yuang-framework-ui-common 1.0.90 → 1.0.92

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.
@@ -187,8 +187,13 @@ const refreshSsoAccessToken = (res: any) => {
187
187
  config.params = {
188
188
  ssoRefreshToken: ssoRefreshToken,
189
189
  }
190
- axios.get(`${application.gatewayServerBaseUrl}/sso-api/client/sso-auth/getSsoRefreshToken`, config).then(res => {
190
+ http.get(`${application.gatewayServerBaseUrl}/sso-api/client/sso-auth/getSsoRefreshToken`, config).then(res => {
191
191
  if (res?.data?.statusCode !== 200) {
192
+ if (res?.data?.statusCode === 500815001) {
193
+ clearSsoAccessToken();
194
+ window.location.href = getSsoLoginUrl() || '';
195
+ return;
196
+ }
192
197
  return reject();
193
198
  }
194
199
  setSsoAccessToken(res.data.data);
@@ -12,6 +12,9 @@ import { getIsDebug } from '../utils/htmlUtils';
12
12
  * @param ssoRedirectUrl
13
13
  */
14
14
  const getSsoLoginUrl = (ssoRedirectUrl = '') => {
15
+ if(getIsDebug) {
16
+ debugger;
17
+ }
15
18
  let gatewayServerBaseUrl = application.gatewayServerBaseUrl;
16
19
  if (!gatewayServerBaseUrl) {
17
20
  throw new Error('参数[gatewayServerBaseUrl]为空');
@@ -25,9 +28,6 @@ const getSsoLoginUrl = (ssoRedirectUrl = '') => {
25
28
  } else {
26
29
  ssoLoginUrl += `?ssoRedirectUrl=${encodeURIComponent(ssoRedirectUrl)}`;
27
30
  }
28
- if(getIsDebug) {
29
- console.log('ssoLoginUrl', ssoLoginUrl);
30
- }
31
31
  return ssoLoginUrl;
32
32
  }
33
33
 
@@ -36,6 +36,9 @@ const getSsoLoginUrl = (ssoRedirectUrl = '') => {
36
36
  * @param ssoRedirectUrl
37
37
  */
38
38
  const getSsoAuthUrl = (ssoRedirectUrl = '') => {
39
+ if(getIsDebug) {
40
+ debugger;
41
+ }
39
42
  let gatewayServerBaseUrl = application.gatewayServerBaseUrl;
40
43
  if (!gatewayServerBaseUrl) {
41
44
  throw new Error('参数[gatewayServerBaseUrl]为空');
@@ -49,9 +52,6 @@ const getSsoAuthUrl = (ssoRedirectUrl = '') => {
49
52
  } else {
50
53
  ssoAuthUrl += `?ssoRedirectUrl=${encodeURIComponent(ssoRedirectUrl)}`;
51
54
  }
52
- if(getIsDebug) {
53
- console.log('ssoAuthUrl', ssoAuthUrl);
54
- }
55
55
  return ssoAuthUrl;
56
56
  }
57
57
 
@@ -60,6 +60,9 @@ const getSsoAuthUrl = (ssoRedirectUrl = '') => {
60
60
  * @param ssoRedirectUrl
61
61
  */
62
62
  const getSsoLogoutUrl = (ssoRedirectUrl = '') => {
63
+ if(getIsDebug) {
64
+ debugger;
65
+ }
63
66
  let gatewayServerBaseUrl = application.gatewayServerBaseUrl;
64
67
  if (!gatewayServerBaseUrl) {
65
68
  throw new Error('参数[gatewayServerBaseUrl]为空');
@@ -73,11 +76,6 @@ const getSsoLogoutUrl = (ssoRedirectUrl = '') => {
73
76
  } else if (ssoRedirectUrl) {
74
77
  ssoLogoutUrl += `?ssoRedirectUrl=${encodeURIComponent(ssoRedirectUrl)}`;
75
78
  }
76
- if(getIsDebug) {
77
- console.log('ssoLogoutUrl', ssoLogoutUrl);
78
- }
79
- console.log('ssoLogoutUrl', ssoLogoutUrl);
80
-
81
79
  return ssoLogoutUrl;
82
80
  }
83
81
 
@@ -86,6 +84,9 @@ const getSsoLogoutUrl = (ssoRedirectUrl = '') => {
86
84
  * @param ssoRedirectRoutePath
87
85
  */
88
86
  const getSsoAuthRoutePath = (ssoRedirectRoutePath = '') => {
87
+ if(getIsDebug) {
88
+ debugger;
89
+ }
89
90
  let ssoAuthRoutePath = '/sso/sso-auth/index';
90
91
  if (!ssoRedirectRoutePath) {
91
92
  ssoAuthRoutePath += `?ssoRedirectRoutePath=${encodeURIComponent('/sso/sso-auth/auth-success')}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yuang-framework-ui-common",
3
- "version": "1.0.90",
3
+ "version": "1.0.92",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "scripts": {