yuang-framework-ui-common 1.0.51 → 1.0.52

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.
@@ -10,7 +10,7 @@ import { getSsoLoginUrl, clearSsoAccessToken, setSsoAccessToken } from '../utils
10
10
 
11
11
  import { clearGatewayConfig, initGatewayConfig, getGatewayConfigUrl } from '../config/gatewayConfig';
12
12
 
13
- import { getLocalStorageItem } from '../utils/storageUtils'
13
+ import { getLocalStorageItem, setLocalStorageItem } from '../utils/storageUtils'
14
14
 
15
15
  const router = useRouter();
16
16
 
@@ -85,6 +85,10 @@ http.interceptors.response.use(async (res: any) => {
85
85
  } else if (res?.data?.statusCode === 500815005) {
86
86
  await refreshSsoAccessToken(res);
87
87
  // 重发请求
88
+ let ssoAccessToken = getLocalStorageItem('ssoAccessToken');
89
+ if (ssoAccessToken) {
90
+ res.config.headers["Sso-Access-Token"] = ssoAccessToken;
91
+ }
88
92
  return axios.request(res.config);
89
93
  } else if (res?.data?.statusCode === 500815006) {
90
94
  const fullPath = router.currentRoute.value.fullPath;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yuang-framework-ui-common",
3
- "version": "1.0.51",
3
+ "version": "1.0.52",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "scripts": {