yuang-framework-ui-common 1.0.83 → 1.0.85

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.
@@ -86,7 +86,8 @@ http.interceptors.response.use(async (res: any) => {
86
86
  }
87
87
  return http.request(res.config);
88
88
  } else if (res?.data?.statusCode === 500815001) {
89
- showErrorMessage(res?.data?.message || messageMap.requestError);
89
+ // 会提示消息:未登录或已超时,但是马上跳转到登录页面,体验不好,所以去掉提示消息
90
+ // showErrorMessage(res?.data?.message || messageMap.requestError);
90
91
  clearSsoAccessToken();
91
92
  window.location.href = getSsoLoginUrl() || '';
92
93
  return Promise.reject(new Error(res?.data?.message));
@@ -112,6 +113,11 @@ http.interceptors.response.use(async (res: any) => {
112
113
  fullUrl = removeParameter('ssoAuthCode', fullUrl) || '';
113
114
  window.location.href = fullUrl;
114
115
  return;
116
+ } else if (res?.data?.statusCode === 500815010) {
117
+ clearGateway();
118
+ await initGateway();
119
+ showErrorMessage(res?.data?.message || messageMap.requestError);
120
+ return;
115
121
  }
116
122
  showErrorMessage(res?.data?.message || messageMap.requestError);
117
123
  return Promise.reject(new Error(res?.data?.message));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yuang-framework-ui-common",
3
- "version": "1.0.83",
3
+ "version": "1.0.85",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "scripts": {
@@ -7,7 +7,7 @@
7
7
  import { useRouter } from 'vue-router';
8
8
 
9
9
  import { application } from '../../../../lib/config/applicationConfig';
10
- import { getSsoLoginUrl, setSsoAccessToken } from '../../../../lib/utils/ssoUtils';
10
+ import { getSsoAuthUrl, setSsoAccessToken } from '../../../../lib/utils/ssoUtils';
11
11
  import { removeParameter } from '../../../../lib/utils/urlUtils';
12
12
  import { http } from '../../../../lib/config/httpConfig';
13
13
 
@@ -18,7 +18,7 @@
18
18
  onMounted(() => {
19
19
  const ssoAuthCode = router.currentRoute.value.query.ssoAuthCode;
20
20
  if (!ssoAuthCode) {
21
- window.location.href = getSsoLoginUrl(window.location.href) || '';
21
+ window.location.href = getSsoAuthUrl(window.location.href) || '';
22
22
  // 这里一定要return,不return还是会继续执行下面的代码
23
23
  return;
24
24
  }