yuang-framework-ui-common 1.0.32 → 1.0.33

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.
@@ -63,24 +63,24 @@ http.interceptors.response.use(async (res: any) => {
63
63
  }
64
64
  });
65
65
  return Promise.reject(new Error(res?.data?.message));
66
- } else if (res?.data?.statusCode === 822001) {
66
+ } else if (res?.data?.statusCode === 500822001) {
67
67
  clearGatewayConfig();
68
68
  showErrorMessage(messageMap.requestError || messageMap.requestError);
69
69
  return Promise.reject(new Error(res?.data?.message));
70
- } else if (res?.data?.statusCode === 815001) {
70
+ } else if (res?.data?.statusCode === 500815001) {
71
71
  showErrorMessage(res?.data?.message || messageMap.requestError);
72
72
  clearSsoAccessToken();
73
73
  window.location.href = getSsoLoginUrl() || '';
74
74
  return Promise.reject(new Error(res?.data?.message));
75
- } else if (res?.data?.statusCode === 815002) {
75
+ } else if (res?.data?.statusCode === 500815005) {
76
76
  await refreshSsoAccessToken(res);
77
77
  // 重发请求
78
78
  return axios.request(res.config);
79
- } else if (res?.data?.statusCode === 815004) {
79
+ } else if (res?.data?.statusCode === 500815006) {
80
80
  const fullPath = router.currentRoute.value.fullPath;
81
- router.push(`/sso/login/index?redirectRoutePath=${fullPath}`);
81
+ router.push(`/sso/login/index?redirectRoutePath=${encodeURIComponent(fullPath)}`);
82
82
  return;
83
- } else if (res?.data?.statusCode === 815003) {
83
+ } else if (res?.data?.statusCode === 500815003) {
84
84
  showErrorMessage(res?.data?.message || messageMap.requestError);
85
85
  return Promise.reject(new Error(res?.data?.message));
86
86
  }
@@ -95,7 +95,7 @@ http.interceptors.response.use(async (res: any) => {
95
95
  if (statusCode !== 200) {
96
96
  errorMessage = message;
97
97
  }
98
- errorMessage = errorMessage || messageMap.requestError
98
+ errorMessage = errorMessage || messageMap.requestError
99
99
  } else {
100
100
  errorMessage = error?.message || messageMap.requestError;
101
101
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yuang-framework-ui-common",
3
- "version": "1.0.32",
3
+ "version": "1.0.33",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "scripts": {
@@ -22,9 +22,8 @@
22
22
 
23
23
  proxy.$http.get('/sso-api/client/auth/getSsoAccessToken', { params: { code: code } }).then((res: any) => {
24
24
  setSsoAccessToken(res.data.data);
25
- let redirectRoutePath = router.currentRoute.value.query.redirectRoutePath ?? ('/sso/login/login-success' as any);
26
- redirectRoutePath = removeParameter(redirectRoutePath, 'code');
27
-
25
+ let redirectRoutePath = router.currentRoute.value.query.redirectRoutePath as string;
26
+ redirectRoutePath = decodeURIComponent(redirectRoutePath) || ('/sso/login/login-success' as any);
28
27
  router.push(redirectRoutePath);
29
28
  });
30
29
  });